generated-configure.sh revision 2751:6741b50bd858
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
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_LICENSE
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702FIXPATH_DETACH_FLAG
703FIXPATH
704BUILD_GTEST
705ENABLE_AOT
706GCOV_ENABLED
707ZIP_EXTERNAL_DEBUG_SYMBOLS
708COPY_DEBUG_SYMBOLS
709COMPILE_WITH_DEBUG_SYMBOLS
710CFLAGS_WARNINGS_ARE_ERRORS
711BUILD_CC_DISABLE_WARNING_PREFIX
712DISABLE_WARNING_PREFIX
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752JDK_ARCH_ABI_PROP_NAME
753CXX_O_FLAG_SIZE
754CXX_O_FLAG_NONE
755CXX_O_FLAG_DEBUG
756CXX_O_FLAG_NORM
757CXX_O_FLAG_HI
758CXX_O_FLAG_HIGHEST
759CXX_O_FLAG_HIGHEST_JVM
760C_O_FLAG_SIZE
761C_O_FLAG_NONE
762C_O_FLAG_DEBUG
763C_O_FLAG_NORM
764C_O_FLAG_HI
765C_O_FLAG_HIGHEST
766C_O_FLAG_HIGHEST_JVM
767JVM_CFLAGS_SYMBOLS
768CXXFLAGS_DEBUG_SYMBOLS
769CFLAGS_DEBUG_SYMBOLS
770CXX_FLAG_DEPS
771C_FLAG_DEPS
772SHARED_LIBRARY_FLAGS
773SET_SHARED_LIBRARY_MAPFILE
774SET_SHARED_LIBRARY_NAME
775SET_SHARED_LIBRARY_ORIGIN
776SET_EXECUTABLE_ORIGIN
777CXX_FLAG_REORDER
778C_FLAG_REORDER
779JVM_RCFLAGS
780RC_FLAGS
781AR_OUT_OPTION
782LD_OUT_OPTION
783EXE_OUT_OPTION
784CC_OUT_OPTION
785STRIPFLAGS
786ARFLAGS
787COMPILER_BINDCMD_FILE_FLAG
788COMPILER_COMMAND_FILE_FLAG
789COMPILER_TARGET_BITS_FLAG
790JIB_JAR
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
936FLOCK
937TIME
938STAT
939HG
940DOT
941READELF
942OTOOL
943LDD
944ZIPEXE
945UNZIP
946TAR_SUPPORTS_TRANSFORM
947TAR_INCLUDE_PARAM
948TAR_CREATE_EXTRA_PARAM
949TAR_TYPE
950FIND_DELETE
951OUTPUT_SYNC
952OUTPUT_SYNC_SUPPORTED
953CHECK_TOOLSDIR_MAKE
954CHECK_TOOLSDIR_GMAKE
955CHECK_MAKE
956CHECK_GMAKE
957MAKE
958PKGHANDLER
959CONFIGURESUPPORT_OUTPUTDIR
960OUTPUT_ROOT
961CONF_NAME
962SPEC
963SDKROOT
964XCODEBUILD
965JVM_VARIANT_MAIN
966VALID_JVM_VARIANTS
967JVM_VARIANTS
968DEBUG_LEVEL
969HOTSPOT_DEBUG_LEVEL
970JDK_VARIANT
971USERNAME
972CANONICAL_TOPDIR
973ORIGINAL_TOPDIR
974TOPDIR
975PATH_SEP
976HOTSPOT_BUILD_CPU_DEFINE
977HOTSPOT_BUILD_CPU_ARCH
978HOTSPOT_BUILD_CPU
979HOTSPOT_BUILD_OS_TYPE
980HOTSPOT_BUILD_OS
981OPENJDK_BUILD_BUNDLE_PLATFORM
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LEGACY_LIB
986OPENJDK_BUILD_CPU_LEGACY
987HOTSPOT_TARGET_CPU_DEFINE
988HOTSPOT_TARGET_CPU_ARCH
989HOTSPOT_TARGET_CPU
990HOTSPOT_TARGET_OS_TYPE
991HOTSPOT_TARGET_OS
992DEFINE_CROSS_COMPILE_ARCH
993OPENJDK_TARGET_BUNDLE_PLATFORM
994OPENJDK_TARGET_OS_EXPORT_DIR
995OPENJDK_TARGET_CPU_OSARCH
996OPENJDK_TARGET_CPU_ISADIR
997OPENJDK_TARGET_CPU_LEGACY_LIB
998OPENJDK_TARGET_CPU_LEGACY
999RELEASE_FILE_OS_ARCH
1000RELEASE_FILE_OS_NAME
1001OPENJDK_MODULE_TARGET_PLATFORM
1002COMPILE_TYPE
1003OPENJDK_TARGET_CPU_ENDIAN
1004OPENJDK_TARGET_CPU_BITS
1005OPENJDK_TARGET_CPU_ARCH
1006OPENJDK_TARGET_CPU
1007OPENJDK_TARGET_OS_ENV
1008OPENJDK_TARGET_OS_TYPE
1009OPENJDK_TARGET_OS
1010OPENJDK_BUILD_CPU_ENDIAN
1011OPENJDK_BUILD_CPU_BITS
1012OPENJDK_BUILD_CPU_ARCH
1013OPENJDK_BUILD_CPU
1014OPENJDK_BUILD_OS_ENV
1015OPENJDK_BUILD_OS_TYPE
1016OPENJDK_BUILD_OS
1017OPENJDK_BUILD_AUTOCONF_NAME
1018OPENJDK_TARGET_AUTOCONF_NAME
1019target_os
1020target_vendor
1021target_cpu
1022target
1023host_os
1024host_vendor
1025host_cpu
1026host
1027build_os
1028build_vendor
1029build_cpu
1030build
1031PANDOC
1032NICE
1033CPIO
1034DF
1035READLINK
1036CYGPATH
1037SED
1038FGREP
1039EGREP
1040GREP
1041AWK
1042XARGS
1043WHICH
1044WC
1045UNIQ
1046UNAME
1047TR
1048TOUCH
1049TEE
1050TAR
1051TAIL
1052SORT
1053SH
1054RMDIR
1055RM
1056PRINTF
1057NAWK
1058MV
1059MKTEMP
1060MKDIR
1061LS
1062LN
1063GZIP
1064GUNZIP
1065HEAD
1066FIND
1067FILE
1068EXPR
1069ECHO
1070DIRNAME
1071DIFF
1072DATE
1073CUT
1074CP
1075COMM
1076CMP
1077CHMOD
1078CAT
1079BASH
1080BASENAME
1081DATE_WHEN_CONFIGURED
1082ORIGINAL_PATH
1083CONFIGURE_COMMAND_LINE
1084target_alias
1085host_alias
1086build_alias
1087LIBS
1088ECHO_T
1089ECHO_N
1090ECHO_C
1091DEFS
1092mandir
1093localedir
1094libdir
1095psdir
1096pdfdir
1097dvidir
1098htmldir
1099infodir
1100docdir
1101oldincludedir
1102includedir
1103localstatedir
1104sharedstatedir
1105sysconfdir
1106datadir
1107datarootdir
1108libexecdir
1109sbindir
1110bindir
1111program_transform_name
1112prefix
1113exec_prefix
1114PACKAGE_URL
1115PACKAGE_BUGREPORT
1116PACKAGE_STRING
1117PACKAGE_VERSION
1118PACKAGE_TARNAME
1119PACKAGE_NAME
1120PATH_SEPARATOR
1121SHELL'
1122ac_subst_files=''
1123ac_user_opts='
1124enable_option_checking
1125with_target_bits
1126enable_openjdk_only
1127with_custom_make_dir
1128with_jdk_variant
1129enable_debug
1130with_debug_level
1131with_jvm_variants
1132with_cpu_port
1133with_devkit
1134with_sys_root
1135with_sysroot
1136with_tools_dir
1137with_toolchain_path
1138with_extra_path
1139with_sdk_name
1140with_conf_name
1141with_output_sync
1142with_default_make_target
1143enable_headless_only
1144enable_full_docs
1145with_cacerts_file
1146enable_unlimited_crypto
1147with_copyright_year
1148enable_keep_packaged_modules
1149with_milestone
1150with_update_version
1151with_user_release_suffix
1152with_build_number
1153with_version_string
1154with_version_pre
1155with_version_opt
1156with_version_build
1157with_version_major
1158with_version_minor
1159with_version_security
1160with_version_patch
1161with_boot_jdk
1162with_build_jdk
1163with_add_source_root
1164with_override_source_root
1165with_adds_and_overrides
1166with_override_langtools
1167with_override_corba
1168with_override_jaxp
1169with_override_jaxws
1170with_override_hotspot
1171with_override_nashorn
1172with_override_jdk
1173with_import_hotspot
1174with_import_modules
1175enable_static_build
1176with_toolchain_type
1177with_extra_cflags
1178with_extra_cxxflags
1179with_extra_ldflags
1180with_toolchain_version
1181with_build_devkit
1182with_jtreg
1183with_jib
1184with_abi_profile
1185enable_warnings_as_errors
1186with_native_debug_symbols
1187enable_debug_symbols
1188enable_zip_debug_info
1189enable_native_coverage
1190enable_dtrace
1191enable_aot
1192enable_hotspot_gtest
1193with_stdc__lib
1194with_msvcr_dll
1195with_msvcp_dll
1196with_x
1197with_cups
1198with_cups_include
1199with_freetype
1200with_freetype_include
1201with_freetype_lib
1202with_freetype_src
1203enable_freetype_bundling
1204with_freetype_license
1205with_alsa
1206with_alsa_include
1207with_alsa_lib
1208with_libffi
1209with_libffi_include
1210with_libffi_lib
1211enable_libffi_bundling
1212with_libjpeg
1213with_giflib
1214with_libpng
1215with_zlib
1216with_lcms
1217with_dxsdk
1218with_dxsdk_lib
1219with_dxsdk_include
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
1300FLOCK
1301DTRACE
1302PATCH
1303DSYMUTIL
1304XATTR
1305CODESIGN
1306SETFILE
1307PKG_CONFIG
1308JAVA
1309JAVAC
1310JAVAH
1311JAR
1312JARSIGNER
1313CC
1314CFLAGS
1315LDFLAGS
1316LIBS
1317CPPFLAGS
1318CXX
1319CXXFLAGS
1320CCC
1321CPP
1322CXXCPP
1323AS
1324AR
1325LIPO
1326STRIP
1327NM
1328GNM
1329OBJCOPY
1330OBJDUMP
1331BUILD_CC
1332BUILD_CXX
1333BUILD_NM
1334BUILD_AR
1335BUILD_OBJCOPY
1336BUILD_STRIP
1337JTREGEXE
1338XMKMF
1339FREETYPE_CFLAGS
1340FREETYPE_LIBS
1341ALSA_CFLAGS
1342ALSA_LIBS
1343LIBFFI_CFLAGS
1344LIBFFI_LIBS
1345PNG_CFLAGS
1346PNG_LIBS
1347LCMS_CFLAGS
1348LCMS_LIBS
1349ICECC_CMD
1350ICECC_CREATE_ENV
1351ICECC_WRAPPER
1352CCACHE'
1353
1354
1355# Initialize some variables set by options.
1356ac_init_help=
1357ac_init_version=false
1358ac_unrecognized_opts=
1359ac_unrecognized_sep=
1360# The variables have the same names as the options, with
1361# dashes changed to underlines.
1362cache_file=/dev/null
1363exec_prefix=NONE
1364no_create=
1365no_recursion=
1366prefix=NONE
1367program_prefix=NONE
1368program_suffix=NONE
1369program_transform_name=s,x,x,
1370silent=
1371site=
1372srcdir=
1373verbose=
1374x_includes=NONE
1375x_libraries=NONE
1376
1377# Installation directory options.
1378# These are left unexpanded so users can "make install exec_prefix=/foo"
1379# and all the variables that are supposed to be based on exec_prefix
1380# by default will actually change.
1381# Use braces instead of parens because sh, perl, etc. also accept them.
1382# (The list follows the same order as the GNU Coding Standards.)
1383bindir='${exec_prefix}/bin'
1384sbindir='${exec_prefix}/sbin'
1385libexecdir='${exec_prefix}/libexec'
1386datarootdir='${prefix}/share'
1387datadir='${datarootdir}'
1388sysconfdir='${prefix}/etc'
1389sharedstatedir='${prefix}/com'
1390localstatedir='${prefix}/var'
1391includedir='${prefix}/include'
1392oldincludedir='/usr/include'
1393docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1394infodir='${datarootdir}/info'
1395htmldir='${docdir}'
1396dvidir='${docdir}'
1397pdfdir='${docdir}'
1398psdir='${docdir}'
1399libdir='${exec_prefix}/lib'
1400localedir='${datarootdir}/locale'
1401mandir='${datarootdir}/man'
1402
1403ac_prev=
1404ac_dashdash=
1405for ac_option
1406do
1407  # If the previous option needs an argument, assign it.
1408  if test -n "$ac_prev"; then
1409    eval $ac_prev=\$ac_option
1410    ac_prev=
1411    continue
1412  fi
1413
1414  case $ac_option in
1415  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1416  *=)   ac_optarg= ;;
1417  *)    ac_optarg=yes ;;
1418  esac
1419
1420  # Accept the important Cygnus configure options, so we can diagnose typos.
1421
1422  case $ac_dashdash$ac_option in
1423  --)
1424    ac_dashdash=yes ;;
1425
1426  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1427    ac_prev=bindir ;;
1428  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1429    bindir=$ac_optarg ;;
1430
1431  -build | --build | --buil | --bui | --bu)
1432    ac_prev=build_alias ;;
1433  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1434    build_alias=$ac_optarg ;;
1435
1436  -cache-file | --cache-file | --cache-fil | --cache-fi \
1437  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1438    ac_prev=cache_file ;;
1439  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1440  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1441    cache_file=$ac_optarg ;;
1442
1443  --config-cache | -C)
1444    cache_file=config.cache ;;
1445
1446  -datadir | --datadir | --datadi | --datad)
1447    ac_prev=datadir ;;
1448  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1449    datadir=$ac_optarg ;;
1450
1451  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1452  | --dataroo | --dataro | --datar)
1453    ac_prev=datarootdir ;;
1454  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1455  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1456    datarootdir=$ac_optarg ;;
1457
1458  -disable-* | --disable-*)
1459    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1460    # Reject names that are not valid shell variable names.
1461    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1462      as_fn_error $? "invalid feature name: $ac_useropt"
1463    ac_useropt_orig=$ac_useropt
1464    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1465    case $ac_user_opts in
1466      *"
1467"enable_$ac_useropt"
1468"*) ;;
1469      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1470	 ac_unrecognized_sep=', ';;
1471    esac
1472    eval enable_$ac_useropt=no ;;
1473
1474  -docdir | --docdir | --docdi | --doc | --do)
1475    ac_prev=docdir ;;
1476  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1477    docdir=$ac_optarg ;;
1478
1479  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1480    ac_prev=dvidir ;;
1481  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1482    dvidir=$ac_optarg ;;
1483
1484  -enable-* | --enable-*)
1485    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1486    # Reject names that are not valid shell variable names.
1487    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1488      as_fn_error $? "invalid feature name: $ac_useropt"
1489    ac_useropt_orig=$ac_useropt
1490    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1491    case $ac_user_opts in
1492      *"
1493"enable_$ac_useropt"
1494"*) ;;
1495      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1496	 ac_unrecognized_sep=', ';;
1497    esac
1498    eval enable_$ac_useropt=\$ac_optarg ;;
1499
1500  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1501  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1502  | --exec | --exe | --ex)
1503    ac_prev=exec_prefix ;;
1504  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1505  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1506  | --exec=* | --exe=* | --ex=*)
1507    exec_prefix=$ac_optarg ;;
1508
1509  -gas | --gas | --ga | --g)
1510    # Obsolete; use --with-gas.
1511    with_gas=yes ;;
1512
1513  -help | --help | --hel | --he | -h)
1514    ac_init_help=long ;;
1515  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1516    ac_init_help=recursive ;;
1517  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1518    ac_init_help=short ;;
1519
1520  -host | --host | --hos | --ho)
1521    ac_prev=host_alias ;;
1522  -host=* | --host=* | --hos=* | --ho=*)
1523    host_alias=$ac_optarg ;;
1524
1525  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1526    ac_prev=htmldir ;;
1527  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1528  | --ht=*)
1529    htmldir=$ac_optarg ;;
1530
1531  -includedir | --includedir | --includedi | --included | --include \
1532  | --includ | --inclu | --incl | --inc)
1533    ac_prev=includedir ;;
1534  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1535  | --includ=* | --inclu=* | --incl=* | --inc=*)
1536    includedir=$ac_optarg ;;
1537
1538  -infodir | --infodir | --infodi | --infod | --info | --inf)
1539    ac_prev=infodir ;;
1540  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1541    infodir=$ac_optarg ;;
1542
1543  -libdir | --libdir | --libdi | --libd)
1544    ac_prev=libdir ;;
1545  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1546    libdir=$ac_optarg ;;
1547
1548  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1549  | --libexe | --libex | --libe)
1550    ac_prev=libexecdir ;;
1551  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1552  | --libexe=* | --libex=* | --libe=*)
1553    libexecdir=$ac_optarg ;;
1554
1555  -localedir | --localedir | --localedi | --localed | --locale)
1556    ac_prev=localedir ;;
1557  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1558    localedir=$ac_optarg ;;
1559
1560  -localstatedir | --localstatedir | --localstatedi | --localstated \
1561  | --localstate | --localstat | --localsta | --localst | --locals)
1562    ac_prev=localstatedir ;;
1563  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1564  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1565    localstatedir=$ac_optarg ;;
1566
1567  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1568    ac_prev=mandir ;;
1569  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1570    mandir=$ac_optarg ;;
1571
1572  -nfp | --nfp | --nf)
1573    # Obsolete; use --without-fp.
1574    with_fp=no ;;
1575
1576  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1577  | --no-cr | --no-c | -n)
1578    no_create=yes ;;
1579
1580  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1581  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1582    no_recursion=yes ;;
1583
1584  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1585  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1586  | --oldin | --oldi | --old | --ol | --o)
1587    ac_prev=oldincludedir ;;
1588  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1589  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1590  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1591    oldincludedir=$ac_optarg ;;
1592
1593  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1594    ac_prev=prefix ;;
1595  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1596    prefix=$ac_optarg ;;
1597
1598  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1599  | --program-pre | --program-pr | --program-p)
1600    ac_prev=program_prefix ;;
1601  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1602  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1603    program_prefix=$ac_optarg ;;
1604
1605  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1606  | --program-suf | --program-su | --program-s)
1607    ac_prev=program_suffix ;;
1608  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1609  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1610    program_suffix=$ac_optarg ;;
1611
1612  -program-transform-name | --program-transform-name \
1613  | --program-transform-nam | --program-transform-na \
1614  | --program-transform-n | --program-transform- \
1615  | --program-transform | --program-transfor \
1616  | --program-transfo | --program-transf \
1617  | --program-trans | --program-tran \
1618  | --progr-tra | --program-tr | --program-t)
1619    ac_prev=program_transform_name ;;
1620  -program-transform-name=* | --program-transform-name=* \
1621  | --program-transform-nam=* | --program-transform-na=* \
1622  | --program-transform-n=* | --program-transform-=* \
1623  | --program-transform=* | --program-transfor=* \
1624  | --program-transfo=* | --program-transf=* \
1625  | --program-trans=* | --program-tran=* \
1626  | --progr-tra=* | --program-tr=* | --program-t=*)
1627    program_transform_name=$ac_optarg ;;
1628
1629  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1630    ac_prev=pdfdir ;;
1631  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1632    pdfdir=$ac_optarg ;;
1633
1634  -psdir | --psdir | --psdi | --psd | --ps)
1635    ac_prev=psdir ;;
1636  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1637    psdir=$ac_optarg ;;
1638
1639  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1640  | -silent | --silent | --silen | --sile | --sil)
1641    silent=yes ;;
1642
1643  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1644    ac_prev=sbindir ;;
1645  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1646  | --sbi=* | --sb=*)
1647    sbindir=$ac_optarg ;;
1648
1649  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1650  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1651  | --sharedst | --shareds | --shared | --share | --shar \
1652  | --sha | --sh)
1653    ac_prev=sharedstatedir ;;
1654  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1655  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1656  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1657  | --sha=* | --sh=*)
1658    sharedstatedir=$ac_optarg ;;
1659
1660  -site | --site | --sit)
1661    ac_prev=site ;;
1662  -site=* | --site=* | --sit=*)
1663    site=$ac_optarg ;;
1664
1665  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1666    ac_prev=srcdir ;;
1667  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1668    srcdir=$ac_optarg ;;
1669
1670  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1671  | --syscon | --sysco | --sysc | --sys | --sy)
1672    ac_prev=sysconfdir ;;
1673  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1674  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1675    sysconfdir=$ac_optarg ;;
1676
1677  -target | --target | --targe | --targ | --tar | --ta | --t)
1678    ac_prev=target_alias ;;
1679  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1680    target_alias=$ac_optarg ;;
1681
1682  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1683    verbose=yes ;;
1684
1685  -version | --version | --versio | --versi | --vers | -V)
1686    ac_init_version=: ;;
1687
1688  -with-* | --with-*)
1689    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1690    # Reject names that are not valid shell variable names.
1691    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1692      as_fn_error $? "invalid package name: $ac_useropt"
1693    ac_useropt_orig=$ac_useropt
1694    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1695    case $ac_user_opts in
1696      *"
1697"with_$ac_useropt"
1698"*) ;;
1699      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1700	 ac_unrecognized_sep=', ';;
1701    esac
1702    eval with_$ac_useropt=\$ac_optarg ;;
1703
1704  -without-* | --without-*)
1705    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1706    # Reject names that are not valid shell variable names.
1707    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708      as_fn_error $? "invalid package name: $ac_useropt"
1709    ac_useropt_orig=$ac_useropt
1710    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711    case $ac_user_opts in
1712      *"
1713"with_$ac_useropt"
1714"*) ;;
1715      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1716	 ac_unrecognized_sep=', ';;
1717    esac
1718    eval with_$ac_useropt=no ;;
1719
1720  --x)
1721    # Obsolete; use --with-x.
1722    with_x=yes ;;
1723
1724  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1725  | --x-incl | --x-inc | --x-in | --x-i)
1726    ac_prev=x_includes ;;
1727  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1728  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1729    x_includes=$ac_optarg ;;
1730
1731  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1732  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1733    ac_prev=x_libraries ;;
1734  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1735  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1736    x_libraries=$ac_optarg ;;
1737
1738  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1739Try \`$0 --help' for more information"
1740    ;;
1741
1742  *=*)
1743    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1744    # Reject names that are not valid shell variable names.
1745    case $ac_envvar in #(
1746      '' | [0-9]* | *[!_$as_cr_alnum]* )
1747      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1748    esac
1749    eval $ac_envvar=\$ac_optarg
1750    export $ac_envvar ;;
1751
1752  *)
1753    # FIXME: should be removed in autoconf 3.0.
1754    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1755    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1756      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1757    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1758    ;;
1759
1760  esac
1761done
1762
1763if test -n "$ac_prev"; then
1764  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1765  as_fn_error $? "missing argument to $ac_option"
1766fi
1767
1768if test -n "$ac_unrecognized_opts"; then
1769  case $enable_option_checking in
1770    no) ;;
1771    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1772    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1773  esac
1774fi
1775
1776# Check all directory arguments for consistency.
1777for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1778		datadir sysconfdir sharedstatedir localstatedir includedir \
1779		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1780		libdir localedir mandir
1781do
1782  eval ac_val=\$$ac_var
1783  # Remove trailing slashes.
1784  case $ac_val in
1785    */ )
1786      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1787      eval $ac_var=\$ac_val;;
1788  esac
1789  # Be sure to have absolute directory names.
1790  case $ac_val in
1791    [\\/$]* | ?:[\\/]* )  continue;;
1792    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1793  esac
1794  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1795done
1796
1797# There might be people who depend on the old broken behavior: `$host'
1798# used to hold the argument of --host etc.
1799# FIXME: To remove some day.
1800build=$build_alias
1801host=$host_alias
1802target=$target_alias
1803
1804# FIXME: To remove some day.
1805if test "x$host_alias" != x; then
1806  if test "x$build_alias" = x; then
1807    cross_compiling=maybe
1808  elif test "x$build_alias" != "x$host_alias"; then
1809    cross_compiling=yes
1810  fi
1811fi
1812
1813ac_tool_prefix=
1814test -n "$host_alias" && ac_tool_prefix=$host_alias-
1815
1816test "$silent" = yes && exec 6>/dev/null
1817
1818
1819ac_pwd=`pwd` && test -n "$ac_pwd" &&
1820ac_ls_di=`ls -di .` &&
1821ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1822  as_fn_error $? "working directory cannot be determined"
1823test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1824  as_fn_error $? "pwd does not report name of working directory"
1825
1826
1827# Find the source files, if location was not specified.
1828if test -z "$srcdir"; then
1829  ac_srcdir_defaulted=yes
1830  # Try the directory containing this script, then the parent directory.
1831  ac_confdir=`$as_dirname -- "$as_myself" ||
1832$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1833	 X"$as_myself" : 'X\(//\)[^/]' \| \
1834	 X"$as_myself" : 'X\(//\)$' \| \
1835	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1836$as_echo X"$as_myself" |
1837    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)[^/].*/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)$/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\).*/{
1850	    s//\1/
1851	    q
1852	  }
1853	  s/.*/./; q'`
1854  srcdir=$ac_confdir
1855  if test ! -r "$srcdir/$ac_unique_file"; then
1856    srcdir=..
1857  fi
1858else
1859  ac_srcdir_defaulted=no
1860fi
1861if test ! -r "$srcdir/$ac_unique_file"; then
1862  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1863  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1864fi
1865ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1866ac_abs_confdir=`(
1867	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1868	pwd)`
1869# When building in place, set srcdir=.
1870if test "$ac_abs_confdir" = "$ac_pwd"; then
1871  srcdir=.
1872fi
1873# Remove unnecessary trailing slashes from srcdir.
1874# Double slashes in file names in object file debugging info
1875# mess up M-x gdb in Emacs.
1876case $srcdir in
1877*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1878esac
1879for ac_var in $ac_precious_vars; do
1880  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_env_${ac_var}_value=\$${ac_var}
1882  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1884done
1885
1886#
1887# Report the --help message.
1888#
1889if test "$ac_init_help" = "long"; then
1890  # Omit some internal or obsolete options to make the list less imposing.
1891  # This message is too long to be a string in the A/UX 3.1 sh.
1892  cat <<_ACEOF
1893\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1894
1895Usage: $0 [OPTION]... [VAR=VALUE]...
1896
1897To assign environment variables (e.g., CC, CFLAGS...), specify them as
1898VAR=VALUE.  See below for descriptions of some of the useful variables.
1899
1900Defaults for the options are specified in brackets.
1901
1902Configuration:
1903  -h, --help              display this help and exit
1904      --help=short        display options specific to this package
1905      --help=recursive    display the short help of all the included packages
1906  -V, --version           display version information and exit
1907  -q, --quiet, --silent   do not print \`checking ...' messages
1908      --cache-file=FILE   cache test results in FILE [disabled]
1909  -C, --config-cache      alias for \`--cache-file=config.cache'
1910  -n, --no-create         do not create output files
1911      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1912
1913Installation directories:
1914  --prefix=PREFIX         install architecture-independent files in PREFIX
1915                          [$ac_default_prefix]
1916  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1917                          [PREFIX]
1918
1919By default, \`make install' will install all the files in
1920\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1921an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1922for instance \`--prefix=\$HOME'.
1923
1924For better control, use the options below.
1925
1926Fine tuning of the installation directories:
1927  --bindir=DIR            user executables [EPREFIX/bin]
1928  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1929  --libexecdir=DIR        program executables [EPREFIX/libexec]
1930  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1931  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1932  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1933  --libdir=DIR            object code libraries [EPREFIX/lib]
1934  --includedir=DIR        C header files [PREFIX/include]
1935  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1936  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1937  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1938  --infodir=DIR           info documentation [DATAROOTDIR/info]
1939  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1940  --mandir=DIR            man documentation [DATAROOTDIR/man]
1941  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1942  --htmldir=DIR           html documentation [DOCDIR]
1943  --dvidir=DIR            dvi documentation [DOCDIR]
1944  --pdfdir=DIR            pdf documentation [DOCDIR]
1945  --psdir=DIR             ps documentation [DOCDIR]
1946_ACEOF
1947
1948  cat <<\_ACEOF
1949
1950X features:
1951  --x-includes=DIR    X include files are in DIR
1952  --x-libraries=DIR   X library files are in DIR
1953
1954System types:
1955  --build=BUILD     configure for building on BUILD [guessed]
1956  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1957  --target=TARGET   configure for building compilers for TARGET [HOST]
1958_ACEOF
1959fi
1960
1961if test -n "$ac_init_help"; then
1962  case $ac_init_help in
1963     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1964   esac
1965  cat <<\_ACEOF
1966
1967Optional Features:
1968  --disable-option-checking  ignore unrecognized --enable/--with options
1969  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1970  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1971  --enable-openjdk-only   suppress building custom source even if present
1972                          [disabled]
1973  --enable-debug          set the debug level to fastdebug (shorthand for
1974                          --with-debug-level=fastdebug) [disabled]
1975  --enable-headless-only  only build headless (no GUI) support [disabled]
1976  --enable-full-docs      build complete documentation [enabled if all tools
1977                          found]
1978  --disable-unlimited-crypto
1979                          Disable unlimited crypto policy [enabled]
1980  --disable-keep-packaged-modules
1981                          Do not keep packaged modules in jdk image [enable]
1982  --enable-static-build   enable static library build [disabled]
1983  --disable-warnings-as-errors
1984                          do not consider native warnings to be an error
1985                          [enabled]
1986  --enable-debug-symbols  Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-zip-debug-info Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-native-coverage
1991                          enable native compilation with code coverage
1992                          data[disabled]
1993  --enable-dtrace[=yes/no/auto]
1994                          enable dtrace. Default is auto, where dtrace is
1995                          enabled if all dependencies are present.
1996  --enable-aot[=yes/no/auto]
1997                          enable ahead of time compilation feature. Default is
1998                          auto, where aot is enabled if all dependencies are
1999                          present.
2000  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2001  --disable-freetype-bundling
2002                          disable bundling of the freetype library with the
2003                          build result [enabled on Windows or when using
2004                          --with-freetype, disabled otherwise]
2005  --enable-libffi-bundling
2006                          enable bundling of libffi.so to make the built JDK
2007                          runnable on more systems
2008  --enable-jtreg-failure-handler
2009                          forces build of the jtreg failure handler to be
2010                          enabled, missing dependencies become fatal errors.
2011                          Default is auto, where the failure handler is built
2012                          if all dependencies are present and otherwise just
2013                          disabled.
2014  --disable-generate-classlist
2015                          forces enabling or disabling of the generation of a
2016                          CDS classlist at build time. Default is to generate
2017                          it when either the server or client JVMs are built.
2018  --enable-sjavac         use sjavac to do fast incremental compiles
2019                          [disabled]
2020  --disable-javac-server  disable javac server [enabled]
2021  --enable-icecc          enable distribted compilation of native code using
2022                          icecc/icecream [disabled]
2023  --disable-precompiled-headers
2024                          disable using precompiled headers when compiling C++
2025                          [enabled]
2026  --enable-ccache         enable using ccache to speed up recompilations
2027                          [disabled]
2028
2029Optional Packages:
2030  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2031  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2032  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2033                          support it), e.g. --with-target-bits=32 [guessed]
2034  --with-custom-make-dir  Deprecated. Option is kept for backwards
2035                          compatibility and is ignored
2036  --with-jdk-variant      JDK variant to build (normal) [normal]
2037  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2038                          optimized) [release]
2039  --with-jvm-variants     JVM variants (separated by commas) to build
2040                          (server,client,minimal,core,zero,zeroshark,custom)
2041                          [server]
2042  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2043                          (arm64,aarch64) [aarch64]
2044  --with-devkit           use this devkit for compilers, tools and resources
2045  --with-sys-root         alias for --with-sysroot for backwards compatability
2046  --with-sysroot          use this directory as sysroot
2047  --with-tools-dir        alias for --with-toolchain-path for backwards
2048                          compatibility
2049  --with-toolchain-path   prepend these directories when searching for
2050                          toolchain binaries (compilers etc)
2051  --with-extra-path       prepend these directories to the default path
2052  --with-sdk-name         use the platform SDK of the given name. [macosx]
2053  --with-conf-name        use this as the name of the configuration [generated
2054                          from important configuration options]
2055  --with-output-sync      set make output sync type if supported by make.
2056                          [recurse]
2057  --with-default-make-target
2058                          set the default make target [exploded-image]
2059  --with-cacerts-file     specify alternative cacerts file
2060  --with-copyright-year   Set copyright year value for build [current year]
2061  --with-milestone        Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-update-version   Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-user-release-suffix
2066                          Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-build-number     Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-version-string   Set version string [calculated]
2071  --with-version-pre      Set the base part of the version 'PRE' field
2072                          (pre-release identifier) ['internal']
2073  --with-version-opt      Set version 'OPT' field (build metadata)
2074                          [<timestamp>.<user>.<dirname>]
2075  --with-version-build    Set version 'BUILD' field (build number) [not
2076                          specified]
2077  --with-version-major    Set version 'MAJOR' field (first number) [current
2078                          source value]
2079  --with-version-minor    Set version 'MINOR' field (second number) [current
2080                          source value]
2081  --with-version-security Set version 'SECURITY' field (third number) [current
2082                          source value]
2083  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2084                          specified]
2085  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2086  --with-build-jdk        path to JDK of same version as is being built[the
2087                          newly built JDK]
2088  --with-add-source-root  Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-source-root
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-adds-and-overrides
2094                          Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-langtools
2097                          Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-corba   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jaxp    Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxws   Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-hotspot Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-nashorn Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-jdk     Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-import_hotspot   Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import-modules   import a set of prebuilt modules either as a zip
2114                          file or an exploded directory
2115  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2116                          to show possible values [platform dependent]
2117  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2118  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2119  --with-extra-ldflags    extra flags to be used when linking jdk
2120  --with-toolchain-version
2121                          the version of the toolchain to look for, use
2122                          '--help' to show possible values [platform
2123                          dependent]
2124  --with-build-devkit     Devkit to use for the build platform toolchain
2125  --with-jtreg            Regression Test Harness [probed]
2126  --with-jib              Jib dependency management tool [not used]
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-freetype-license if bundling freetype, also bundle this license file
2155  --with-alsa             specify prefix directory for the alsa package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-alsa-include     specify directory for the alsa include files
2159  --with-alsa-lib         specify directory for the alsa library
2160  --with-libffi           specify prefix directory for the libffi package
2161                          (expecting the libraries under PATH/lib and the
2162                          headers under PATH/include)
2163  --with-libffi-include   specify directory for the libffi include files
2164  --with-libffi-lib       specify directory for the libffi library
2165  --with-libjpeg          use libjpeg from build system or OpenJDK source
2166                          (system, bundled) [bundled]
2167  --with-giflib           use giflib from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-libpng           use libpng from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-zlib             use zlib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-lcms             use lcms2 from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-dxsdk            Deprecated. Option is kept for backwards
2176                          compatibility and is ignored
2177  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-dxsdk-include    Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-jvm-features     additional JVM features to enable (separated by
2182                          comma), use '--help' to show possible values [none]
2183  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2184                          compatibility and is ignored
2185  --with-num-cores        number of cores in the build system, e.g.
2186                          --with-num-cores=8 [probed]
2187  --with-memory-size      memory (in MB) available in the build system, e.g.
2188                          --with-memory-size=1024 [probed]
2189  --with-jobs             number of parallel jobs to let make run [calculated
2190                          based on cores and memory]
2191  --with-test-jobs        number of parallel tests jobs to run [based on build
2192                          jobs]
2193  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2194                          invocations of boot JDK, overriding the default
2195                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2196                          -enableassertions"
2197  --with-sjavac-server-java
2198                          use this java binary for running the sjavac
2199                          background server [Boot JDK java]
2200  --with-ccache-dir       where to store ccache files [~/.ccache]
2201
2202Some influential environment variables:
2203  BASENAME    Override default value for BASENAME
2204  BASH        Override default value for BASH
2205  CAT         Override default value for CAT
2206  CHMOD       Override default value for CHMOD
2207  CMP         Override default value for CMP
2208  COMM        Override default value for COMM
2209  CP          Override default value for CP
2210  CUT         Override default value for CUT
2211  DATE        Override default value for DATE
2212  DIFF        Override default value for DIFF
2213  DIRNAME     Override default value for DIRNAME
2214  ECHO        Override default value for ECHO
2215  EXPR        Override default value for EXPR
2216  FILE        Override default value for FILE
2217  FIND        Override default value for FIND
2218  HEAD        Override default value for HEAD
2219  GUNZIP      Override default value for GUNZIP
2220  GZIP        Override default value for GZIP
2221  LN          Override default value for LN
2222  LS          Override default value for LS
2223  MKDIR       Override default value for MKDIR
2224  MKTEMP      Override default value for MKTEMP
2225  MV          Override default value for MV
2226  NAWK        Override default value for NAWK
2227  PRINTF      Override default value for PRINTF
2228  RM          Override default value for RM
2229  RMDIR       Override default value for RMDIR
2230  SH          Override default value for SH
2231  SORT        Override default value for SORT
2232  TAIL        Override default value for TAIL
2233  TAR         Override default value for TAR
2234  TEE         Override default value for TEE
2235  TOUCH       Override default value for TOUCH
2236  TR          Override default value for TR
2237  UNAME       Override default value for UNAME
2238  UNIQ        Override default value for UNIQ
2239  WC          Override default value for WC
2240  WHICH       Override default value for WHICH
2241  XARGS       Override default value for XARGS
2242  AWK         Override default value for AWK
2243  GREP        Override default value for GREP
2244  EGREP       Override default value for EGREP
2245  FGREP       Override default value for FGREP
2246  SED         Override default value for SED
2247  CYGPATH     Override default value for CYGPATH
2248  READLINK    Override default value for READLINK
2249  DF          Override default value for DF
2250  CPIO        Override default value for CPIO
2251  NICE        Override default value for NICE
2252  PANDOC      Override default value for PANDOC
2253  MAKE        Override default value for MAKE
2254  UNZIP       Override default value for UNZIP
2255  ZIPEXE      Override default value for ZIPEXE
2256  LDD         Override default value for LDD
2257  OTOOL       Override default value for OTOOL
2258  READELF     Override default value for READELF
2259  DOT         Override default value for DOT
2260  HG          Override default value for HG
2261  STAT        Override default value for STAT
2262  TIME        Override default value for TIME
2263  FLOCK       Override default value for FLOCK
2264  DTRACE      Override default value for DTRACE
2265  PATCH       Override default value for PATCH
2266  DSYMUTIL    Override default value for DSYMUTIL
2267  XATTR       Override default value for XATTR
2268  CODESIGN    Override default value for CODESIGN
2269  SETFILE     Override default value for SETFILE
2270  PKG_CONFIG  path to pkg-config utility
2271  JAVA        Override default value for JAVA
2272  JAVAC       Override default value for JAVAC
2273  JAVAH       Override default value for JAVAH
2274  JAR         Override default value for JAR
2275  JARSIGNER   Override default value for JARSIGNER
2276  CC          C compiler command
2277  CFLAGS      C compiler flags
2278  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2279              nonstandard directory <lib dir>
2280  LIBS        libraries to pass to the linker, e.g. -l<library>
2281  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2282              you have headers in a nonstandard directory <include dir>
2283  CXX         C++ compiler command
2284  CXXFLAGS    C++ compiler flags
2285  CPP         C preprocessor
2286  CXXCPP      C++ preprocessor
2287  AS          Override default value for AS
2288  AR          Override default value for AR
2289  LIPO        Override default value for LIPO
2290  STRIP       Override default value for STRIP
2291  NM          Override default value for NM
2292  GNM         Override default value for GNM
2293  OBJCOPY     Override default value for OBJCOPY
2294  OBJDUMP     Override default value for OBJDUMP
2295  BUILD_CC    Override default value for BUILD_CC
2296  BUILD_CXX   Override default value for BUILD_CXX
2297  BUILD_NM    Override default value for BUILD_NM
2298  BUILD_AR    Override default value for BUILD_AR
2299  BUILD_OBJCOPY
2300              Override default value for BUILD_OBJCOPY
2301  BUILD_STRIP Override default value for BUILD_STRIP
2302  JTREGEXE    Override default value for JTREGEXE
2303  XMKMF       Path to xmkmf, Makefile generator for X Window System
2304  FREETYPE_CFLAGS
2305              C compiler flags for FREETYPE, overriding pkg-config
2306  FREETYPE_LIBS
2307              linker flags for FREETYPE, overriding pkg-config
2308  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2309  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2310  LIBFFI_CFLAGS
2311              C compiler flags for LIBFFI, overriding pkg-config
2312  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2313  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2314  PNG_LIBS    linker flags for PNG, overriding pkg-config
2315  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2316  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2317  ICECC_CMD   Override default value for ICECC_CMD
2318  ICECC_CREATE_ENV
2319              Override default value for ICECC_CREATE_ENV
2320  ICECC_WRAPPER
2321              Override default value for ICECC_WRAPPER
2322  CCACHE      Override default value for CCACHE
2323
2324Use these variables to override the choices made by `configure' or to help
2325it to find libraries and programs with nonstandard names/locations.
2326
2327Report bugs to <build-dev@openjdk.java.net>.
2328OpenJDK home page: <http://openjdk.java.net>.
2329_ACEOF
2330ac_status=$?
2331fi
2332
2333if test "$ac_init_help" = "recursive"; then
2334  # If there are subdirs, report their specific --help.
2335  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2336    test -d "$ac_dir" ||
2337      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2338      continue
2339    ac_builddir=.
2340
2341case "$ac_dir" in
2342.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2343*)
2344  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2345  # A ".." for each directory in $ac_dir_suffix.
2346  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2347  case $ac_top_builddir_sub in
2348  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2349  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2350  esac ;;
2351esac
2352ac_abs_top_builddir=$ac_pwd
2353ac_abs_builddir=$ac_pwd$ac_dir_suffix
2354# for backward compatibility:
2355ac_top_builddir=$ac_top_build_prefix
2356
2357case $srcdir in
2358  .)  # We are building in place.
2359    ac_srcdir=.
2360    ac_top_srcdir=$ac_top_builddir_sub
2361    ac_abs_top_srcdir=$ac_pwd ;;
2362  [\\/]* | ?:[\\/]* )  # Absolute name.
2363    ac_srcdir=$srcdir$ac_dir_suffix;
2364    ac_top_srcdir=$srcdir
2365    ac_abs_top_srcdir=$srcdir ;;
2366  *) # Relative name.
2367    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2368    ac_top_srcdir=$ac_top_build_prefix$srcdir
2369    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2370esac
2371ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2372
2373    cd "$ac_dir" || { ac_status=$?; continue; }
2374    # Check for guested configure.
2375    if test -f "$ac_srcdir/configure.gnu"; then
2376      echo &&
2377      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2378    elif test -f "$ac_srcdir/configure"; then
2379      echo &&
2380      $SHELL "$ac_srcdir/configure" --help=recursive
2381    else
2382      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2383    fi || ac_status=$?
2384    cd "$ac_pwd" || { ac_status=$?; break; }
2385  done
2386fi
2387
2388test -n "$ac_init_help" && exit $ac_status
2389if $ac_init_version; then
2390  cat <<\_ACEOF
2391OpenJDK configure jdk9
2392generated by GNU Autoconf 2.69
2393
2394Copyright (C) 2012 Free Software Foundation, Inc.
2395This configure script is free software; the Free Software Foundation
2396gives unlimited permission to copy, distribute and modify it.
2397_ACEOF
2398  exit
2399fi
2400
2401## ------------------------ ##
2402## Autoconf initialization. ##
2403## ------------------------ ##
2404
2405# ac_fn_c_try_compile LINENO
2406# --------------------------
2407# Try to compile conftest.$ac_ext, and return whether this succeeded.
2408ac_fn_c_try_compile ()
2409{
2410  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411  rm -f conftest.$ac_objext
2412  if { { ac_try="$ac_compile"
2413case "(($ac_try" in
2414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415  *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419  (eval "$ac_compile") 2>conftest.err
2420  ac_status=$?
2421  if test -s conftest.err; then
2422    grep -v '^ *+' conftest.err >conftest.er1
2423    cat conftest.er1 >&5
2424    mv -f conftest.er1 conftest.err
2425  fi
2426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427  test $ac_status = 0; } && {
2428	 test -z "$ac_c_werror_flag" ||
2429	 test ! -s conftest.err
2430       } && test -s conftest.$ac_objext; then :
2431  ac_retval=0
2432else
2433  $as_echo "$as_me: failed program was:" >&5
2434sed 's/^/| /' conftest.$ac_ext >&5
2435
2436	ac_retval=1
2437fi
2438  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2439  as_fn_set_status $ac_retval
2440
2441} # ac_fn_c_try_compile
2442
2443# ac_fn_cxx_try_compile LINENO
2444# ----------------------------
2445# Try to compile conftest.$ac_ext, and return whether this succeeded.
2446ac_fn_cxx_try_compile ()
2447{
2448  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2449  rm -f conftest.$ac_objext
2450  if { { ac_try="$ac_compile"
2451case "(($ac_try" in
2452  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2453  *) ac_try_echo=$ac_try;;
2454esac
2455eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2456$as_echo "$ac_try_echo"; } >&5
2457  (eval "$ac_compile") 2>conftest.err
2458  ac_status=$?
2459  if test -s conftest.err; then
2460    grep -v '^ *+' conftest.err >conftest.er1
2461    cat conftest.er1 >&5
2462    mv -f conftest.er1 conftest.err
2463  fi
2464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2465  test $ac_status = 0; } && {
2466	 test -z "$ac_cxx_werror_flag" ||
2467	 test ! -s conftest.err
2468       } && test -s conftest.$ac_objext; then :
2469  ac_retval=0
2470else
2471  $as_echo "$as_me: failed program was:" >&5
2472sed 's/^/| /' conftest.$ac_ext >&5
2473
2474	ac_retval=1
2475fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477  as_fn_set_status $ac_retval
2478
2479} # ac_fn_cxx_try_compile
2480
2481# ac_fn_c_try_cpp LINENO
2482# ----------------------
2483# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2484ac_fn_c_try_cpp ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  if { { ac_try="$ac_cpp conftest.$ac_ext"
2488case "(($ac_try" in
2489  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490  *) ac_try_echo=$ac_try;;
2491esac
2492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2493$as_echo "$ac_try_echo"; } >&5
2494  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2495  ac_status=$?
2496  if test -s conftest.err; then
2497    grep -v '^ *+' conftest.err >conftest.er1
2498    cat conftest.er1 >&5
2499    mv -f conftest.er1 conftest.err
2500  fi
2501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2502  test $ac_status = 0; } > conftest.i && {
2503	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2504	 test ! -s conftest.err
2505       }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: failed program was:" >&5
2509sed 's/^/| /' conftest.$ac_ext >&5
2510
2511    ac_retval=1
2512fi
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514  as_fn_set_status $ac_retval
2515
2516} # ac_fn_c_try_cpp
2517
2518# ac_fn_cxx_try_cpp LINENO
2519# ------------------------
2520# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2521ac_fn_cxx_try_cpp ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  if { { ac_try="$ac_cpp conftest.$ac_ext"
2525case "(($ac_try" in
2526  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527  *) ac_try_echo=$ac_try;;
2528esac
2529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530$as_echo "$ac_try_echo"; } >&5
2531  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2532  ac_status=$?
2533  if test -s conftest.err; then
2534    grep -v '^ *+' conftest.err >conftest.er1
2535    cat conftest.er1 >&5
2536    mv -f conftest.er1 conftest.err
2537  fi
2538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2539  test $ac_status = 0; } > conftest.i && {
2540	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2541	 test ! -s conftest.err
2542       }; then :
2543  ac_retval=0
2544else
2545  $as_echo "$as_me: failed program was:" >&5
2546sed 's/^/| /' conftest.$ac_ext >&5
2547
2548    ac_retval=1
2549fi
2550  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2551  as_fn_set_status $ac_retval
2552
2553} # ac_fn_cxx_try_cpp
2554
2555# ac_fn_c_try_link LINENO
2556# -----------------------
2557# Try to link conftest.$ac_ext, and return whether this succeeded.
2558ac_fn_c_try_link ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  rm -f conftest.$ac_objext conftest$ac_exeext
2562  if { { ac_try="$ac_link"
2563case "(($ac_try" in
2564  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2565  *) ac_try_echo=$ac_try;;
2566esac
2567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2568$as_echo "$ac_try_echo"; } >&5
2569  (eval "$ac_link") 2>conftest.err
2570  ac_status=$?
2571  if test -s conftest.err; then
2572    grep -v '^ *+' conftest.err >conftest.er1
2573    cat conftest.er1 >&5
2574    mv -f conftest.er1 conftest.err
2575  fi
2576  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2577  test $ac_status = 0; } && {
2578	 test -z "$ac_c_werror_flag" ||
2579	 test ! -s conftest.err
2580       } && test -s conftest$ac_exeext && {
2581	 test "$cross_compiling" = yes ||
2582	 test -x conftest$ac_exeext
2583       }; then :
2584  ac_retval=0
2585else
2586  $as_echo "$as_me: failed program was:" >&5
2587sed 's/^/| /' conftest.$ac_ext >&5
2588
2589	ac_retval=1
2590fi
2591  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2592  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2593  # interfere with the next link command; also delete a directory that is
2594  # left behind by Apple's compiler.  We do this before executing the actions.
2595  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597  as_fn_set_status $ac_retval
2598
2599} # ac_fn_c_try_link
2600
2601# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2602# ---------------------------------------------------------
2603# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2604# the include files in INCLUDES and setting the cache variable VAR
2605# accordingly.
2606ac_fn_cxx_check_header_mongrel ()
2607{
2608  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2609  if eval \${$3+:} false; then :
2610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2611$as_echo_n "checking for $2... " >&6; }
2612if eval \${$3+:} false; then :
2613  $as_echo_n "(cached) " >&6
2614fi
2615eval ac_res=\$$3
2616	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2617$as_echo "$ac_res" >&6; }
2618else
2619  # Is the header compilable?
2620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2621$as_echo_n "checking $2 usability... " >&6; }
2622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624$4
2625#include <$2>
2626_ACEOF
2627if ac_fn_cxx_try_compile "$LINENO"; then :
2628  ac_header_compiler=yes
2629else
2630  ac_header_compiler=no
2631fi
2632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2634$as_echo "$ac_header_compiler" >&6; }
2635
2636# Is the header present?
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2638$as_echo_n "checking $2 presence... " >&6; }
2639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h.  */
2641#include <$2>
2642_ACEOF
2643if ac_fn_cxx_try_cpp "$LINENO"; then :
2644  ac_header_preproc=yes
2645else
2646  ac_header_preproc=no
2647fi
2648rm -f conftest.err conftest.i conftest.$ac_ext
2649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2650$as_echo "$ac_header_preproc" >&6; }
2651
2652# So?  What about this header?
2653case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2654  yes:no: )
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2656$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2658$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2659    ;;
2660  no:yes:* )
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2662$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2664$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2666$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2668$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2670$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2671( $as_echo "## ----------------------------------------- ##
2672## Report this to build-dev@openjdk.java.net ##
2673## ----------------------------------------- ##"
2674     ) | sed "s/^/$as_me: WARNING:     /" >&2
2675    ;;
2676esac
2677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2678$as_echo_n "checking for $2... " >&6; }
2679if eval \${$3+:} false; then :
2680  $as_echo_n "(cached) " >&6
2681else
2682  eval "$3=\$ac_header_compiler"
2683fi
2684eval ac_res=\$$3
2685	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2686$as_echo "$ac_res" >&6; }
2687fi
2688  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2689
2690} # ac_fn_cxx_check_header_mongrel
2691
2692# ac_fn_cxx_try_run LINENO
2693# ------------------------
2694# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2695# that executables *can* be run.
2696ac_fn_cxx_try_run ()
2697{
2698  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2699  if { { ac_try="$ac_link"
2700case "(($ac_try" in
2701  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2702  *) ac_try_echo=$ac_try;;
2703esac
2704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2705$as_echo "$ac_try_echo"; } >&5
2706  (eval "$ac_link") 2>&5
2707  ac_status=$?
2708  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2709  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2710  { { case "(($ac_try" in
2711  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2712  *) ac_try_echo=$ac_try;;
2713esac
2714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2715$as_echo "$ac_try_echo"; } >&5
2716  (eval "$ac_try") 2>&5
2717  ac_status=$?
2718  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2719  test $ac_status = 0; }; }; then :
2720  ac_retval=0
2721else
2722  $as_echo "$as_me: program exited with status $ac_status" >&5
2723       $as_echo "$as_me: failed program was:" >&5
2724sed 's/^/| /' conftest.$ac_ext >&5
2725
2726       ac_retval=$ac_status
2727fi
2728  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2729  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730  as_fn_set_status $ac_retval
2731
2732} # ac_fn_cxx_try_run
2733
2734# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2735# ---------------------------------------------------------
2736# Tests whether HEADER exists and can be compiled using the include files in
2737# INCLUDES, setting the cache variable VAR accordingly.
2738ac_fn_cxx_check_header_compile ()
2739{
2740  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2742$as_echo_n "checking for $2... " >&6; }
2743if eval \${$3+:} false; then :
2744  $as_echo_n "(cached) " >&6
2745else
2746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2747/* end confdefs.h.  */
2748$4
2749#include <$2>
2750_ACEOF
2751if ac_fn_cxx_try_compile "$LINENO"; then :
2752  eval "$3=yes"
2753else
2754  eval "$3=no"
2755fi
2756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2757fi
2758eval ac_res=\$$3
2759	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2760$as_echo "$ac_res" >&6; }
2761  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2762
2763} # ac_fn_cxx_check_header_compile
2764
2765# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2766# ----------------------------------------------
2767# Tries to find the compile-time value of EXPR in a program that includes
2768# INCLUDES, setting VAR accordingly. Returns whether the value could be
2769# computed
2770ac_fn_cxx_compute_int ()
2771{
2772  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2773  if test "$cross_compiling" = yes; then
2774    # Depending upon the size, compute the lo and hi bounds.
2775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776/* end confdefs.h.  */
2777$4
2778int
2779main ()
2780{
2781static int test_array [1 - 2 * !(($2) >= 0)];
2782test_array [0] = 0;
2783return test_array [0];
2784
2785  ;
2786  return 0;
2787}
2788_ACEOF
2789if ac_fn_cxx_try_compile "$LINENO"; then :
2790  ac_lo=0 ac_mid=0
2791  while :; do
2792    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793/* end confdefs.h.  */
2794$4
2795int
2796main ()
2797{
2798static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2799test_array [0] = 0;
2800return test_array [0];
2801
2802  ;
2803  return 0;
2804}
2805_ACEOF
2806if ac_fn_cxx_try_compile "$LINENO"; then :
2807  ac_hi=$ac_mid; break
2808else
2809  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2810			if test $ac_lo -le $ac_mid; then
2811			  ac_lo= ac_hi=
2812			  break
2813			fi
2814			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2815fi
2816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817  done
2818else
2819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821$4
2822int
2823main ()
2824{
2825static int test_array [1 - 2 * !(($2) < 0)];
2826test_array [0] = 0;
2827return test_array [0];
2828
2829  ;
2830  return 0;
2831}
2832_ACEOF
2833if ac_fn_cxx_try_compile "$LINENO"; then :
2834  ac_hi=-1 ac_mid=-1
2835  while :; do
2836    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2837/* end confdefs.h.  */
2838$4
2839int
2840main ()
2841{
2842static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2843test_array [0] = 0;
2844return test_array [0];
2845
2846  ;
2847  return 0;
2848}
2849_ACEOF
2850if ac_fn_cxx_try_compile "$LINENO"; then :
2851  ac_lo=$ac_mid; break
2852else
2853  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2854			if test $ac_mid -le $ac_hi; then
2855			  ac_lo= ac_hi=
2856			  break
2857			fi
2858			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2859fi
2860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2861  done
2862else
2863  ac_lo= ac_hi=
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868# Binary search between lo and hi bounds.
2869while test "x$ac_lo" != "x$ac_hi"; do
2870  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872/* end confdefs.h.  */
2873$4
2874int
2875main ()
2876{
2877static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2878test_array [0] = 0;
2879return test_array [0];
2880
2881  ;
2882  return 0;
2883}
2884_ACEOF
2885if ac_fn_cxx_try_compile "$LINENO"; then :
2886  ac_hi=$ac_mid
2887else
2888  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2889fi
2890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2891done
2892case $ac_lo in #((
2893?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2894'') ac_retval=1 ;;
2895esac
2896  else
2897    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2898/* end confdefs.h.  */
2899$4
2900static long int longval () { return $2; }
2901static unsigned long int ulongval () { return $2; }
2902#include <stdio.h>
2903#include <stdlib.h>
2904int
2905main ()
2906{
2907
2908  FILE *f = fopen ("conftest.val", "w");
2909  if (! f)
2910    return 1;
2911  if (($2) < 0)
2912    {
2913      long int i = longval ();
2914      if (i != ($2))
2915	return 1;
2916      fprintf (f, "%ld", i);
2917    }
2918  else
2919    {
2920      unsigned long int i = ulongval ();
2921      if (i != ($2))
2922	return 1;
2923      fprintf (f, "%lu", i);
2924    }
2925  /* Do not output a trailing newline, as this causes \r\n confusion
2926     on some platforms.  */
2927  return ferror (f) || fclose (f) != 0;
2928
2929  ;
2930  return 0;
2931}
2932_ACEOF
2933if ac_fn_cxx_try_run "$LINENO"; then :
2934  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2935else
2936  ac_retval=1
2937fi
2938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2939  conftest.$ac_objext conftest.beam conftest.$ac_ext
2940rm -f conftest.val
2941
2942  fi
2943  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2944  as_fn_set_status $ac_retval
2945
2946} # ac_fn_cxx_compute_int
2947
2948# ac_fn_cxx_try_link LINENO
2949# -------------------------
2950# Try to link conftest.$ac_ext, and return whether this succeeded.
2951ac_fn_cxx_try_link ()
2952{
2953  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2954  rm -f conftest.$ac_objext conftest$ac_exeext
2955  if { { ac_try="$ac_link"
2956case "(($ac_try" in
2957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2958  *) ac_try_echo=$ac_try;;
2959esac
2960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2961$as_echo "$ac_try_echo"; } >&5
2962  (eval "$ac_link") 2>conftest.err
2963  ac_status=$?
2964  if test -s conftest.err; then
2965    grep -v '^ *+' conftest.err >conftest.er1
2966    cat conftest.er1 >&5
2967    mv -f conftest.er1 conftest.err
2968  fi
2969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2970  test $ac_status = 0; } && {
2971	 test -z "$ac_cxx_werror_flag" ||
2972	 test ! -s conftest.err
2973       } && test -s conftest$ac_exeext && {
2974	 test "$cross_compiling" = yes ||
2975	 test -x conftest$ac_exeext
2976       }; then :
2977  ac_retval=0
2978else
2979  $as_echo "$as_me: failed program was:" >&5
2980sed 's/^/| /' conftest.$ac_ext >&5
2981
2982	ac_retval=1
2983fi
2984  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2985  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2986  # interfere with the next link command; also delete a directory that is
2987  # left behind by Apple's compiler.  We do this before executing the actions.
2988  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2989  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990  as_fn_set_status $ac_retval
2991
2992} # ac_fn_cxx_try_link
2993
2994# ac_fn_cxx_check_func LINENO FUNC VAR
2995# ------------------------------------
2996# Tests whether FUNC exists, setting the cache variable VAR accordingly
2997ac_fn_cxx_check_func ()
2998{
2999  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3001$as_echo_n "checking for $2... " >&6; }
3002if eval \${$3+:} false; then :
3003  $as_echo_n "(cached) " >&6
3004else
3005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3006/* end confdefs.h.  */
3007/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3008   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3009#define $2 innocuous_$2
3010
3011/* System header to define __stub macros and hopefully few prototypes,
3012    which can conflict with char $2 (); below.
3013    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3014    <limits.h> exists even on freestanding compilers.  */
3015
3016#ifdef __STDC__
3017# include <limits.h>
3018#else
3019# include <assert.h>
3020#endif
3021
3022#undef $2
3023
3024/* Override any GCC internal prototype to avoid an error.
3025   Use char because int might match the return type of a GCC
3026   builtin and then its argument prototype would still apply.  */
3027#ifdef __cplusplus
3028extern "C"
3029#endif
3030char $2 ();
3031/* The GNU C library defines this for functions which it implements
3032    to always fail with ENOSYS.  Some functions are actually named
3033    something starting with __ and the normal name is an alias.  */
3034#if defined __stub_$2 || defined __stub___$2
3035choke me
3036#endif
3037
3038int
3039main ()
3040{
3041return $2 ();
3042  ;
3043  return 0;
3044}
3045_ACEOF
3046if ac_fn_cxx_try_link "$LINENO"; then :
3047  eval "$3=yes"
3048else
3049  eval "$3=no"
3050fi
3051rm -f core conftest.err conftest.$ac_objext \
3052    conftest$ac_exeext conftest.$ac_ext
3053fi
3054eval ac_res=\$$3
3055	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3056$as_echo "$ac_res" >&6; }
3057  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3058
3059} # ac_fn_cxx_check_func
3060
3061# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3062# -------------------------------------------------------
3063# Tests whether HEADER exists and can be compiled using the include files in
3064# INCLUDES, setting the cache variable VAR accordingly.
3065ac_fn_c_check_header_compile ()
3066{
3067  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3069$as_echo_n "checking for $2... " >&6; }
3070if eval \${$3+:} false; then :
3071  $as_echo_n "(cached) " >&6
3072else
3073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3074/* end confdefs.h.  */
3075$4
3076#include <$2>
3077_ACEOF
3078if ac_fn_c_try_compile "$LINENO"; then :
3079  eval "$3=yes"
3080else
3081  eval "$3=no"
3082fi
3083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084fi
3085eval ac_res=\$$3
3086	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3087$as_echo "$ac_res" >&6; }
3088  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3089
3090} # ac_fn_c_check_header_compile
3091cat >config.log <<_ACEOF
3092This file contains any messages produced by compilers while
3093running configure, to aid debugging if configure makes a mistake.
3094
3095It was created by OpenJDK $as_me jdk9, which was
3096generated by GNU Autoconf 2.69.  Invocation command line was
3097
3098  $ $0 $@
3099
3100_ACEOF
3101exec 5>>config.log
3102{
3103cat <<_ASUNAME
3104## --------- ##
3105## Platform. ##
3106## --------- ##
3107
3108hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3109uname -m = `(uname -m) 2>/dev/null || echo unknown`
3110uname -r = `(uname -r) 2>/dev/null || echo unknown`
3111uname -s = `(uname -s) 2>/dev/null || echo unknown`
3112uname -v = `(uname -v) 2>/dev/null || echo unknown`
3113
3114/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3115/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3116
3117/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3118/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3119/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3120/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3121/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3122/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3123/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3124
3125_ASUNAME
3126
3127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128for as_dir in $PATH
3129do
3130  IFS=$as_save_IFS
3131  test -z "$as_dir" && as_dir=.
3132    $as_echo "PATH: $as_dir"
3133  done
3134IFS=$as_save_IFS
3135
3136} >&5
3137
3138cat >&5 <<_ACEOF
3139
3140
3141## ----------- ##
3142## Core tests. ##
3143## ----------- ##
3144
3145_ACEOF
3146
3147
3148# Keep a trace of the command line.
3149# Strip out --no-create and --no-recursion so they do not pile up.
3150# Strip out --silent because we don't want to record it for future runs.
3151# Also quote any args containing shell meta-characters.
3152# Make two passes to allow for proper duplicate-argument suppression.
3153ac_configure_args=
3154ac_configure_args0=
3155ac_configure_args1=
3156ac_must_keep_next=false
3157for ac_pass in 1 2
3158do
3159  for ac_arg
3160  do
3161    case $ac_arg in
3162    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3163    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3164    | -silent | --silent | --silen | --sile | --sil)
3165      continue ;;
3166    *\'*)
3167      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3168    esac
3169    case $ac_pass in
3170    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3171    2)
3172      as_fn_append ac_configure_args1 " '$ac_arg'"
3173      if test $ac_must_keep_next = true; then
3174	ac_must_keep_next=false # Got value, back to normal.
3175      else
3176	case $ac_arg in
3177	  *=* | --config-cache | -C | -disable-* | --disable-* \
3178	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3179	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3180	  | -with-* | --with-* | -without-* | --without-* | --x)
3181	    case "$ac_configure_args0 " in
3182	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3183	    esac
3184	    ;;
3185	  -* ) ac_must_keep_next=true ;;
3186	esac
3187      fi
3188      as_fn_append ac_configure_args " '$ac_arg'"
3189      ;;
3190    esac
3191  done
3192done
3193{ ac_configure_args0=; unset ac_configure_args0;}
3194{ ac_configure_args1=; unset ac_configure_args1;}
3195
3196# When interrupted or exit'd, cleanup temporary files, and complete
3197# config.log.  We remove comments because anyway the quotes in there
3198# would cause problems or look ugly.
3199# WARNING: Use '\'' to represent an apostrophe within the trap.
3200# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3201trap 'exit_status=$?
3202  # Save into config.log some information that might help in debugging.
3203  {
3204    echo
3205
3206    $as_echo "## ---------------- ##
3207## Cache variables. ##
3208## ---------------- ##"
3209    echo
3210    # The following way of writing the cache mishandles newlines in values,
3211(
3212  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3213    eval ac_val=\$$ac_var
3214    case $ac_val in #(
3215    *${as_nl}*)
3216      case $ac_var in #(
3217      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3218$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3219      esac
3220      case $ac_var in #(
3221      _ | IFS | as_nl) ;; #(
3222      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3223      *) { eval $ac_var=; unset $ac_var;} ;;
3224      esac ;;
3225    esac
3226  done
3227  (set) 2>&1 |
3228    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3229    *${as_nl}ac_space=\ *)
3230      sed -n \
3231	"s/'\''/'\''\\\\'\'''\''/g;
3232	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3233      ;; #(
3234    *)
3235      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3236      ;;
3237    esac |
3238    sort
3239)
3240    echo
3241
3242    $as_echo "## ----------------- ##
3243## Output variables. ##
3244## ----------------- ##"
3245    echo
3246    for ac_var in $ac_subst_vars
3247    do
3248      eval ac_val=\$$ac_var
3249      case $ac_val in
3250      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3251      esac
3252      $as_echo "$ac_var='\''$ac_val'\''"
3253    done | sort
3254    echo
3255
3256    if test -n "$ac_subst_files"; then
3257      $as_echo "## ------------------- ##
3258## File substitutions. ##
3259## ------------------- ##"
3260      echo
3261      for ac_var in $ac_subst_files
3262      do
3263	eval ac_val=\$$ac_var
3264	case $ac_val in
3265	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3266	esac
3267	$as_echo "$ac_var='\''$ac_val'\''"
3268      done | sort
3269      echo
3270    fi
3271
3272    if test -s confdefs.h; then
3273      $as_echo "## ----------- ##
3274## confdefs.h. ##
3275## ----------- ##"
3276      echo
3277      cat confdefs.h
3278      echo
3279    fi
3280    test "$ac_signal" != 0 &&
3281      $as_echo "$as_me: caught signal $ac_signal"
3282    $as_echo "$as_me: exit $exit_status"
3283  } >&5
3284  rm -f core *.core core.conftest.* &&
3285    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3286    exit $exit_status
3287' 0
3288for ac_signal in 1 2 13 15; do
3289  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3290done
3291ac_signal=0
3292
3293# confdefs.h avoids OS command line length limits that DEFS can exceed.
3294rm -f -r conftest* confdefs.h
3295
3296$as_echo "/* confdefs.h */" > confdefs.h
3297
3298# Predefined preprocessor variables.
3299
3300cat >>confdefs.h <<_ACEOF
3301#define PACKAGE_NAME "$PACKAGE_NAME"
3302_ACEOF
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_VERSION "$PACKAGE_VERSION"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_STRING "$PACKAGE_STRING"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_URL "$PACKAGE_URL"
3322_ACEOF
3323
3324
3325# Let the site file select an alternate cache file if it wants to.
3326# Prefer an explicitly selected file to automatically selected ones.
3327ac_site_file1=NONE
3328ac_site_file2=NONE
3329if test -n "$CONFIG_SITE"; then
3330  # We do not want a PATH search for config.site.
3331  case $CONFIG_SITE in #((
3332    -*)  ac_site_file1=./$CONFIG_SITE;;
3333    */*) ac_site_file1=$CONFIG_SITE;;
3334    *)   ac_site_file1=./$CONFIG_SITE;;
3335  esac
3336elif test "x$prefix" != xNONE; then
3337  ac_site_file1=$prefix/share/config.site
3338  ac_site_file2=$prefix/etc/config.site
3339else
3340  ac_site_file1=$ac_default_prefix/share/config.site
3341  ac_site_file2=$ac_default_prefix/etc/config.site
3342fi
3343for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3344do
3345  test "x$ac_site_file" = xNONE && continue
3346  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3347    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3348$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3349    sed 's/^/| /' "$ac_site_file" >&5
3350    . "$ac_site_file" \
3351      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3353as_fn_error $? "failed to load site script $ac_site_file
3354See \`config.log' for more details" "$LINENO" 5; }
3355  fi
3356done
3357
3358if test -r "$cache_file"; then
3359  # Some versions of bash will fail to source /dev/null (special files
3360  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3361  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3362    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3363$as_echo "$as_me: loading cache $cache_file" >&6;}
3364    case $cache_file in
3365      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3366      *)                      . "./$cache_file";;
3367    esac
3368  fi
3369else
3370  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3371$as_echo "$as_me: creating cache $cache_file" >&6;}
3372  >$cache_file
3373fi
3374
3375# Check that the precious variables saved in the cache have kept the same
3376# value.
3377ac_cache_corrupted=false
3378for ac_var in $ac_precious_vars; do
3379  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3380  eval ac_new_set=\$ac_env_${ac_var}_set
3381  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3382  eval ac_new_val=\$ac_env_${ac_var}_value
3383  case $ac_old_set,$ac_new_set in
3384    set,)
3385      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3386$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3387      ac_cache_corrupted=: ;;
3388    ,set)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,);;
3393    *)
3394      if test "x$ac_old_val" != "x$ac_new_val"; then
3395	# differences in whitespace do not lead to failure.
3396	ac_old_val_w=`echo x $ac_old_val`
3397	ac_new_val_w=`echo x $ac_new_val`
3398	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3399	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3400$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3401	  ac_cache_corrupted=:
3402	else
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3404$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3405	  eval $ac_var=\$ac_old_val
3406	fi
3407	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3408$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3409	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3410$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3411      fi;;
3412  esac
3413  # Pass precious variables to config.status.
3414  if test "$ac_new_set" = set; then
3415    case $ac_new_val in
3416    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3417    *) ac_arg=$ac_var=$ac_new_val ;;
3418    esac
3419    case " $ac_configure_args " in
3420      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3421      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3422    esac
3423  fi
3424done
3425if $ac_cache_corrupted; then
3426  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3428  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3429$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3430  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3431fi
3432## -------------------- ##
3433## Main body of script. ##
3434## -------------------- ##
3435
3436ac_ext=c
3437ac_cpp='$CPP $CPPFLAGS'
3438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3440ac_compiler_gnu=$ac_cv_c_compiler_gnu
3441
3442
3443
3444ac_aux_dir=
3445for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3446  if test -f "$ac_dir/install-sh"; then
3447    ac_aux_dir=$ac_dir
3448    ac_install_sh="$ac_aux_dir/install-sh -c"
3449    break
3450  elif test -f "$ac_dir/install.sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install.sh -c"
3453    break
3454  elif test -f "$ac_dir/shtool"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/shtool install -c"
3457    break
3458  fi
3459done
3460if test -z "$ac_aux_dir"; then
3461  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
3462fi
3463
3464# These three variables are undocumented and unsupported,
3465# and are intended to be withdrawn in a future Autoconf release.
3466# They can cause serious problems if a builder's source tree is in a directory
3467# whose full name contains unusual characters.
3468ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3469ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3470ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3471
3472
3473# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3474
3475#
3476# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3477# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3478#
3479# This code is free software; you can redistribute it and/or modify it
3480# under the terms of the GNU General Public License version 2 only, as
3481# published by the Free Software Foundation.  Oracle designates this
3482# particular file as subject to the "Classpath" exception as provided
3483# by Oracle in the LICENSE file that accompanied this code.
3484#
3485# This code is distributed in the hope that it will be useful, but WITHOUT
3486# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3487# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3488# version 2 for more details (a copy is included in the LICENSE file that
3489# accompanied this code).
3490#
3491# You should have received a copy of the GNU General Public License version
3492# 2 along with this work; if not, write to the Free Software Foundation,
3493# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3494#
3495# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3496# or visit www.oracle.com if you need additional information or have any
3497# questions.
3498#
3499
3500#
3501# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3502#
3503# This program is free software; you can redistribute it and/or modify
3504# it under the terms of the GNU General Public License as published by
3505# the Free Software Foundation; either version 2 of the License, or
3506# (at your option) any later version.
3507#
3508# This program is distributed in the hope that it will be useful, but
3509# WITHOUT ANY WARRANTY; without even the implied warranty of
3510# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3511# General Public License for more details.
3512#
3513# You should have received a copy of the GNU General Public License
3514# along with this program; if not, write to the Free Software
3515# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3516#
3517# As a special exception to the GNU General Public License, if you
3518# distribute this file as part of a program that contains a
3519# configuration script generated by Autoconf, you may include it under
3520# the same distribution terms that you use for the rest of that program.
3521
3522# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3523# ----------------------------------
3524# PKG_PROG_PKG_CONFIG
3525
3526# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3527#
3528# Check to see whether a particular set of modules exists.  Similar
3529# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3530#
3531#
3532# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3533# this or PKG_CHECK_MODULES is called, or make sure to call
3534# PKG_CHECK_EXISTS manually
3535# --------------------------------------------------------------
3536
3537
3538
3539# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3540# ---------------------------------------------
3541# _PKG_CONFIG
3542
3543# _PKG_SHORT_ERRORS_SUPPORTED
3544# -----------------------------
3545# _PKG_SHORT_ERRORS_SUPPORTED
3546
3547
3548# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3549# [ACTION-IF-NOT-FOUND])
3550#
3551#
3552# Note that if there is a possibility the first call to
3553# PKG_CHECK_MODULES might not happen, you should be sure to include an
3554# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3555#
3556#
3557# --------------------------------------------------------------
3558# PKG_CHECK_MODULES
3559
3560
3561# Include these first...
3562#
3563# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565#
3566# This code is free software; you can redistribute it and/or modify it
3567# under the terms of the GNU General Public License version 2 only, as
3568# published by the Free Software Foundation.  Oracle designates this
3569# particular file as subject to the "Classpath" exception as provided
3570# by Oracle in the LICENSE file that accompanied this code.
3571#
3572# This code is distributed in the hope that it will be useful, but WITHOUT
3573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575# version 2 for more details (a copy is included in the LICENSE file that
3576# accompanied this code).
3577#
3578# You should have received a copy of the GNU General Public License version
3579# 2 along with this work; if not, write to the Free Software Foundation,
3580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581#
3582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583# or visit www.oracle.com if you need additional information or have any
3584# questions.
3585#
3586
3587# Create a function/macro that takes a series of named arguments. The call is
3588# similar to AC_DEFUN, but the setup of the function looks like this:
3589# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3590# ... do something
3591#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3592# ])
3593# A star (*) in front of a named argument means that it is required and it's
3594# presence will be verified. To pass e.g. the first value as a normal indexed
3595# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3596# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3597# "ARG_FOO".
3598#
3599# The generated function can be called like this:
3600# MYFUNC(FOO: [foo-val],
3601#     BAR: [
3602#         $ECHO hello world
3603#     ])
3604# Note that the argument value must start on the same line as the argument name.
3605#
3606# Argument 1: Name of the function to define
3607# Argument 2: List of legal named arguments, with a * prefix for required arguments
3608# Argument 3: Argument array to treat as named, typically $@
3609# Argument 4: The main function body
3610
3611
3612# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3613# If so, then append $1 to $2 \
3614# Also set JVM_ARG_OK to true/false depending on outcome.
3615
3616
3617# Appends a string to a path variable, only adding the : when needed.
3618
3619
3620# Prepends a string to a path variable, only adding the : when needed.
3621
3622
3623# This will make sure the given variable points to a full and proper
3624# path. This means:
3625# 1) There will be no spaces in the path. On unix platforms,
3626#    spaces in the path will result in an error. On Windows,
3627#    the path will be rewritten using short-style to be space-free.
3628# 2) The path will be absolute, and it will be in unix-style (on
3629#     cygwin).
3630# $1: The name of the variable to fix
3631
3632
3633# This will make sure the given variable points to a executable
3634# with a full and proper path. This means:
3635# 1) There will be no spaces in the path. On unix platforms,
3636#    spaces in the path will result in an error. On Windows,
3637#    the path will be rewritten using short-style to be space-free.
3638# 2) The path will be absolute, and it will be in unix-style (on
3639#     cygwin).
3640# Any arguments given to the executable is preserved.
3641# If the input variable does not have a directory specification, then
3642# it need to be in the PATH.
3643# $1: The name of the variable to fix
3644
3645
3646
3647
3648# Register a --with argument but mark it as deprecated
3649# $1: The name of the with argument to deprecate, not including --with-
3650
3651
3652# Register a --enable argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --enable-
3654# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3655# $3: Messages to user.
3656
3657
3658
3659
3660# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3661# $1: variable to check
3662
3663
3664# Check that there are no unprocessed overridden variables left.
3665# If so, they are an incorrect argument and we will exit with an error.
3666
3667
3668# Setup a tool for the given variable. If correctly specified by the user,
3669# use that value, otherwise search for the tool using the supplied code snippet.
3670# $1: variable to set
3671# $2: code snippet to call to look for the tool
3672# $3: code snippet to call if variable was used to find tool
3673
3674
3675# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3676# $1: variable to set
3677# $2: executable name (or list of names) to look for
3678# $3: [path]
3679
3680
3681# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3682# $1: variable to set
3683# $2: executable name (or list of names) to look for
3684
3685
3686# Like BASIC_PATH_PROGS but fails if no tool was found.
3687# $1: variable to set
3688# $2: executable name (or list of names) to look for
3689# $3: [path]
3690
3691
3692# Like BASIC_SETUP_TOOL but fails if no tool was found.
3693# $1: variable to set
3694# $2: autoconf macro to call to look for the special tool
3695
3696
3697# Setup the most fundamental tools that relies on not much else to set up,
3698# but is used by much of the early bootstrap code.
3699
3700
3701# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3702
3703
3704# Evaluates platform specific overrides for devkit variables.
3705# $1: Name of variable
3706
3707
3708
3709
3710
3711
3712#%%% Simple tools %%%
3713
3714# Check if we have found a usable version of make
3715# $1: the path to a potential make binary (or empty)
3716# $2: the description on how we found this
3717
3718
3719
3720
3721# Goes looking for a usable version of GNU make.
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732# Check if build directory is on local disk. If not possible to determine,
3733# we prefer to claim it's local.
3734# Argument 1: directory to test
3735# Argument 2: what to do if it is on local disk
3736# Argument 3: what to do otherwise (remote disk or failure)
3737
3738
3739# Check that source files have basic read permissions set. This might
3740# not be the case in cygwin in certain conditions.
3741
3742
3743
3744
3745# Check for support for specific options in bash
3746
3747
3748################################################################################
3749#
3750# Default make target
3751#
3752
3753
3754# Code to run after AC_OUTPUT
3755
3756
3757#
3758# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3759# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3760#
3761# This code is free software; you can redistribute it and/or modify it
3762# under the terms of the GNU General Public License version 2 only, as
3763# published by the Free Software Foundation.  Oracle designates this
3764# particular file as subject to the "Classpath" exception as provided
3765# by Oracle in the LICENSE file that accompanied this code.
3766#
3767# This code is distributed in the hope that it will be useful, but WITHOUT
3768# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3769# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3770# version 2 for more details (a copy is included in the LICENSE file that
3771# accompanied this code).
3772#
3773# You should have received a copy of the GNU General Public License version
3774# 2 along with this work; if not, write to the Free Software Foundation,
3775# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3776#
3777# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3778# or visit www.oracle.com if you need additional information or have any
3779# questions.
3780#
3781
3782
3783
3784
3785
3786# Helper function which possibly converts a path using DOS-style short mode.
3787# If so, the updated path is stored in $new_path.
3788# $1: The path to check
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# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3797# and could probably be heavily simplified. However, all changes in this
3798# area tend to need lot of testing in different scenarios, and in lack of
3799# proper unit testing, cleaning this up has not been deemed worth the effort
3800# at the moment.
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3811
3812
3813
3814
3815# ... then the rest
3816#
3817# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3818# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3819#
3820# This code is free software; you can redistribute it and/or modify it
3821# under the terms of the GNU General Public License version 2 only, as
3822# published by the Free Software Foundation.  Oracle designates this
3823# particular file as subject to the "Classpath" exception as provided
3824# by Oracle in the LICENSE file that accompanied this code.
3825#
3826# This code is distributed in the hope that it will be useful, but WITHOUT
3827# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3828# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3829# version 2 for more details (a copy is included in the LICENSE file that
3830# accompanied this code).
3831#
3832# You should have received a copy of the GNU General Public License version
3833# 2 along with this work; if not, write to the Free Software Foundation,
3834# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3835#
3836# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3837# or visit www.oracle.com if you need additional information or have any
3838# questions.
3839#
3840
3841########################################################################
3842# This file handles detection of the Boot JDK. The Boot JDK detection
3843# process has been developed as a response to solve a complex real-world
3844# problem. Initially, it was simple, but it has grown as platform after
3845# platform, idiosyncracy after idiosyncracy has been supported.
3846#
3847# The basic idea is this:
3848# 1) You need an acceptable *) JDK to use as a Boot JDK
3849# 2) There are several ways to locate a JDK, that are mostly platform
3850#    dependent **)
3851# 3) You can have multiple JDKs installed
3852# 4) If possible, configure should try to dig out an acceptable JDK
3853#    automatically, without having to resort to command-line options
3854#
3855# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3856#     javac) and not a JRE, etc.
3857#
3858# **) On Windows we typically use a well-known path.
3859#     On MacOSX we typically use the tool java_home.
3860#     On Linux we typically find javac in the $PATH, and then follow a
3861#     chain of symlinks that often ends up in a real JDK.
3862#
3863# This leads to the code where we check in different ways to locate a
3864# JDK, and if one is found, check if it is acceptable. If not, we print
3865# our reasons for rejecting it (useful when debugging non-working
3866# configure situations) and continue checking the next one.
3867########################################################################
3868
3869# Execute the check given as argument, and verify the result
3870# If the Boot JDK was previously found, do nothing
3871# $1 A command line (typically autoconf macro) to execute
3872
3873
3874# Test: Is bootjdk explicitly set by command line arguments?
3875
3876
3877# Test: Is $JAVA_HOME set?
3878
3879
3880# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3881
3882
3883# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3884# $1: Argument to the java_home binary (optional)
3885
3886
3887# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3888
3889
3890# Look for a jdk in the given path. If there are multiple, try to select the newest.
3891# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3892# $1 = Path to directory containing jdk installations.
3893# $2 = String to append to the found JDK directory to get the proper JDK home
3894
3895
3896# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3897# environmental variable as base for where to look.
3898# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3899
3900
3901# Test: Is there a JDK installed in default, well-known locations?
3902
3903
3904# Check that a command-line tool in the Boot JDK is correct
3905# $1 = name of variable to assign
3906# $2 = name of binary
3907
3908
3909###############################################################################
3910#
3911# We need a Boot JDK to bootstrap the build.
3912#
3913
3914
3915
3916
3917
3918# BUILD_JDK: the location of the latest JDK that can run
3919#   on the host system and supports the target class file version
3920#   generated in this JDK build.  This variable should only be
3921#   used after the launchers are built.
3922#
3923
3924# Execute the check given as argument, and verify the result.
3925# If the JDK was previously found, do nothing.
3926# $1 A command line (typically autoconf macro) to execute
3927
3928
3929# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3930# is different than the host system doing the build (e.g. cross-compilation),
3931# a special BUILD_JDK is built as part of the build process.  An external
3932# prebuilt BUILD_JDK can also be supplied.
3933
3934
3935#
3936# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3937# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3938#
3939# This code is free software; you can redistribute it and/or modify it
3940# under the terms of the GNU General Public License version 2 only, as
3941# published by the Free Software Foundation.  Oracle designates this
3942# particular file as subject to the "Classpath" exception as provided
3943# by Oracle in the LICENSE file that accompanied this code.
3944#
3945# This code is distributed in the hope that it will be useful, but WITHOUT
3946# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3947# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3948# version 2 for more details (a copy is included in the LICENSE file that
3949# accompanied this code).
3950#
3951# You should have received a copy of the GNU General Public License version
3952# 2 along with this work; if not, write to the Free Software Foundation,
3953# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3954#
3955# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3956# or visit www.oracle.com if you need additional information or have any
3957# questions.
3958#
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976################################################################################
3977#
3978# Runs icecc-create-env once and prints the error if it fails
3979#
3980# $1: arguments to icecc-create-env
3981# $2: log file
3982#
3983
3984
3985################################################################################
3986#
3987# Optionally enable distributed compilation of native code using icecc/icecream
3988#
3989
3990
3991
3992
3993
3994
3995
3996#
3997# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3998# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3999#
4000# This code is free software; you can redistribute it and/or modify it
4001# under the terms of the GNU General Public License version 2 only, as
4002# published by the Free Software Foundation.  Oracle designates this
4003# particular file as subject to the "Classpath" exception as provided
4004# by Oracle in the LICENSE file that accompanied this code.
4005#
4006# This code is distributed in the hope that it will be useful, but WITHOUT
4007# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4008# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4009# version 2 for more details (a copy is included in the LICENSE file that
4010# accompanied this code).
4011#
4012# You should have received a copy of the GNU General Public License version
4013# 2 along with this work; if not, write to the Free Software Foundation,
4014# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4015#
4016# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4017# or visit www.oracle.com if you need additional information or have any
4018# questions.
4019#
4020
4021################################################################################
4022#
4023# Setup ABI profile (for arm)
4024#
4025
4026
4027# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4028# corresponding configure arguments instead
4029
4030
4031# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4032# that configure can use them while detecting compilers.
4033# TOOLCHAIN_TYPE is available here.
4034# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4035
4036
4037
4038
4039
4040
4041# Documentation on common flags used for solstudio in HIGHEST.
4042#
4043# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4044#          done with care, there are some assumptions below that need to
4045#          be understood about the use of pointers, and IEEE behavior.
4046#
4047# -fns: Use non-standard floating point mode (not IEEE 754)
4048# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4049# -fsingle: Use single precision floating point with 'float'
4050# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4051#   (Source with excessing pointer casting and data access with mixed
4052#    pointer types are not recommended)
4053# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4054#   (If you expect perfect errno behavior, do not use this)
4055# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4056# -xrestrict: Pointer parameters to functions do not overlap
4057#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4058#    If you pass in multiple pointers to the same data, do not use this)
4059# -xlibmil: Inline some library routines
4060#   (If you expect perfect errno behavior, do not use this)
4061# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4062#   (If you expect perfect errno behavior, do not use this)
4063#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4064
4065    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4066    # Bug?
4067    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4068    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4069    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4070    #fi
4071
4072
4073
4074
4075
4076
4077################################################################################
4078# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4079#      conditionals against.
4080# $2 - Optional prefix for each variable defined.
4081
4082
4083# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084#                                  IF_FALSE: [RUN-IF-FALSE])
4085# ------------------------------------------------------------
4086# Check that the C compiler supports an argument
4087
4088
4089
4090
4091# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4092#                                    IF_FALSE: [RUN-IF-FALSE])
4093# ------------------------------------------------------------
4094# Check that the C++ compiler supports an argument
4095
4096
4097
4098
4099# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4100#                                IF_FALSE: [RUN-IF-FALSE])
4101# ------------------------------------------------------------
4102# Check that the C and C++ compilers support an argument
4103
4104
4105
4106
4107# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4108#                                   IF_FALSE: [RUN-IF-FALSE])
4109# ------------------------------------------------------------
4110# Check that the linker support an argument
4111
4112
4113
4114
4115
4116
4117# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4118# Arguments:
4119# $1 - Optional prefix for each variable defined.
4120
4121
4122#
4123# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125#
4126# This code is free software; you can redistribute it and/or modify it
4127# under the terms of the GNU General Public License version 2 only, as
4128# published by the Free Software Foundation.  Oracle designates this
4129# particular file as subject to the "Classpath" exception as provided
4130# by Oracle in the LICENSE file that accompanied this code.
4131#
4132# This code is distributed in the hope that it will be useful, but WITHOUT
4133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135# version 2 for more details (a copy is included in the LICENSE file that
4136# accompanied this code).
4137#
4138# You should have received a copy of the GNU General Public License version
4139# 2 along with this work; if not, write to the Free Software Foundation,
4140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141#
4142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143# or visit www.oracle.com if you need additional information or have any
4144# questions.
4145#
4146
4147
4148
4149
4150
4151cygwin_help() {
4152  case $1 in
4153    unzip)
4154      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4155      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4156      ;;
4157    zip)
4158      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160      ;;
4161    make)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    freetype)
4166      HELP_MSG="
4167The freetype library can now be build during the configure process.
4168Download the freetype sources and unpack them into an arbitrary directory:
4169
4170wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4171tar -xzf freetype-2.5.3.tar.gz
4172
4173Then run configure with '--with-freetype-src=<freetype_src>'. This will
4174automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4175builds or into '<freetype_src>/lib32' for 32-bit builds.
4176Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4177and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4178
4179Alternatively you can unpack the sources like this to use the default directory:
4180
4181tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4182      ;;
4183  esac
4184}
4185
4186msys_help() {
4187  PKGHANDLER_COMMAND=""
4188}
4189
4190apt_help() {
4191  case $1 in
4192    reduced)
4193      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4194    devkit)
4195      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4196    openjdk)
4197      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4198    alsa)
4199      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4200    cups)
4201      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4202    freetype)
4203      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4204    ffi)
4205      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4206    x11)
4207      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4208    ccache)
4209      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4210    dtrace)
4211      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4212    elf)
4213      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4214  esac
4215}
4216
4217yum_help() {
4218  case $1 in
4219    devkit)
4220      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4221    openjdk)
4222      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4223    alsa)
4224      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4225    cups)
4226      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4227    freetype)
4228      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4229    x11)
4230      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4231    ccache)
4232      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4233    elf)
4234      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4235  esac
4236}
4237
4238brew_help() {
4239  case $1 in
4240    openjdk)
4241      PKGHANDLER_COMMAND="brew cask install java" ;;
4242    freetype)
4243      PKGHANDLER_COMMAND="brew install freetype" ;;
4244    ccache)
4245      PKGHANDLER_COMMAND="brew install ccache" ;;
4246  esac
4247}
4248
4249port_help() {
4250  PKGHANDLER_COMMAND=""
4251}
4252
4253pkgutil_help() {
4254  PKGHANDLER_COMMAND=""
4255}
4256
4257pkgadd_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261# This function will check if we're called from the "configure" wrapper while
4262# printing --help. If so, we will print out additional information that can
4263# only be extracted within the autoconf script, and then exit. This must be
4264# called at the very beginning in configure.ac.
4265
4266
4267
4268
4269
4270
4271#
4272# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4273# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4274#
4275# This code is free software; you can redistribute it and/or modify it
4276# under the terms of the GNU General Public License version 2 only, as
4277# published by the Free Software Foundation.  Oracle designates this
4278# particular file as subject to the "Classpath" exception as provided
4279# by Oracle in the LICENSE file that accompanied this code.
4280#
4281# This code is distributed in the hope that it will be useful, but WITHOUT
4282# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4283# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4284# version 2 for more details (a copy is included in the LICENSE file that
4285# accompanied this code).
4286#
4287# You should have received a copy of the GNU General Public License version
4288# 2 along with this work; if not, write to the Free Software Foundation,
4289# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4290#
4291# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4292# or visit www.oracle.com if you need additional information or have any
4293# questions.
4294#
4295
4296# All valid JVM features, regardless of platform
4297VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4298    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4299    static-build link-time-opt aot"
4300
4301# All valid JVM variants
4302VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4303
4304###############################################################################
4305# Check if the specified JVM variant should be built. To be used in shell if
4306# constructs, like this:
4307# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4308#
4309# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4310
4311# Definition kept in one line to allow inlining in if statements.
4312# Additional [] needed to keep m4 from mangling shell constructs.
4313
4314
4315###############################################################################
4316# Check if the specified JVM features are explicitly enabled. To be used in
4317# shell if constructs, like this:
4318# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4319#
4320# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4321
4322# Definition kept in one line to allow inlining in if statements.
4323# Additional [] needed to keep m4 from mangling shell constructs.
4324
4325
4326###############################################################################
4327# Check which variants of the JVM that we want to build. Available variants are:
4328#   server: normal interpreter, and a tiered C1/C2 compiler
4329#   client: normal interpreter, and C1 (no C2 compiler)
4330#   minimal: reduced form of client with optional features stripped out
4331#   core: normal interpreter only, no compiler
4332#   zero: C++ based interpreter only, no compiler
4333#   zeroshark: C++ based interpreter, and a llvm-based compiler
4334#   custom: baseline JVM with no default features
4335#
4336
4337
4338###############################################################################
4339# Check if dtrace should be enabled and has all prerequisites present.
4340#
4341
4342
4343################################################################################
4344# Check if AOT should be enabled
4345#
4346
4347
4348###############################################################################
4349# Set up all JVM features for each JVM variant.
4350#
4351
4352
4353###############################################################################
4354# Validate JVM features once all setup is complete, including custom setup.
4355#
4356
4357
4358################################################################################
4359#
4360# Specify which sources will be used to build the 64-bit ARM port
4361#
4362# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4363# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4364#
4365
4366
4367
4368################################################################################
4369# Check if gtest should be built
4370#
4371
4372
4373#
4374# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4375# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4376#
4377# This code is free software; you can redistribute it and/or modify it
4378# under the terms of the GNU General Public License version 2 only, as
4379# published by the Free Software Foundation.  Oracle designates this
4380# particular file as subject to the "Classpath" exception as provided
4381# by Oracle in the LICENSE file that accompanied this code.
4382#
4383# This code is distributed in the hope that it will be useful, but WITHOUT
4384# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4385# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4386# version 2 for more details (a copy is included in the LICENSE file that
4387# accompanied this code).
4388#
4389# You should have received a copy of the GNU General Public License version
4390# 2 along with this work; if not, write to the Free Software Foundation,
4391# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4392#
4393# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4394# or visit www.oracle.com if you need additional information or have any
4395# questions.
4396#
4397
4398###############################################################################
4399# Check which variant of the JDK that we want to build.
4400# Currently we have:
4401#    normal:   standard edition
4402# but the custom make system may add other variants
4403#
4404# Effectively the JDK variant gives a name to a specific set of
4405# modules to compile into the JDK.
4406
4407
4408###############################################################################
4409# Set the debug level
4410#    release: no debug information, all optimizations, no asserts.
4411#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4412#    fastdebug: debug information (-g), all optimizations, all asserts
4413#    slowdebug: debug information (-g), no optimizations, all asserts
4414
4415
4416###############################################################################
4417#
4418# Should we build only OpenJDK even if closed sources are present?
4419#
4420
4421
4422
4423
4424###############################################################################
4425#
4426# Enable or disable the elliptic curve crypto implementation
4427#
4428
4429
4430
4431
4432################################################################################
4433#
4434# Gcov coverage data for hotspot
4435#
4436
4437
4438################################################################################
4439#
4440# Static build support.  When enabled will generate static
4441# libraries instead of shared libraries for all JDK libs.
4442#
4443
4444
4445################################################################################
4446#
4447# jlink options.
4448# We always keep packaged modules in JDK image.
4449#
4450
4451
4452################################################################################
4453#
4454# Check if building of the jtreg failure handler should be enabled.
4455#
4456
4457
4458################################################################################
4459#
4460# Enable or disable generation of the classlist at build time
4461#
4462
4463
4464#
4465# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4466# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4467#
4468# This code is free software; you can redistribute it and/or modify it
4469# under the terms of the GNU General Public License version 2 only, as
4470# published by the Free Software Foundation.  Oracle designates this
4471# particular file as subject to the "Classpath" exception as provided
4472# by Oracle in the LICENSE file that accompanied this code.
4473#
4474# This code is distributed in the hope that it will be useful, but WITHOUT
4475# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4476# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4477# version 2 for more details (a copy is included in the LICENSE file that
4478# accompanied this code).
4479#
4480# You should have received a copy of the GNU General Public License version
4481# 2 along with this work; if not, write to the Free Software Foundation,
4482# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4483#
4484# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4485# or visit www.oracle.com if you need additional information or have any
4486# questions.
4487#
4488
4489###############################################################################
4490#
4491# Setup version numbers
4492#
4493
4494# Verify that a given string represents a valid version number, and assign it
4495# to a variable.
4496
4497# Argument 1: the variable to assign to
4498# Argument 2: the value given by the user
4499
4500
4501
4502
4503#
4504# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528# Major library component reside in separate files.
4529#
4530# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4532#
4533# This code is free software; you can redistribute it and/or modify it
4534# under the terms of the GNU General Public License version 2 only, as
4535# published by the Free Software Foundation.  Oracle designates this
4536# particular file as subject to the "Classpath" exception as provided
4537# by Oracle in the LICENSE file that accompanied this code.
4538#
4539# This code is distributed in the hope that it will be useful, but WITHOUT
4540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4542# version 2 for more details (a copy is included in the LICENSE file that
4543# accompanied this code).
4544#
4545# You should have received a copy of the GNU General Public License version
4546# 2 along with this work; if not, write to the Free Software Foundation,
4547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4548#
4549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4550# or visit www.oracle.com if you need additional information or have any
4551# questions.
4552#
4553
4554################################################################################
4555# Setup alsa (Advanced Linux Sound Architecture)
4556################################################################################
4557
4558
4559#
4560# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4562#
4563# This code is free software; you can redistribute it and/or modify it
4564# under the terms of the GNU General Public License version 2 only, as
4565# published by the Free Software Foundation.  Oracle designates this
4566# particular file as subject to the "Classpath" exception as provided
4567# by Oracle in the LICENSE file that accompanied this code.
4568#
4569# This code is distributed in the hope that it will be useful, but WITHOUT
4570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4572# version 2 for more details (a copy is included in the LICENSE file that
4573# accompanied this code).
4574#
4575# You should have received a copy of the GNU General Public License version
4576# 2 along with this work; if not, write to the Free Software Foundation,
4577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4578#
4579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4580# or visit www.oracle.com if you need additional information or have any
4581# questions.
4582#
4583
4584################################################################################
4585# Setup bundled libraries.
4586#
4587# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4588# OpenJDK repository. Default is to use these libraries as bundled, but they
4589# might be replaced by en external version by the user.
4590################################################################################
4591
4592
4593################################################################################
4594# Setup libjpeg
4595################################################################################
4596
4597
4598################################################################################
4599# Setup giflib
4600################################################################################
4601
4602
4603################################################################################
4604# Setup libpng
4605################################################################################
4606
4607
4608################################################################################
4609# Setup zlib
4610################################################################################
4611
4612
4613################################################################################
4614# Setup lcms (Little CMS)
4615################################################################################
4616
4617
4618#
4619# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4621#
4622# This code is free software; you can redistribute it and/or modify it
4623# under the terms of the GNU General Public License version 2 only, as
4624# published by the Free Software Foundation.  Oracle designates this
4625# particular file as subject to the "Classpath" exception as provided
4626# by Oracle in the LICENSE file that accompanied this code.
4627#
4628# This code is distributed in the hope that it will be useful, but WITHOUT
4629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4631# version 2 for more details (a copy is included in the LICENSE file that
4632# accompanied this code).
4633#
4634# You should have received a copy of the GNU General Public License version
4635# 2 along with this work; if not, write to the Free Software Foundation,
4636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4637#
4638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639# or visit www.oracle.com if you need additional information or have any
4640# questions.
4641#
4642
4643################################################################################
4644# Setup cups (Common Unix Printing System)
4645################################################################################
4646
4647
4648#
4649# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4651#
4652# This code is free software; you can redistribute it and/or modify it
4653# under the terms of the GNU General Public License version 2 only, as
4654# published by the Free Software Foundation.  Oracle designates this
4655# particular file as subject to the "Classpath" exception as provided
4656# by Oracle in the LICENSE file that accompanied this code.
4657#
4658# This code is distributed in the hope that it will be useful, but WITHOUT
4659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4661# version 2 for more details (a copy is included in the LICENSE file that
4662# accompanied this code).
4663#
4664# You should have received a copy of the GNU General Public License version
4665# 2 along with this work; if not, write to the Free Software Foundation,
4666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4667#
4668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4669# or visit www.oracle.com if you need additional information or have any
4670# questions.
4671#
4672
4673################################################################################
4674# Setup libffi (Foreign Function Interface)
4675################################################################################
4676
4677
4678#
4679# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4680# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4681#
4682# This code is free software; you can redistribute it and/or modify it
4683# under the terms of the GNU General Public License version 2 only, as
4684# published by the Free Software Foundation.  Oracle designates this
4685# particular file as subject to the "Classpath" exception as provided
4686# by Oracle in the LICENSE file that accompanied this code.
4687#
4688# This code is distributed in the hope that it will be useful, but WITHOUT
4689# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4690# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4691# version 2 for more details (a copy is included in the LICENSE file that
4692# accompanied this code).
4693#
4694# You should have received a copy of the GNU General Public License version
4695# 2 along with this work; if not, write to the Free Software Foundation,
4696# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4697#
4698# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4699# or visit www.oracle.com if you need additional information or have any
4700# questions.
4701#
4702
4703################################################################################
4704# Build the freetype lib from source
4705################################################################################
4706
4707
4708################################################################################
4709# Check if a potential freeype library match is correct and usable
4710################################################################################
4711
4712
4713################################################################################
4714# Setup freetype (The FreeType2 font rendering library)
4715################################################################################
4716
4717
4718#
4719# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4720# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721#
4722# This code is free software; you can redistribute it and/or modify it
4723# under the terms of the GNU General Public License version 2 only, as
4724# published by the Free Software Foundation.  Oracle designates this
4725# particular file as subject to the "Classpath" exception as provided
4726# by Oracle in the LICENSE file that accompanied this code.
4727#
4728# This code is distributed in the hope that it will be useful, but WITHOUT
4729# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731# version 2 for more details (a copy is included in the LICENSE file that
4732# accompanied this code).
4733#
4734# You should have received a copy of the GNU General Public License version
4735# 2 along with this work; if not, write to the Free Software Foundation,
4736# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737#
4738# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739# or visit www.oracle.com if you need additional information or have any
4740# questions.
4741#
4742
4743################################################################################
4744# Setup the standard C/C++ runtime libraries.
4745#
4746# Most importantly, determine if stdc++ should be linked statically or
4747# dynamically.
4748################################################################################
4749
4750
4751#
4752# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754#
4755# This code is free software; you can redistribute it and/or modify it
4756# under the terms of the GNU General Public License version 2 only, as
4757# published by the Free Software Foundation.  Oracle designates this
4758# particular file as subject to the "Classpath" exception as provided
4759# by Oracle in the LICENSE file that accompanied this code.
4760#
4761# This code is distributed in the hope that it will be useful, but WITHOUT
4762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764# version 2 for more details (a copy is included in the LICENSE file that
4765# accompanied this code).
4766#
4767# You should have received a copy of the GNU General Public License version
4768# 2 along with this work; if not, write to the Free Software Foundation,
4769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770#
4771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772# or visit www.oracle.com if you need additional information or have any
4773# questions.
4774#
4775
4776################################################################################
4777# Setup X11 Windows system
4778################################################################################
4779
4780
4781
4782################################################################################
4783# Determine which libraries are needed for this configuration
4784################################################################################
4785
4786
4787################################################################################
4788# Parse library options, and setup needed libraries
4789################################################################################
4790
4791
4792################################################################################
4793# Setup llvm (Low-Level VM)
4794################################################################################
4795
4796
4797################################################################################
4798# Setup various libraries, typically small system libraries
4799################################################################################
4800
4801
4802################################################################################
4803# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4804# redistribute it in the test image.
4805################################################################################
4806
4807
4808
4809#
4810# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4811# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4812#
4813# This code is free software; you can redistribute it and/or modify it
4814# under the terms of the GNU General Public License version 2 only, as
4815# published by the Free Software Foundation.  Oracle designates this
4816# particular file as subject to the "Classpath" exception as provided
4817# by Oracle in the LICENSE file that accompanied this code.
4818#
4819# This code is distributed in the hope that it will be useful, but WITHOUT
4820# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4821# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4822# version 2 for more details (a copy is included in the LICENSE file that
4823# accompanied this code).
4824#
4825# You should have received a copy of the GNU General Public License version
4826# 2 along with this work; if not, write to the Free Software Foundation,
4827# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4828#
4829# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4830# or visit www.oracle.com if you need additional information or have any
4831# questions.
4832#
4833
4834# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4835# Converts autoconf style CPU name to OpenJDK style, into
4836# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4837
4838
4839# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4840# Converts autoconf style OS name to OpenJDK style, into
4841# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4842
4843
4844# Expects $host_os $host_cpu $build_os and $build_cpu
4845# and $with_target_bits to have been setup!
4846#
4847# Translate the standard triplet(quadruplet) definition
4848# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4849# OPENJDK_BUILD_OS, etc.
4850
4851
4852# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4853# accordingly. Must be done after setting up build and target system, but before
4854# doing anything else with these values.
4855
4856
4857# Setup the legacy variables, for controlling the old makefiles.
4858#
4859
4860
4861# $1 - Either TARGET or BUILD to setup the variables for.
4862
4863
4864
4865
4866
4867
4868#%%% Build and target systems %%%
4869
4870
4871
4872
4873# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4874# Add -mX to various FLAGS variables.
4875
4876
4877
4878
4879
4880
4881#
4882# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4883# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4884#
4885# This code is free software; you can redistribute it and/or modify it
4886# under the terms of the GNU General Public License version 2 only, as
4887# published by the Free Software Foundation.  Oracle designates this
4888# particular file as subject to the "Classpath" exception as provided
4889# by Oracle in the LICENSE file that accompanied this code.
4890#
4891# This code is distributed in the hope that it will be useful, but WITHOUT
4892# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4893# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4894# version 2 for more details (a copy is included in the LICENSE file that
4895# accompanied this code).
4896#
4897# You should have received a copy of the GNU General Public License version
4898# 2 along with this work; if not, write to the Free Software Foundation,
4899# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4900#
4901# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4902# or visit www.oracle.com if you need additional information or have any
4903# questions.
4904#
4905
4906
4907
4908
4909
4910
4911
4912################################################################################
4913# Define a mechanism for importing extra prebuilt modules
4914#
4915
4916
4917
4918#
4919# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4920# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4921#
4922# This code is free software; you can redistribute it and/or modify it
4923# under the terms of the GNU General Public License version 2 only, as
4924# published by the Free Software Foundation.  Oracle designates this
4925# particular file as subject to the "Classpath" exception as provided
4926# by Oracle in the LICENSE file that accompanied this code.
4927#
4928# This code is distributed in the hope that it will be useful, but WITHOUT
4929# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4930# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4931# version 2 for more details (a copy is included in the LICENSE file that
4932# accompanied this code).
4933#
4934# You should have received a copy of the GNU General Public License version
4935# 2 along with this work; if not, write to the Free Software Foundation,
4936# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4937#
4938# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4939# or visit www.oracle.com if you need additional information or have any
4940# questions.
4941#
4942
4943########################################################################
4944# This file is responsible for detecting, verifying and setting up the
4945# toolchain, i.e. the compiler, linker and related utilities. It will setup
4946# proper paths to the binaries, but it will not setup any flags.
4947#
4948# The binaries used is determined by the toolchain type, which is the family of
4949# compilers and related tools that are used.
4950########################################################################
4951
4952
4953# All valid toolchains, regardless of platform (used by help.m4)
4954VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4955
4956# These toolchains are valid on different platforms
4957VALID_TOOLCHAINS_linux="gcc clang"
4958VALID_TOOLCHAINS_solaris="solstudio"
4959VALID_TOOLCHAINS_macosx="gcc clang"
4960VALID_TOOLCHAINS_aix="xlc"
4961VALID_TOOLCHAINS_windows="microsoft"
4962
4963# Toolchain descriptions
4964TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4965TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4966TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4967TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4968TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4969
4970# Minimum supported versions, empty means unspecified
4971TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4972TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4973TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4974TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4975TOOLCHAIN_MINIMUM_VERSION_xlc=""
4976
4977# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4978# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4979# $1 - optional variable prefix for compiler and version variables (BUILD_)
4980# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4981
4982
4983# Check if the configured compiler (C and C++) is of a specific version or
4984# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4985#
4986# Arguments:
4987#   VERSION:   The version string to check against the found version
4988#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4989#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4990#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4991
4992
4993
4994
4995# Setup a number of variables describing how native output files are
4996# named on this platform/toolchain.
4997
4998
4999# Determine which toolchain type to use, and make sure it is valid for this
5000# platform. Setup various information about the selected toolchain.
5001
5002
5003# Before we start detecting the toolchain executables, we might need some
5004# special setup, e.g. additional paths etc.
5005
5006
5007# Restore path, etc
5008
5009
5010# Check if a compiler is of the toolchain type we expect, and save the version
5011# information from it. If the compiler does not match the expected type,
5012# this function will abort using AC_MSG_ERROR. If it matches, the version will
5013# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5014# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5015#
5016# $1 = compiler to test (CC or CXX)
5017# $2 = human readable name of compiler (C or C++)
5018
5019
5020# Try to locate the given C or C++ compiler in the path, or otherwise.
5021#
5022# $1 = compiler to test (CC or CXX)
5023# $2 = human readable name of compiler (C or C++)
5024# $3 = compiler name to search for
5025
5026
5027# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5028# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5029# archiver (AR). Verify that the compilers are correct according to the
5030# toolchain type.
5031
5032
5033# Setup additional tools that is considered a part of the toolchain, but not the
5034# core part. Many of these are highly platform-specific and do not exist,
5035# and/or are not needed on all platforms.
5036
5037
5038# Setup the build tools (i.e, the compiler and linker used to build programs
5039# that should be run on the build platform, not the target platform, as a build
5040# helper). Since the non-cross-compile case uses the normal, target compilers
5041# for this, we can only do this after these have been setup.
5042
5043
5044# Do some additional checks on the detected tools.
5045
5046
5047# Setup the JTReg Regression Test Harness.
5048
5049
5050# Setup the JIB dependency resolver
5051
5052
5053#
5054# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5055# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5056#
5057# This code is free software; you can redistribute it and/or modify it
5058# under the terms of the GNU General Public License version 2 only, as
5059# published by the Free Software Foundation.  Oracle designates this
5060# particular file as subject to the "Classpath" exception as provided
5061# by Oracle in the LICENSE file that accompanied this code.
5062#
5063# This code is distributed in the hope that it will be useful, but WITHOUT
5064# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5065# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5066# version 2 for more details (a copy is included in the LICENSE file that
5067# accompanied this code).
5068#
5069# You should have received a copy of the GNU General Public License version
5070# 2 along with this work; if not, write to the Free Software Foundation,
5071# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5072#
5073# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5074# or visit www.oracle.com if you need additional information or have any
5075# questions.
5076#
5077
5078################################################################################
5079# The order of these defines the priority by which we try to find them.
5080VALID_VS_VERSIONS="2013 2012 2010"
5081
5082VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5083VS_VERSION_INTERNAL_2010=100
5084VS_MSVCR_2010=msvcr100.dll
5085# We don't use msvcp on Visual Studio 2010
5086#VS_MSVCP_2010=msvcp100.dll
5087VS_ENVVAR_2010="VS100COMNTOOLS"
5088VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5089VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5090VS_VS_PLATFORM_NAME_2010="v100"
5091VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5092
5093VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5094VS_VERSION_INTERNAL_2012=110
5095VS_MSVCR_2012=msvcr110.dll
5096VS_MSVCP_2012=msvcp110.dll
5097VS_ENVVAR_2012="VS110COMNTOOLS"
5098VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5099VS_SDK_INSTALLDIR_2012=
5100VS_VS_PLATFORM_NAME_2012="v110"
5101VS_SDK_PLATFORM_NAME_2012=
5102
5103VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5104VS_VERSION_INTERNAL_2013=120
5105VS_MSVCR_2013=msvcr120.dll
5106VS_MSVCP_2013=msvcp120.dll
5107VS_ENVVAR_2013="VS120COMNTOOLS"
5108VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5109VS_SDK_INSTALLDIR_2013=
5110VS_VS_PLATFORM_NAME_2013="v120"
5111VS_SDK_PLATFORM_NAME_2013=
5112
5113################################################################################
5114
5115
5116
5117################################################################################
5118
5119
5120
5121################################################################################
5122# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5123# build environment and assigns it to VS_ENV_CMD
5124
5125
5126################################################################################
5127
5128
5129
5130################################################################################
5131# Check if the VS env variables were setup prior to running configure.
5132# If not, then find vcvarsall.bat and run it automatically, and integrate
5133# the set env variables into the spec file.
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148# This line needs to be here, verbatim, after all includes and the dummy hook
5149# definitions. It is replaced with custom functionality when building
5150# custom sources.
5151#CUSTOM_AUTOCONF_INCLUDE
5152
5153# Do not change or remove the following line, it is needed for consistency checks:
5154DATE_WHEN_GENERATED=1497900133
5155
5156###############################################################################
5157#
5158# Initialization / Boot-strapping
5159#
5160# The bootstrapping process needs to solve the "chicken or the egg" problem,
5161# thus it jumps back and forth, each time gaining something needed later on.
5162#
5163###############################################################################
5164
5165# If we are requested to print additional help, do that and then exit.
5166# This must be the very first call.
5167
5168  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5169
5170    # Print available toolchains
5171    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5172    $PRINTF "Which are valid to use depends on the build platform.\n"
5173    for toolchain in $VALID_TOOLCHAINS_all; do
5174      # Use indirect variable referencing
5175      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5176      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5177      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5178    done
5179    $PRINTF "\n"
5180
5181    # Print available jvm features
5182    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5183    $PRINTF "Which are valid to use depends on the target platform.\n  "
5184    $PRINTF "%s " $VALID_JVM_FEATURES
5185    $PRINTF "\n"
5186
5187    # And now exit directly
5188    exit 0
5189  fi
5190
5191
5192# Basic initialization that must happen first of all in the normal process.
5193
5194  # Save the original command line. This is passed to us by the wrapper configure script.
5195
5196  # Save the path variable before it gets changed
5197  ORIGINAL_PATH="$PATH"
5198
5199  DATE_WHEN_CONFIGURED=`LANG=C date`
5200
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5202$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5204$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5205
5206
5207  # Start with tools that do not need have cross compilation support
5208  # and can be expected to be found in the default PATH. These tools are
5209  # used by configure.
5210
5211  # First are all the simple required tools.
5212
5213
5214
5215  # Publish this variable in the help.
5216
5217
5218  if [ -z "${BASENAME+x}" ]; then
5219    # The variable is not set by user, try to locate tool using the code snippet
5220    for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265  else
5266    # The variable is set, but is it from the command line or the environment?
5267
5268    # Try to remove the string !BASENAME! from our list.
5269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5271      # If it failed, the variable was not from the command line. Ignore it,
5272      # but warn the user (except for BASH, which is always set by the calling BASH).
5273      if test "xBASENAME" != xBASH; then
5274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5275$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5276      fi
5277      # Try to locate tool using the code snippet
5278      for ac_prog in basename
5279do
5280  # Extract the first word of "$ac_prog", so it can be a program name with args.
5281set dummy $ac_prog; ac_word=$2
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5283$as_echo_n "checking for $ac_word... " >&6; }
5284if ${ac_cv_path_BASENAME+:} false; then :
5285  $as_echo_n "(cached) " >&6
5286else
5287  case $BASENAME in
5288  [\\/]* | ?:[\\/]*)
5289  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5290  ;;
5291  *)
5292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5293for as_dir in $PATH
5294do
5295  IFS=$as_save_IFS
5296  test -z "$as_dir" && as_dir=.
5297    for ac_exec_ext in '' $ac_executable_extensions; do
5298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5299    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307  ;;
5308esac
5309fi
5310BASENAME=$ac_cv_path_BASENAME
5311if test -n "$BASENAME"; then
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5313$as_echo "$BASENAME" >&6; }
5314else
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316$as_echo "no" >&6; }
5317fi
5318
5319
5320  test -n "$BASENAME" && break
5321done
5322
5323    else
5324      # If it succeeded, then it was overridden by the user. We will use it
5325      # for the tool.
5326
5327      # First remove it from the list of overridden variables, so we can test
5328      # for unknown variables in the end.
5329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5330
5331      # Check if we try to supply an empty value
5332      if test "x$BASENAME" = x; then
5333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5334$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5336$as_echo_n "checking for BASENAME... " >&6; }
5337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5338$as_echo "disabled" >&6; }
5339      else
5340        # Check if the provided tool contains a complete path.
5341        tool_specified="$BASENAME"
5342        tool_basename="${tool_specified##*/}"
5343        if test "x$tool_basename" = "x$tool_specified"; then
5344          # A command without a complete path is provided, search $PATH.
5345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5346$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5347          # Extract the first word of "$tool_basename", so it can be a program name with args.
5348set dummy $tool_basename; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if ${ac_cv_path_BASENAME+:} false; then :
5352  $as_echo_n "(cached) " >&6
5353else
5354  case $BASENAME in
5355  [\\/]* | ?:[\\/]*)
5356  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5357  ;;
5358  *)
5359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362  IFS=$as_save_IFS
5363  test -z "$as_dir" && as_dir=.
5364    for ac_exec_ext in '' $ac_executable_extensions; do
5365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5366    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368    break 2
5369  fi
5370done
5371  done
5372IFS=$as_save_IFS
5373
5374  ;;
5375esac
5376fi
5377BASENAME=$ac_cv_path_BASENAME
5378if test -n "$BASENAME"; then
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5380$as_echo "$BASENAME" >&6; }
5381else
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385
5386
5387          if test "x$BASENAME" = x; then
5388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5389          fi
5390        else
5391          # Otherwise we believe it is a complete path. Use it as it is.
5392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5393$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5395$as_echo_n "checking for BASENAME... " >&6; }
5396          if test ! -x "$tool_specified"; then
5397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5398$as_echo "not found" >&6; }
5399            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5400          fi
5401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5402$as_echo "$tool_specified" >&6; }
5403        fi
5404      fi
5405    fi
5406
5407  fi
5408
5409
5410
5411  if test "x$BASENAME" = x; then
5412    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5413  fi
5414
5415
5416
5417
5418
5419  # Publish this variable in the help.
5420
5421
5422  if [ -z "${BASH+x}" ]; then
5423    # The variable is not set by user, try to locate tool using the code snippet
5424    for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469  else
5470    # The variable is set, but is it from the command line or the environment?
5471
5472    # Try to remove the string !BASH! from our list.
5473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5475      # If it failed, the variable was not from the command line. Ignore it,
5476      # but warn the user (except for BASH, which is always set by the calling BASH).
5477      if test "xBASH" != xBASH; then
5478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5479$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5480      fi
5481      # Try to locate tool using the code snippet
5482      for ac_prog in bash
5483do
5484  # Extract the first word of "$ac_prog", so it can be a program name with args.
5485set dummy $ac_prog; ac_word=$2
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487$as_echo_n "checking for $ac_word... " >&6; }
5488if ${ac_cv_path_BASH+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491  case $BASH in
5492  [\\/]* | ?:[\\/]*)
5493  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5494  ;;
5495  *)
5496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  test -z "$as_dir" && as_dir=.
5501    for ac_exec_ext in '' $ac_executable_extensions; do
5502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5503    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505    break 2
5506  fi
5507done
5508  done
5509IFS=$as_save_IFS
5510
5511  ;;
5512esac
5513fi
5514BASH=$ac_cv_path_BASH
5515if test -n "$BASH"; then
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5517$as_echo "$BASH" >&6; }
5518else
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524  test -n "$BASH" && break
5525done
5526
5527    else
5528      # If it succeeded, then it was overridden by the user. We will use it
5529      # for the tool.
5530
5531      # First remove it from the list of overridden variables, so we can test
5532      # for unknown variables in the end.
5533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5534
5535      # Check if we try to supply an empty value
5536      if test "x$BASH" = x; then
5537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5538$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5540$as_echo_n "checking for BASH... " >&6; }
5541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5542$as_echo "disabled" >&6; }
5543      else
5544        # Check if the provided tool contains a complete path.
5545        tool_specified="$BASH"
5546        tool_basename="${tool_specified##*/}"
5547        if test "x$tool_basename" = "x$tool_specified"; then
5548          # A command without a complete path is provided, search $PATH.
5549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5550$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5551          # Extract the first word of "$tool_basename", so it can be a program name with args.
5552set dummy $tool_basename; ac_word=$2
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554$as_echo_n "checking for $ac_word... " >&6; }
5555if ${ac_cv_path_BASH+:} false; then :
5556  $as_echo_n "(cached) " >&6
5557else
5558  case $BASH in
5559  [\\/]* | ?:[\\/]*)
5560  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5561  ;;
5562  *)
5563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564for as_dir in $PATH
5565do
5566  IFS=$as_save_IFS
5567  test -z "$as_dir" && as_dir=.
5568    for ac_exec_ext in '' $ac_executable_extensions; do
5569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5570    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5572    break 2
5573  fi
5574done
5575  done
5576IFS=$as_save_IFS
5577
5578  ;;
5579esac
5580fi
5581BASH=$ac_cv_path_BASH
5582if test -n "$BASH"; then
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5584$as_echo "$BASH" >&6; }
5585else
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587$as_echo "no" >&6; }
5588fi
5589
5590
5591          if test "x$BASH" = x; then
5592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5593          fi
5594        else
5595          # Otherwise we believe it is a complete path. Use it as it is.
5596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5597$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5599$as_echo_n "checking for BASH... " >&6; }
5600          if test ! -x "$tool_specified"; then
5601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5602$as_echo "not found" >&6; }
5603            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5604          fi
5605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5606$as_echo "$tool_specified" >&6; }
5607        fi
5608      fi
5609    fi
5610
5611  fi
5612
5613
5614
5615  if test "x$BASH" = x; then
5616    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5617  fi
5618
5619
5620
5621
5622
5623  # Publish this variable in the help.
5624
5625
5626  if [ -z "${CAT+x}" ]; then
5627    # The variable is not set by user, try to locate tool using the code snippet
5628    for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673  else
5674    # The variable is set, but is it from the command line or the environment?
5675
5676    # Try to remove the string !CAT! from our list.
5677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5679      # If it failed, the variable was not from the command line. Ignore it,
5680      # but warn the user (except for BASH, which is always set by the calling BASH).
5681      if test "xCAT" != xBASH; then
5682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5683$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5684      fi
5685      # Try to locate tool using the code snippet
5686      for ac_prog in cat
5687do
5688  # Extract the first word of "$ac_prog", so it can be a program name with args.
5689set dummy $ac_prog; ac_word=$2
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5691$as_echo_n "checking for $ac_word... " >&6; }
5692if ${ac_cv_path_CAT+:} false; then :
5693  $as_echo_n "(cached) " >&6
5694else
5695  case $CAT in
5696  [\\/]* | ?:[\\/]*)
5697  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5698  ;;
5699  *)
5700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715  ;;
5716esac
5717fi
5718CAT=$ac_cv_path_CAT
5719if test -n "$CAT"; then
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5721$as_echo "$CAT" >&6; }
5722else
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725fi
5726
5727
5728  test -n "$CAT" && break
5729done
5730
5731    else
5732      # If it succeeded, then it was overridden by the user. We will use it
5733      # for the tool.
5734
5735      # First remove it from the list of overridden variables, so we can test
5736      # for unknown variables in the end.
5737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5738
5739      # Check if we try to supply an empty value
5740      if test "x$CAT" = x; then
5741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5742$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5744$as_echo_n "checking for CAT... " >&6; }
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5746$as_echo "disabled" >&6; }
5747      else
5748        # Check if the provided tool contains a complete path.
5749        tool_specified="$CAT"
5750        tool_basename="${tool_specified##*/}"
5751        if test "x$tool_basename" = "x$tool_specified"; then
5752          # A command without a complete path is provided, search $PATH.
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5754$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5755          # Extract the first word of "$tool_basename", so it can be a program name with args.
5756set dummy $tool_basename; ac_word=$2
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if ${ac_cv_path_CAT+:} false; then :
5760  $as_echo_n "(cached) " >&6
5761else
5762  case $CAT in
5763  [\\/]* | ?:[\\/]*)
5764  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5765  ;;
5766  *)
5767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770  IFS=$as_save_IFS
5771  test -z "$as_dir" && as_dir=.
5772    for ac_exec_ext in '' $ac_executable_extensions; do
5773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5774    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5776    break 2
5777  fi
5778done
5779  done
5780IFS=$as_save_IFS
5781
5782  ;;
5783esac
5784fi
5785CAT=$ac_cv_path_CAT
5786if test -n "$CAT"; then
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5788$as_echo "$CAT" >&6; }
5789else
5790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792fi
5793
5794
5795          if test "x$CAT" = x; then
5796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5797          fi
5798        else
5799          # Otherwise we believe it is a complete path. Use it as it is.
5800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5801$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5803$as_echo_n "checking for CAT... " >&6; }
5804          if test ! -x "$tool_specified"; then
5805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5806$as_echo "not found" >&6; }
5807            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5808          fi
5809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5810$as_echo "$tool_specified" >&6; }
5811        fi
5812      fi
5813    fi
5814
5815  fi
5816
5817
5818
5819  if test "x$CAT" = x; then
5820    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5821  fi
5822
5823
5824
5825
5826
5827  # Publish this variable in the help.
5828
5829
5830  if [ -z "${CHMOD+x}" ]; then
5831    # The variable is not set by user, try to locate tool using the code snippet
5832    for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877  else
5878    # The variable is set, but is it from the command line or the environment?
5879
5880    # Try to remove the string !CHMOD! from our list.
5881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5883      # If it failed, the variable was not from the command line. Ignore it,
5884      # but warn the user (except for BASH, which is always set by the calling BASH).
5885      if test "xCHMOD" != xBASH; then
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5887$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5888      fi
5889      # Try to locate tool using the code snippet
5890      for ac_prog in chmod
5891do
5892  # Extract the first word of "$ac_prog", so it can be a program name with args.
5893set dummy $ac_prog; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if ${ac_cv_path_CHMOD+:} false; then :
5897  $as_echo_n "(cached) " >&6
5898else
5899  case $CHMOD in
5900  [\\/]* | ?:[\\/]*)
5901  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5902  ;;
5903  *)
5904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907  IFS=$as_save_IFS
5908  test -z "$as_dir" && as_dir=.
5909    for ac_exec_ext in '' $ac_executable_extensions; do
5910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5911    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913    break 2
5914  fi
5915done
5916  done
5917IFS=$as_save_IFS
5918
5919  ;;
5920esac
5921fi
5922CHMOD=$ac_cv_path_CHMOD
5923if test -n "$CHMOD"; then
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5925$as_echo "$CHMOD" >&6; }
5926else
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932  test -n "$CHMOD" && break
5933done
5934
5935    else
5936      # If it succeeded, then it was overridden by the user. We will use it
5937      # for the tool.
5938
5939      # First remove it from the list of overridden variables, so we can test
5940      # for unknown variables in the end.
5941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5942
5943      # Check if we try to supply an empty value
5944      if test "x$CHMOD" = x; then
5945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5946$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5948$as_echo_n "checking for CHMOD... " >&6; }
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5950$as_echo "disabled" >&6; }
5951      else
5952        # Check if the provided tool contains a complete path.
5953        tool_specified="$CHMOD"
5954        tool_basename="${tool_specified##*/}"
5955        if test "x$tool_basename" = "x$tool_specified"; then
5956          # A command without a complete path is provided, search $PATH.
5957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5958$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5959          # Extract the first word of "$tool_basename", so it can be a program name with args.
5960set dummy $tool_basename; ac_word=$2
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5962$as_echo_n "checking for $ac_word... " >&6; }
5963if ${ac_cv_path_CHMOD+:} false; then :
5964  $as_echo_n "(cached) " >&6
5965else
5966  case $CHMOD in
5967  [\\/]* | ?:[\\/]*)
5968  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5969  ;;
5970  *)
5971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972for as_dir in $PATH
5973do
5974  IFS=$as_save_IFS
5975  test -z "$as_dir" && as_dir=.
5976    for ac_exec_ext in '' $ac_executable_extensions; do
5977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5978    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5980    break 2
5981  fi
5982done
5983  done
5984IFS=$as_save_IFS
5985
5986  ;;
5987esac
5988fi
5989CHMOD=$ac_cv_path_CHMOD
5990if test -n "$CHMOD"; then
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5992$as_echo "$CHMOD" >&6; }
5993else
5994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
5996fi
5997
5998
5999          if test "x$CHMOD" = x; then
6000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6001          fi
6002        else
6003          # Otherwise we believe it is a complete path. Use it as it is.
6004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6005$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6007$as_echo_n "checking for CHMOD... " >&6; }
6008          if test ! -x "$tool_specified"; then
6009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6010$as_echo "not found" >&6; }
6011            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6012          fi
6013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6014$as_echo "$tool_specified" >&6; }
6015        fi
6016      fi
6017    fi
6018
6019  fi
6020
6021
6022
6023  if test "x$CHMOD" = x; then
6024    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6025  fi
6026
6027
6028
6029
6030
6031  # Publish this variable in the help.
6032
6033
6034  if [ -z "${CMP+x}" ]; then
6035    # The variable is not set by user, try to locate tool using the code snippet
6036    for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081  else
6082    # The variable is set, but is it from the command line or the environment?
6083
6084    # Try to remove the string !CMP! from our list.
6085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6087      # If it failed, the variable was not from the command line. Ignore it,
6088      # but warn the user (except for BASH, which is always set by the calling BASH).
6089      if test "xCMP" != xBASH; then
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6091$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6092      fi
6093      # Try to locate tool using the code snippet
6094      for ac_prog in cmp
6095do
6096  # Extract the first word of "$ac_prog", so it can be a program name with args.
6097set dummy $ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_path_CMP+:} false; then :
6101  $as_echo_n "(cached) " >&6
6102else
6103  case $CMP in
6104  [\\/]* | ?:[\\/]*)
6105  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6106  ;;
6107  *)
6108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111  IFS=$as_save_IFS
6112  test -z "$as_dir" && as_dir=.
6113    for ac_exec_ext in '' $ac_executable_extensions; do
6114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6115    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117    break 2
6118  fi
6119done
6120  done
6121IFS=$as_save_IFS
6122
6123  ;;
6124esac
6125fi
6126CMP=$ac_cv_path_CMP
6127if test -n "$CMP"; then
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6129$as_echo "$CMP" >&6; }
6130else
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
6133fi
6134
6135
6136  test -n "$CMP" && break
6137done
6138
6139    else
6140      # If it succeeded, then it was overridden by the user. We will use it
6141      # for the tool.
6142
6143      # First remove it from the list of overridden variables, so we can test
6144      # for unknown variables in the end.
6145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6146
6147      # Check if we try to supply an empty value
6148      if test "x$CMP" = x; then
6149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6150$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6152$as_echo_n "checking for CMP... " >&6; }
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6154$as_echo "disabled" >&6; }
6155      else
6156        # Check if the provided tool contains a complete path.
6157        tool_specified="$CMP"
6158        tool_basename="${tool_specified##*/}"
6159        if test "x$tool_basename" = "x$tool_specified"; then
6160          # A command without a complete path is provided, search $PATH.
6161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6162$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6163          # Extract the first word of "$tool_basename", so it can be a program name with args.
6164set dummy $tool_basename; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_CMP+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $CMP in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193CMP=$ac_cv_path_CMP
6194if test -n "$CMP"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6196$as_echo "$CMP" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203          if test "x$CMP" = x; then
6204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6205          fi
6206        else
6207          # Otherwise we believe it is a complete path. Use it as it is.
6208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6209$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6211$as_echo_n "checking for CMP... " >&6; }
6212          if test ! -x "$tool_specified"; then
6213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6214$as_echo "not found" >&6; }
6215            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6216          fi
6217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6218$as_echo "$tool_specified" >&6; }
6219        fi
6220      fi
6221    fi
6222
6223  fi
6224
6225
6226
6227  if test "x$CMP" = x; then
6228    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6229  fi
6230
6231
6232
6233
6234
6235  # Publish this variable in the help.
6236
6237
6238  if [ -z "${COMM+x}" ]; then
6239    # The variable is not set by user, try to locate tool using the code snippet
6240    for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285  else
6286    # The variable is set, but is it from the command line or the environment?
6287
6288    # Try to remove the string !COMM! from our list.
6289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6291      # If it failed, the variable was not from the command line. Ignore it,
6292      # but warn the user (except for BASH, which is always set by the calling BASH).
6293      if test "xCOMM" != xBASH; then
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6295$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6296      fi
6297      # Try to locate tool using the code snippet
6298      for ac_prog in comm
6299do
6300  # Extract the first word of "$ac_prog", so it can be a program name with args.
6301set dummy $ac_prog; ac_word=$2
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6303$as_echo_n "checking for $ac_word... " >&6; }
6304if ${ac_cv_path_COMM+:} false; then :
6305  $as_echo_n "(cached) " >&6
6306else
6307  case $COMM in
6308  [\\/]* | ?:[\\/]*)
6309  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6310  ;;
6311  *)
6312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315  IFS=$as_save_IFS
6316  test -z "$as_dir" && as_dir=.
6317    for ac_exec_ext in '' $ac_executable_extensions; do
6318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6319    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321    break 2
6322  fi
6323done
6324  done
6325IFS=$as_save_IFS
6326
6327  ;;
6328esac
6329fi
6330COMM=$ac_cv_path_COMM
6331if test -n "$COMM"; then
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6333$as_echo "$COMM" >&6; }
6334else
6335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
6337fi
6338
6339
6340  test -n "$COMM" && break
6341done
6342
6343    else
6344      # If it succeeded, then it was overridden by the user. We will use it
6345      # for the tool.
6346
6347      # First remove it from the list of overridden variables, so we can test
6348      # for unknown variables in the end.
6349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6350
6351      # Check if we try to supply an empty value
6352      if test "x$COMM" = x; then
6353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6354$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6356$as_echo_n "checking for COMM... " >&6; }
6357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6358$as_echo "disabled" >&6; }
6359      else
6360        # Check if the provided tool contains a complete path.
6361        tool_specified="$COMM"
6362        tool_basename="${tool_specified##*/}"
6363        if test "x$tool_basename" = "x$tool_specified"; then
6364          # A command without a complete path is provided, search $PATH.
6365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6366$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6367          # Extract the first word of "$tool_basename", so it can be a program name with args.
6368set dummy $tool_basename; ac_word=$2
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370$as_echo_n "checking for $ac_word... " >&6; }
6371if ${ac_cv_path_COMM+:} false; then :
6372  $as_echo_n "(cached) " >&6
6373else
6374  case $COMM in
6375  [\\/]* | ?:[\\/]*)
6376  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6377  ;;
6378  *)
6379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380for as_dir in $PATH
6381do
6382  IFS=$as_save_IFS
6383  test -z "$as_dir" && as_dir=.
6384    for ac_exec_ext in '' $ac_executable_extensions; do
6385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6386    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6388    break 2
6389  fi
6390done
6391  done
6392IFS=$as_save_IFS
6393
6394  ;;
6395esac
6396fi
6397COMM=$ac_cv_path_COMM
6398if test -n "$COMM"; then
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6400$as_echo "$COMM" >&6; }
6401else
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6403$as_echo "no" >&6; }
6404fi
6405
6406
6407          if test "x$COMM" = x; then
6408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6409          fi
6410        else
6411          # Otherwise we believe it is a complete path. Use it as it is.
6412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6413$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6415$as_echo_n "checking for COMM... " >&6; }
6416          if test ! -x "$tool_specified"; then
6417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6418$as_echo "not found" >&6; }
6419            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6420          fi
6421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6422$as_echo "$tool_specified" >&6; }
6423        fi
6424      fi
6425    fi
6426
6427  fi
6428
6429
6430
6431  if test "x$COMM" = x; then
6432    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6433  fi
6434
6435
6436
6437
6438
6439  # Publish this variable in the help.
6440
6441
6442  if [ -z "${CP+x}" ]; then
6443    # The variable is not set by user, try to locate tool using the code snippet
6444    for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489  else
6490    # The variable is set, but is it from the command line or the environment?
6491
6492    # Try to remove the string !CP! from our list.
6493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6495      # If it failed, the variable was not from the command line. Ignore it,
6496      # but warn the user (except for BASH, which is always set by the calling BASH).
6497      if test "xCP" != xBASH; then
6498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6499$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6500      fi
6501      # Try to locate tool using the code snippet
6502      for ac_prog in cp
6503do
6504  # Extract the first word of "$ac_prog", so it can be a program name with args.
6505set dummy $ac_prog; ac_word=$2
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6507$as_echo_n "checking for $ac_word... " >&6; }
6508if ${ac_cv_path_CP+:} false; then :
6509  $as_echo_n "(cached) " >&6
6510else
6511  case $CP in
6512  [\\/]* | ?:[\\/]*)
6513  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6514  ;;
6515  *)
6516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH
6518do
6519  IFS=$as_save_IFS
6520  test -z "$as_dir" && as_dir=.
6521    for ac_exec_ext in '' $ac_executable_extensions; do
6522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525    break 2
6526  fi
6527done
6528  done
6529IFS=$as_save_IFS
6530
6531  ;;
6532esac
6533fi
6534CP=$ac_cv_path_CP
6535if test -n "$CP"; then
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6537$as_echo "$CP" >&6; }
6538else
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544  test -n "$CP" && break
6545done
6546
6547    else
6548      # If it succeeded, then it was overridden by the user. We will use it
6549      # for the tool.
6550
6551      # First remove it from the list of overridden variables, so we can test
6552      # for unknown variables in the end.
6553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6554
6555      # Check if we try to supply an empty value
6556      if test "x$CP" = x; then
6557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6558$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6560$as_echo_n "checking for CP... " >&6; }
6561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6562$as_echo "disabled" >&6; }
6563      else
6564        # Check if the provided tool contains a complete path.
6565        tool_specified="$CP"
6566        tool_basename="${tool_specified##*/}"
6567        if test "x$tool_basename" = "x$tool_specified"; then
6568          # A command without a complete path is provided, search $PATH.
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6570$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6571          # Extract the first word of "$tool_basename", so it can be a program name with args.
6572set dummy $tool_basename; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_CP+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $CP in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601CP=$ac_cv_path_CP
6602if test -n "$CP"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6604$as_echo "$CP" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611          if test "x$CP" = x; then
6612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6613          fi
6614        else
6615          # Otherwise we believe it is a complete path. Use it as it is.
6616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6617$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6619$as_echo_n "checking for CP... " >&6; }
6620          if test ! -x "$tool_specified"; then
6621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6622$as_echo "not found" >&6; }
6623            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6624          fi
6625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6626$as_echo "$tool_specified" >&6; }
6627        fi
6628      fi
6629    fi
6630
6631  fi
6632
6633
6634
6635  if test "x$CP" = x; then
6636    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6637  fi
6638
6639
6640
6641
6642
6643  # Publish this variable in the help.
6644
6645
6646  if [ -z "${CUT+x}" ]; then
6647    # The variable is not set by user, try to locate tool using the code snippet
6648    for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693  else
6694    # The variable is set, but is it from the command line or the environment?
6695
6696    # Try to remove the string !CUT! from our list.
6697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6699      # If it failed, the variable was not from the command line. Ignore it,
6700      # but warn the user (except for BASH, which is always set by the calling BASH).
6701      if test "xCUT" != xBASH; then
6702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6703$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6704      fi
6705      # Try to locate tool using the code snippet
6706      for ac_prog in cut
6707do
6708  # Extract the first word of "$ac_prog", so it can be a program name with args.
6709set dummy $ac_prog; ac_word=$2
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_CUT+:} false; then :
6713  $as_echo_n "(cached) " >&6
6714else
6715  case $CUT in
6716  [\\/]* | ?:[\\/]*)
6717  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6718  ;;
6719  *)
6720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in $PATH
6722do
6723  IFS=$as_save_IFS
6724  test -z "$as_dir" && as_dir=.
6725    for ac_exec_ext in '' $ac_executable_extensions; do
6726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6727    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729    break 2
6730  fi
6731done
6732  done
6733IFS=$as_save_IFS
6734
6735  ;;
6736esac
6737fi
6738CUT=$ac_cv_path_CUT
6739if test -n "$CUT"; then
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6741$as_echo "$CUT" >&6; }
6742else
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
6748  test -n "$CUT" && break
6749done
6750
6751    else
6752      # If it succeeded, then it was overridden by the user. We will use it
6753      # for the tool.
6754
6755      # First remove it from the list of overridden variables, so we can test
6756      # for unknown variables in the end.
6757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6758
6759      # Check if we try to supply an empty value
6760      if test "x$CUT" = x; then
6761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6762$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6764$as_echo_n "checking for CUT... " >&6; }
6765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6766$as_echo "disabled" >&6; }
6767      else
6768        # Check if the provided tool contains a complete path.
6769        tool_specified="$CUT"
6770        tool_basename="${tool_specified##*/}"
6771        if test "x$tool_basename" = "x$tool_specified"; then
6772          # A command without a complete path is provided, search $PATH.
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6774$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6775          # Extract the first word of "$tool_basename", so it can be a program name with args.
6776set dummy $tool_basename; ac_word=$2
6777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6778$as_echo_n "checking for $ac_word... " >&6; }
6779if ${ac_cv_path_CUT+:} false; then :
6780  $as_echo_n "(cached) " >&6
6781else
6782  case $CUT in
6783  [\\/]* | ?:[\\/]*)
6784  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6785  ;;
6786  *)
6787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6788for as_dir in $PATH
6789do
6790  IFS=$as_save_IFS
6791  test -z "$as_dir" && as_dir=.
6792    for ac_exec_ext in '' $ac_executable_extensions; do
6793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6794    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6796    break 2
6797  fi
6798done
6799  done
6800IFS=$as_save_IFS
6801
6802  ;;
6803esac
6804fi
6805CUT=$ac_cv_path_CUT
6806if test -n "$CUT"; then
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6808$as_echo "$CUT" >&6; }
6809else
6810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811$as_echo "no" >&6; }
6812fi
6813
6814
6815          if test "x$CUT" = x; then
6816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6817          fi
6818        else
6819          # Otherwise we believe it is a complete path. Use it as it is.
6820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6821$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6823$as_echo_n "checking for CUT... " >&6; }
6824          if test ! -x "$tool_specified"; then
6825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6826$as_echo "not found" >&6; }
6827            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6828          fi
6829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6830$as_echo "$tool_specified" >&6; }
6831        fi
6832      fi
6833    fi
6834
6835  fi
6836
6837
6838
6839  if test "x$CUT" = x; then
6840    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6841  fi
6842
6843
6844
6845
6846
6847  # Publish this variable in the help.
6848
6849
6850  if [ -z "${DATE+x}" ]; then
6851    # The variable is not set by user, try to locate tool using the code snippet
6852    for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897  else
6898    # The variable is set, but is it from the command line or the environment?
6899
6900    # Try to remove the string !DATE! from our list.
6901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6903      # If it failed, the variable was not from the command line. Ignore it,
6904      # but warn the user (except for BASH, which is always set by the calling BASH).
6905      if test "xDATE" != xBASH; then
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6907$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6908      fi
6909      # Try to locate tool using the code snippet
6910      for ac_prog in date
6911do
6912  # Extract the first word of "$ac_prog", so it can be a program name with args.
6913set dummy $ac_prog; ac_word=$2
6914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6915$as_echo_n "checking for $ac_word... " >&6; }
6916if ${ac_cv_path_DATE+:} false; then :
6917  $as_echo_n "(cached) " >&6
6918else
6919  case $DATE in
6920  [\\/]* | ?:[\\/]*)
6921  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6922  ;;
6923  *)
6924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6925for as_dir in $PATH
6926do
6927  IFS=$as_save_IFS
6928  test -z "$as_dir" && as_dir=.
6929    for ac_exec_ext in '' $ac_executable_extensions; do
6930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6931    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6933    break 2
6934  fi
6935done
6936  done
6937IFS=$as_save_IFS
6938
6939  ;;
6940esac
6941fi
6942DATE=$ac_cv_path_DATE
6943if test -n "$DATE"; then
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6945$as_echo "$DATE" >&6; }
6946else
6947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6948$as_echo "no" >&6; }
6949fi
6950
6951
6952  test -n "$DATE" && break
6953done
6954
6955    else
6956      # If it succeeded, then it was overridden by the user. We will use it
6957      # for the tool.
6958
6959      # First remove it from the list of overridden variables, so we can test
6960      # for unknown variables in the end.
6961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6962
6963      # Check if we try to supply an empty value
6964      if test "x$DATE" = x; then
6965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6966$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6968$as_echo_n "checking for DATE... " >&6; }
6969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6970$as_echo "disabled" >&6; }
6971      else
6972        # Check if the provided tool contains a complete path.
6973        tool_specified="$DATE"
6974        tool_basename="${tool_specified##*/}"
6975        if test "x$tool_basename" = "x$tool_specified"; then
6976          # A command without a complete path is provided, search $PATH.
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6978$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6979          # Extract the first word of "$tool_basename", so it can be a program name with args.
6980set dummy $tool_basename; ac_word=$2
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6982$as_echo_n "checking for $ac_word... " >&6; }
6983if ${ac_cv_path_DATE+:} false; then :
6984  $as_echo_n "(cached) " >&6
6985else
6986  case $DATE in
6987  [\\/]* | ?:[\\/]*)
6988  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6989  ;;
6990  *)
6991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6992for as_dir in $PATH
6993do
6994  IFS=$as_save_IFS
6995  test -z "$as_dir" && as_dir=.
6996    for ac_exec_ext in '' $ac_executable_extensions; do
6997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6998    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7000    break 2
7001  fi
7002done
7003  done
7004IFS=$as_save_IFS
7005
7006  ;;
7007esac
7008fi
7009DATE=$ac_cv_path_DATE
7010if test -n "$DATE"; then
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7012$as_echo "$DATE" >&6; }
7013else
7014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015$as_echo "no" >&6; }
7016fi
7017
7018
7019          if test "x$DATE" = x; then
7020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7021          fi
7022        else
7023          # Otherwise we believe it is a complete path. Use it as it is.
7024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7025$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7027$as_echo_n "checking for DATE... " >&6; }
7028          if test ! -x "$tool_specified"; then
7029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7030$as_echo "not found" >&6; }
7031            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7032          fi
7033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7034$as_echo "$tool_specified" >&6; }
7035        fi
7036      fi
7037    fi
7038
7039  fi
7040
7041
7042
7043  if test "x$DATE" = x; then
7044    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7045  fi
7046
7047
7048
7049
7050
7051  # Publish this variable in the help.
7052
7053
7054  if [ -z "${DIFF+x}" ]; then
7055    # The variable is not set by user, try to locate tool using the code snippet
7056    for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101  else
7102    # The variable is set, but is it from the command line or the environment?
7103
7104    # Try to remove the string !DIFF! from our list.
7105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7107      # If it failed, the variable was not from the command line. Ignore it,
7108      # but warn the user (except for BASH, which is always set by the calling BASH).
7109      if test "xDIFF" != xBASH; then
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7111$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7112      fi
7113      # Try to locate tool using the code snippet
7114      for ac_prog in gdiff diff
7115do
7116  # Extract the first word of "$ac_prog", so it can be a program name with args.
7117set dummy $ac_prog; ac_word=$2
7118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7119$as_echo_n "checking for $ac_word... " >&6; }
7120if ${ac_cv_path_DIFF+:} false; then :
7121  $as_echo_n "(cached) " >&6
7122else
7123  case $DIFF in
7124  [\\/]* | ?:[\\/]*)
7125  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7126  ;;
7127  *)
7128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129for as_dir in $PATH
7130do
7131  IFS=$as_save_IFS
7132  test -z "$as_dir" && as_dir=.
7133    for ac_exec_ext in '' $ac_executable_extensions; do
7134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7135    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7137    break 2
7138  fi
7139done
7140  done
7141IFS=$as_save_IFS
7142
7143  ;;
7144esac
7145fi
7146DIFF=$ac_cv_path_DIFF
7147if test -n "$DIFF"; then
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7149$as_echo "$DIFF" >&6; }
7150else
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152$as_echo "no" >&6; }
7153fi
7154
7155
7156  test -n "$DIFF" && break
7157done
7158
7159    else
7160      # If it succeeded, then it was overridden by the user. We will use it
7161      # for the tool.
7162
7163      # First remove it from the list of overridden variables, so we can test
7164      # for unknown variables in the end.
7165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7166
7167      # Check if we try to supply an empty value
7168      if test "x$DIFF" = x; then
7169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7170$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7172$as_echo_n "checking for DIFF... " >&6; }
7173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7174$as_echo "disabled" >&6; }
7175      else
7176        # Check if the provided tool contains a complete path.
7177        tool_specified="$DIFF"
7178        tool_basename="${tool_specified##*/}"
7179        if test "x$tool_basename" = "x$tool_specified"; then
7180          # A command without a complete path is provided, search $PATH.
7181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7182$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7183          # Extract the first word of "$tool_basename", so it can be a program name with args.
7184set dummy $tool_basename; ac_word=$2
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7186$as_echo_n "checking for $ac_word... " >&6; }
7187if ${ac_cv_path_DIFF+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  case $DIFF in
7191  [\\/]* | ?:[\\/]*)
7192  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7193  ;;
7194  *)
7195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196for as_dir in $PATH
7197do
7198  IFS=$as_save_IFS
7199  test -z "$as_dir" && as_dir=.
7200    for ac_exec_ext in '' $ac_executable_extensions; do
7201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7202    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7204    break 2
7205  fi
7206done
7207  done
7208IFS=$as_save_IFS
7209
7210  ;;
7211esac
7212fi
7213DIFF=$ac_cv_path_DIFF
7214if test -n "$DIFF"; then
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7216$as_echo "$DIFF" >&6; }
7217else
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221
7222
7223          if test "x$DIFF" = x; then
7224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7225          fi
7226        else
7227          # Otherwise we believe it is a complete path. Use it as it is.
7228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7229$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7231$as_echo_n "checking for DIFF... " >&6; }
7232          if test ! -x "$tool_specified"; then
7233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7234$as_echo "not found" >&6; }
7235            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7236          fi
7237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7238$as_echo "$tool_specified" >&6; }
7239        fi
7240      fi
7241    fi
7242
7243  fi
7244
7245
7246
7247  if test "x$DIFF" = x; then
7248    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7249  fi
7250
7251
7252
7253
7254
7255  # Publish this variable in the help.
7256
7257
7258  if [ -z "${DIRNAME+x}" ]; then
7259    # The variable is not set by user, try to locate tool using the code snippet
7260    for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305  else
7306    # The variable is set, but is it from the command line or the environment?
7307
7308    # Try to remove the string !DIRNAME! from our list.
7309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7311      # If it failed, the variable was not from the command line. Ignore it,
7312      # but warn the user (except for BASH, which is always set by the calling BASH).
7313      if test "xDIRNAME" != xBASH; then
7314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7315$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7316      fi
7317      # Try to locate tool using the code snippet
7318      for ac_prog in dirname
7319do
7320  # Extract the first word of "$ac_prog", so it can be a program name with args.
7321set dummy $ac_prog; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_DIRNAME+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $DIRNAME in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350DIRNAME=$ac_cv_path_DIRNAME
7351if test -n "$DIRNAME"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7353$as_echo "$DIRNAME" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360  test -n "$DIRNAME" && break
7361done
7362
7363    else
7364      # If it succeeded, then it was overridden by the user. We will use it
7365      # for the tool.
7366
7367      # First remove it from the list of overridden variables, so we can test
7368      # for unknown variables in the end.
7369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7370
7371      # Check if we try to supply an empty value
7372      if test "x$DIRNAME" = x; then
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7374$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7376$as_echo_n "checking for DIRNAME... " >&6; }
7377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7378$as_echo "disabled" >&6; }
7379      else
7380        # Check if the provided tool contains a complete path.
7381        tool_specified="$DIRNAME"
7382        tool_basename="${tool_specified##*/}"
7383        if test "x$tool_basename" = "x$tool_specified"; then
7384          # A command without a complete path is provided, search $PATH.
7385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7386$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7387          # Extract the first word of "$tool_basename", so it can be a program name with args.
7388set dummy $tool_basename; ac_word=$2
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7390$as_echo_n "checking for $ac_word... " >&6; }
7391if ${ac_cv_path_DIRNAME+:} false; then :
7392  $as_echo_n "(cached) " >&6
7393else
7394  case $DIRNAME in
7395  [\\/]* | ?:[\\/]*)
7396  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7397  ;;
7398  *)
7399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402  IFS=$as_save_IFS
7403  test -z "$as_dir" && as_dir=.
7404    for ac_exec_ext in '' $ac_executable_extensions; do
7405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7406    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7408    break 2
7409  fi
7410done
7411  done
7412IFS=$as_save_IFS
7413
7414  ;;
7415esac
7416fi
7417DIRNAME=$ac_cv_path_DIRNAME
7418if test -n "$DIRNAME"; then
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7420$as_echo "$DIRNAME" >&6; }
7421else
7422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423$as_echo "no" >&6; }
7424fi
7425
7426
7427          if test "x$DIRNAME" = x; then
7428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7429          fi
7430        else
7431          # Otherwise we believe it is a complete path. Use it as it is.
7432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7433$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7435$as_echo_n "checking for DIRNAME... " >&6; }
7436          if test ! -x "$tool_specified"; then
7437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7438$as_echo "not found" >&6; }
7439            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7440          fi
7441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7442$as_echo "$tool_specified" >&6; }
7443        fi
7444      fi
7445    fi
7446
7447  fi
7448
7449
7450
7451  if test "x$DIRNAME" = x; then
7452    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7453  fi
7454
7455
7456
7457
7458
7459  # Publish this variable in the help.
7460
7461
7462  if [ -z "${ECHO+x}" ]; then
7463    # The variable is not set by user, try to locate tool using the code snippet
7464    for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509  else
7510    # The variable is set, but is it from the command line or the environment?
7511
7512    # Try to remove the string !ECHO! from our list.
7513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7515      # If it failed, the variable was not from the command line. Ignore it,
7516      # but warn the user (except for BASH, which is always set by the calling BASH).
7517      if test "xECHO" != xBASH; then
7518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7519$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7520      fi
7521      # Try to locate tool using the code snippet
7522      for ac_prog in echo
7523do
7524  # Extract the first word of "$ac_prog", so it can be a program name with args.
7525set dummy $ac_prog; ac_word=$2
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527$as_echo_n "checking for $ac_word... " >&6; }
7528if ${ac_cv_path_ECHO+:} false; then :
7529  $as_echo_n "(cached) " >&6
7530else
7531  case $ECHO in
7532  [\\/]* | ?:[\\/]*)
7533  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7534  ;;
7535  *)
7536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537for as_dir in $PATH
7538do
7539  IFS=$as_save_IFS
7540  test -z "$as_dir" && as_dir=.
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551  ;;
7552esac
7553fi
7554ECHO=$ac_cv_path_ECHO
7555if test -n "$ECHO"; then
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7557$as_echo "$ECHO" >&6; }
7558else
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7560$as_echo "no" >&6; }
7561fi
7562
7563
7564  test -n "$ECHO" && break
7565done
7566
7567    else
7568      # If it succeeded, then it was overridden by the user. We will use it
7569      # for the tool.
7570
7571      # First remove it from the list of overridden variables, so we can test
7572      # for unknown variables in the end.
7573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7574
7575      # Check if we try to supply an empty value
7576      if test "x$ECHO" = x; then
7577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7578$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7580$as_echo_n "checking for ECHO... " >&6; }
7581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7582$as_echo "disabled" >&6; }
7583      else
7584        # Check if the provided tool contains a complete path.
7585        tool_specified="$ECHO"
7586        tool_basename="${tool_specified##*/}"
7587        if test "x$tool_basename" = "x$tool_specified"; then
7588          # A command without a complete path is provided, search $PATH.
7589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7590$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7591          # Extract the first word of "$tool_basename", so it can be a program name with args.
7592set dummy $tool_basename; ac_word=$2
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594$as_echo_n "checking for $ac_word... " >&6; }
7595if ${ac_cv_path_ECHO+:} false; then :
7596  $as_echo_n "(cached) " >&6
7597else
7598  case $ECHO in
7599  [\\/]* | ?:[\\/]*)
7600  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7601  ;;
7602  *)
7603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7604for as_dir in $PATH
7605do
7606  IFS=$as_save_IFS
7607  test -z "$as_dir" && as_dir=.
7608    for ac_exec_ext in '' $ac_executable_extensions; do
7609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7610    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7612    break 2
7613  fi
7614done
7615  done
7616IFS=$as_save_IFS
7617
7618  ;;
7619esac
7620fi
7621ECHO=$ac_cv_path_ECHO
7622if test -n "$ECHO"; then
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7624$as_echo "$ECHO" >&6; }
7625else
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7627$as_echo "no" >&6; }
7628fi
7629
7630
7631          if test "x$ECHO" = x; then
7632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7633          fi
7634        else
7635          # Otherwise we believe it is a complete path. Use it as it is.
7636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7637$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7639$as_echo_n "checking for ECHO... " >&6; }
7640          if test ! -x "$tool_specified"; then
7641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7642$as_echo "not found" >&6; }
7643            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7644          fi
7645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7646$as_echo "$tool_specified" >&6; }
7647        fi
7648      fi
7649    fi
7650
7651  fi
7652
7653
7654
7655  if test "x$ECHO" = x; then
7656    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7657  fi
7658
7659
7660
7661
7662
7663  # Publish this variable in the help.
7664
7665
7666  if [ -z "${EXPR+x}" ]; then
7667    # The variable is not set by user, try to locate tool using the code snippet
7668    for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713  else
7714    # The variable is set, but is it from the command line or the environment?
7715
7716    # Try to remove the string !EXPR! from our list.
7717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7719      # If it failed, the variable was not from the command line. Ignore it,
7720      # but warn the user (except for BASH, which is always set by the calling BASH).
7721      if test "xEXPR" != xBASH; then
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7723$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7724      fi
7725      # Try to locate tool using the code snippet
7726      for ac_prog in expr
7727do
7728  # Extract the first word of "$ac_prog", so it can be a program name with args.
7729set dummy $ac_prog; ac_word=$2
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731$as_echo_n "checking for $ac_word... " >&6; }
7732if ${ac_cv_path_EXPR+:} false; then :
7733  $as_echo_n "(cached) " >&6
7734else
7735  case $EXPR in
7736  [\\/]* | ?:[\\/]*)
7737  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7738  ;;
7739  *)
7740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7741for as_dir in $PATH
7742do
7743  IFS=$as_save_IFS
7744  test -z "$as_dir" && as_dir=.
7745    for ac_exec_ext in '' $ac_executable_extensions; do
7746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7747    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7749    break 2
7750  fi
7751done
7752  done
7753IFS=$as_save_IFS
7754
7755  ;;
7756esac
7757fi
7758EXPR=$ac_cv_path_EXPR
7759if test -n "$EXPR"; then
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7761$as_echo "$EXPR" >&6; }
7762else
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7764$as_echo "no" >&6; }
7765fi
7766
7767
7768  test -n "$EXPR" && break
7769done
7770
7771    else
7772      # If it succeeded, then it was overridden by the user. We will use it
7773      # for the tool.
7774
7775      # First remove it from the list of overridden variables, so we can test
7776      # for unknown variables in the end.
7777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7778
7779      # Check if we try to supply an empty value
7780      if test "x$EXPR" = x; then
7781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7782$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7784$as_echo_n "checking for EXPR... " >&6; }
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7786$as_echo "disabled" >&6; }
7787      else
7788        # Check if the provided tool contains a complete path.
7789        tool_specified="$EXPR"
7790        tool_basename="${tool_specified##*/}"
7791        if test "x$tool_basename" = "x$tool_specified"; then
7792          # A command without a complete path is provided, search $PATH.
7793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7794$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7795          # Extract the first word of "$tool_basename", so it can be a program name with args.
7796set dummy $tool_basename; ac_word=$2
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798$as_echo_n "checking for $ac_word... " >&6; }
7799if ${ac_cv_path_EXPR+:} false; then :
7800  $as_echo_n "(cached) " >&6
7801else
7802  case $EXPR in
7803  [\\/]* | ?:[\\/]*)
7804  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7805  ;;
7806  *)
7807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808for as_dir in $PATH
7809do
7810  IFS=$as_save_IFS
7811  test -z "$as_dir" && as_dir=.
7812    for ac_exec_ext in '' $ac_executable_extensions; do
7813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816    break 2
7817  fi
7818done
7819  done
7820IFS=$as_save_IFS
7821
7822  ;;
7823esac
7824fi
7825EXPR=$ac_cv_path_EXPR
7826if test -n "$EXPR"; then
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7828$as_echo "$EXPR" >&6; }
7829else
7830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831$as_echo "no" >&6; }
7832fi
7833
7834
7835          if test "x$EXPR" = x; then
7836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7837          fi
7838        else
7839          # Otherwise we believe it is a complete path. Use it as it is.
7840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7841$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7843$as_echo_n "checking for EXPR... " >&6; }
7844          if test ! -x "$tool_specified"; then
7845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7846$as_echo "not found" >&6; }
7847            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7848          fi
7849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7850$as_echo "$tool_specified" >&6; }
7851        fi
7852      fi
7853    fi
7854
7855  fi
7856
7857
7858
7859  if test "x$EXPR" = x; then
7860    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7861  fi
7862
7863
7864
7865
7866
7867  # Publish this variable in the help.
7868
7869
7870  if [ -z "${FILE+x}" ]; then
7871    # The variable is not set by user, try to locate tool using the code snippet
7872    for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917  else
7918    # The variable is set, but is it from the command line or the environment?
7919
7920    # Try to remove the string !FILE! from our list.
7921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7923      # If it failed, the variable was not from the command line. Ignore it,
7924      # but warn the user (except for BASH, which is always set by the calling BASH).
7925      if test "xFILE" != xBASH; then
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7927$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7928      fi
7929      # Try to locate tool using the code snippet
7930      for ac_prog in file
7931do
7932  # Extract the first word of "$ac_prog", so it can be a program name with args.
7933set dummy $ac_prog; ac_word=$2
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7935$as_echo_n "checking for $ac_word... " >&6; }
7936if ${ac_cv_path_FILE+:} false; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  case $FILE in
7940  [\\/]* | ?:[\\/]*)
7941  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7942  ;;
7943  *)
7944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945for as_dir in $PATH
7946do
7947  IFS=$as_save_IFS
7948  test -z "$as_dir" && as_dir=.
7949    for ac_exec_ext in '' $ac_executable_extensions; do
7950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7951    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7953    break 2
7954  fi
7955done
7956  done
7957IFS=$as_save_IFS
7958
7959  ;;
7960esac
7961fi
7962FILE=$ac_cv_path_FILE
7963if test -n "$FILE"; then
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7965$as_echo "$FILE" >&6; }
7966else
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7968$as_echo "no" >&6; }
7969fi
7970
7971
7972  test -n "$FILE" && break
7973done
7974
7975    else
7976      # If it succeeded, then it was overridden by the user. We will use it
7977      # for the tool.
7978
7979      # First remove it from the list of overridden variables, so we can test
7980      # for unknown variables in the end.
7981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7982
7983      # Check if we try to supply an empty value
7984      if test "x$FILE" = x; then
7985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7986$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7988$as_echo_n "checking for FILE... " >&6; }
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7990$as_echo "disabled" >&6; }
7991      else
7992        # Check if the provided tool contains a complete path.
7993        tool_specified="$FILE"
7994        tool_basename="${tool_specified##*/}"
7995        if test "x$tool_basename" = "x$tool_specified"; then
7996          # A command without a complete path is provided, search $PATH.
7997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7998$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7999          # Extract the first word of "$tool_basename", so it can be a program name with args.
8000set dummy $tool_basename; ac_word=$2
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8002$as_echo_n "checking for $ac_word... " >&6; }
8003if ${ac_cv_path_FILE+:} false; then :
8004  $as_echo_n "(cached) " >&6
8005else
8006  case $FILE in
8007  [\\/]* | ?:[\\/]*)
8008  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8009  ;;
8010  *)
8011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8012for as_dir in $PATH
8013do
8014  IFS=$as_save_IFS
8015  test -z "$as_dir" && as_dir=.
8016    for ac_exec_ext in '' $ac_executable_extensions; do
8017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8018    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8020    break 2
8021  fi
8022done
8023  done
8024IFS=$as_save_IFS
8025
8026  ;;
8027esac
8028fi
8029FILE=$ac_cv_path_FILE
8030if test -n "$FILE"; then
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8032$as_echo "$FILE" >&6; }
8033else
8034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035$as_echo "no" >&6; }
8036fi
8037
8038
8039          if test "x$FILE" = x; then
8040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8041          fi
8042        else
8043          # Otherwise we believe it is a complete path. Use it as it is.
8044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8045$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8047$as_echo_n "checking for FILE... " >&6; }
8048          if test ! -x "$tool_specified"; then
8049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8050$as_echo "not found" >&6; }
8051            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8052          fi
8053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8054$as_echo "$tool_specified" >&6; }
8055        fi
8056      fi
8057    fi
8058
8059  fi
8060
8061
8062
8063  if test "x$FILE" = x; then
8064    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8065  fi
8066
8067
8068
8069
8070
8071  # Publish this variable in the help.
8072
8073
8074  if [ -z "${FIND+x}" ]; then
8075    # The variable is not set by user, try to locate tool using the code snippet
8076    for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121  else
8122    # The variable is set, but is it from the command line or the environment?
8123
8124    # Try to remove the string !FIND! from our list.
8125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8127      # If it failed, the variable was not from the command line. Ignore it,
8128      # but warn the user (except for BASH, which is always set by the calling BASH).
8129      if test "xFIND" != xBASH; then
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8131$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8132      fi
8133      # Try to locate tool using the code snippet
8134      for ac_prog in find
8135do
8136  # Extract the first word of "$ac_prog", so it can be a program name with args.
8137set dummy $ac_prog; ac_word=$2
8138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8139$as_echo_n "checking for $ac_word... " >&6; }
8140if ${ac_cv_path_FIND+:} false; then :
8141  $as_echo_n "(cached) " >&6
8142else
8143  case $FIND in
8144  [\\/]* | ?:[\\/]*)
8145  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8146  ;;
8147  *)
8148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149for as_dir in $PATH
8150do
8151  IFS=$as_save_IFS
8152  test -z "$as_dir" && as_dir=.
8153    for ac_exec_ext in '' $ac_executable_extensions; do
8154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8155    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8157    break 2
8158  fi
8159done
8160  done
8161IFS=$as_save_IFS
8162
8163  ;;
8164esac
8165fi
8166FIND=$ac_cv_path_FIND
8167if test -n "$FIND"; then
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8169$as_echo "$FIND" >&6; }
8170else
8171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172$as_echo "no" >&6; }
8173fi
8174
8175
8176  test -n "$FIND" && break
8177done
8178
8179    else
8180      # If it succeeded, then it was overridden by the user. We will use it
8181      # for the tool.
8182
8183      # First remove it from the list of overridden variables, so we can test
8184      # for unknown variables in the end.
8185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8186
8187      # Check if we try to supply an empty value
8188      if test "x$FIND" = x; then
8189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8190$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8192$as_echo_n "checking for FIND... " >&6; }
8193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8194$as_echo "disabled" >&6; }
8195      else
8196        # Check if the provided tool contains a complete path.
8197        tool_specified="$FIND"
8198        tool_basename="${tool_specified##*/}"
8199        if test "x$tool_basename" = "x$tool_specified"; then
8200          # A command without a complete path is provided, search $PATH.
8201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8202$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8203          # Extract the first word of "$tool_basename", so it can be a program name with args.
8204set dummy $tool_basename; ac_word=$2
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8206$as_echo_n "checking for $ac_word... " >&6; }
8207if ${ac_cv_path_FIND+:} false; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  case $FIND in
8211  [\\/]* | ?:[\\/]*)
8212  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8213  ;;
8214  *)
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH
8217do
8218  IFS=$as_save_IFS
8219  test -z "$as_dir" && as_dir=.
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8222    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8224    break 2
8225  fi
8226done
8227  done
8228IFS=$as_save_IFS
8229
8230  ;;
8231esac
8232fi
8233FIND=$ac_cv_path_FIND
8234if test -n "$FIND"; then
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8236$as_echo "$FIND" >&6; }
8237else
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243          if test "x$FIND" = x; then
8244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8245          fi
8246        else
8247          # Otherwise we believe it is a complete path. Use it as it is.
8248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8249$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8251$as_echo_n "checking for FIND... " >&6; }
8252          if test ! -x "$tool_specified"; then
8253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8254$as_echo "not found" >&6; }
8255            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8256          fi
8257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8258$as_echo "$tool_specified" >&6; }
8259        fi
8260      fi
8261    fi
8262
8263  fi
8264
8265
8266
8267  if test "x$FIND" = x; then
8268    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8269  fi
8270
8271
8272
8273
8274
8275  # Publish this variable in the help.
8276
8277
8278  if [ -z "${HEAD+x}" ]; then
8279    # The variable is not set by user, try to locate tool using the code snippet
8280    for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325  else
8326    # The variable is set, but is it from the command line or the environment?
8327
8328    # Try to remove the string !HEAD! from our list.
8329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8331      # If it failed, the variable was not from the command line. Ignore it,
8332      # but warn the user (except for BASH, which is always set by the calling BASH).
8333      if test "xHEAD" != xBASH; then
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8335$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8336      fi
8337      # Try to locate tool using the code snippet
8338      for ac_prog in head
8339do
8340  # Extract the first word of "$ac_prog", so it can be a program name with args.
8341set dummy $ac_prog; ac_word=$2
8342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8343$as_echo_n "checking for $ac_word... " >&6; }
8344if ${ac_cv_path_HEAD+:} false; then :
8345  $as_echo_n "(cached) " >&6
8346else
8347  case $HEAD in
8348  [\\/]* | ?:[\\/]*)
8349  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8350  ;;
8351  *)
8352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8353for as_dir in $PATH
8354do
8355  IFS=$as_save_IFS
8356  test -z "$as_dir" && as_dir=.
8357    for ac_exec_ext in '' $ac_executable_extensions; do
8358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8359    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8361    break 2
8362  fi
8363done
8364  done
8365IFS=$as_save_IFS
8366
8367  ;;
8368esac
8369fi
8370HEAD=$ac_cv_path_HEAD
8371if test -n "$HEAD"; then
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8373$as_echo "$HEAD" >&6; }
8374else
8375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8376$as_echo "no" >&6; }
8377fi
8378
8379
8380  test -n "$HEAD" && break
8381done
8382
8383    else
8384      # If it succeeded, then it was overridden by the user. We will use it
8385      # for the tool.
8386
8387      # First remove it from the list of overridden variables, so we can test
8388      # for unknown variables in the end.
8389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8390
8391      # Check if we try to supply an empty value
8392      if test "x$HEAD" = x; then
8393        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8394$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8396$as_echo_n "checking for HEAD... " >&6; }
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8398$as_echo "disabled" >&6; }
8399      else
8400        # Check if the provided tool contains a complete path.
8401        tool_specified="$HEAD"
8402        tool_basename="${tool_specified##*/}"
8403        if test "x$tool_basename" = "x$tool_specified"; then
8404          # A command without a complete path is provided, search $PATH.
8405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8406$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8407          # Extract the first word of "$tool_basename", so it can be a program name with args.
8408set dummy $tool_basename; ac_word=$2
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8410$as_echo_n "checking for $ac_word... " >&6; }
8411if ${ac_cv_path_HEAD+:} false; then :
8412  $as_echo_n "(cached) " >&6
8413else
8414  case $HEAD in
8415  [\\/]* | ?:[\\/]*)
8416  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8417  ;;
8418  *)
8419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8420for as_dir in $PATH
8421do
8422  IFS=$as_save_IFS
8423  test -z "$as_dir" && as_dir=.
8424    for ac_exec_ext in '' $ac_executable_extensions; do
8425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8426    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8428    break 2
8429  fi
8430done
8431  done
8432IFS=$as_save_IFS
8433
8434  ;;
8435esac
8436fi
8437HEAD=$ac_cv_path_HEAD
8438if test -n "$HEAD"; then
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8440$as_echo "$HEAD" >&6; }
8441else
8442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443$as_echo "no" >&6; }
8444fi
8445
8446
8447          if test "x$HEAD" = x; then
8448            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8449          fi
8450        else
8451          # Otherwise we believe it is a complete path. Use it as it is.
8452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8453$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8455$as_echo_n "checking for HEAD... " >&6; }
8456          if test ! -x "$tool_specified"; then
8457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8458$as_echo "not found" >&6; }
8459            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8460          fi
8461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8462$as_echo "$tool_specified" >&6; }
8463        fi
8464      fi
8465    fi
8466
8467  fi
8468
8469
8470
8471  if test "x$HEAD" = x; then
8472    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8473  fi
8474
8475
8476
8477
8478
8479  # Publish this variable in the help.
8480
8481
8482  if [ -z "${GUNZIP+x}" ]; then
8483    # The variable is not set by user, try to locate tool using the code snippet
8484    for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529  else
8530    # The variable is set, but is it from the command line or the environment?
8531
8532    # Try to remove the string !GUNZIP! from our list.
8533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8535      # If it failed, the variable was not from the command line. Ignore it,
8536      # but warn the user (except for BASH, which is always set by the calling BASH).
8537      if test "xGUNZIP" != xBASH; then
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8539$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8540      fi
8541      # Try to locate tool using the code snippet
8542      for ac_prog in gunzip
8543do
8544  # Extract the first word of "$ac_prog", so it can be a program name with args.
8545set dummy $ac_prog; ac_word=$2
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if ${ac_cv_path_GUNZIP+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  case $GUNZIP in
8552  [\\/]* | ?:[\\/]*)
8553  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8554  ;;
8555  *)
8556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557for as_dir in $PATH
8558do
8559  IFS=$as_save_IFS
8560  test -z "$as_dir" && as_dir=.
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571  ;;
8572esac
8573fi
8574GUNZIP=$ac_cv_path_GUNZIP
8575if test -n "$GUNZIP"; then
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8577$as_echo "$GUNZIP" >&6; }
8578else
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8580$as_echo "no" >&6; }
8581fi
8582
8583
8584  test -n "$GUNZIP" && break
8585done
8586
8587    else
8588      # If it succeeded, then it was overridden by the user. We will use it
8589      # for the tool.
8590
8591      # First remove it from the list of overridden variables, so we can test
8592      # for unknown variables in the end.
8593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8594
8595      # Check if we try to supply an empty value
8596      if test "x$GUNZIP" = x; then
8597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8598$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8600$as_echo_n "checking for GUNZIP... " >&6; }
8601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8602$as_echo "disabled" >&6; }
8603      else
8604        # Check if the provided tool contains a complete path.
8605        tool_specified="$GUNZIP"
8606        tool_basename="${tool_specified##*/}"
8607        if test "x$tool_basename" = "x$tool_specified"; then
8608          # A command without a complete path is provided, search $PATH.
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8610$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8611          # Extract the first word of "$tool_basename", so it can be a program name with args.
8612set dummy $tool_basename; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
8615if ${ac_cv_path_GUNZIP+:} false; then :
8616  $as_echo_n "(cached) " >&6
8617else
8618  case $GUNZIP in
8619  [\\/]* | ?:[\\/]*)
8620  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8621  ;;
8622  *)
8623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH
8625do
8626  IFS=$as_save_IFS
8627  test -z "$as_dir" && as_dir=.
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8630    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632    break 2
8633  fi
8634done
8635  done
8636IFS=$as_save_IFS
8637
8638  ;;
8639esac
8640fi
8641GUNZIP=$ac_cv_path_GUNZIP
8642if test -n "$GUNZIP"; then
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8644$as_echo "$GUNZIP" >&6; }
8645else
8646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648fi
8649
8650
8651          if test "x$GUNZIP" = x; then
8652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8653          fi
8654        else
8655          # Otherwise we believe it is a complete path. Use it as it is.
8656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8657$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8659$as_echo_n "checking for GUNZIP... " >&6; }
8660          if test ! -x "$tool_specified"; then
8661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8662$as_echo "not found" >&6; }
8663            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8664          fi
8665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8666$as_echo "$tool_specified" >&6; }
8667        fi
8668      fi
8669    fi
8670
8671  fi
8672
8673
8674
8675  if test "x$GUNZIP" = x; then
8676    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8677  fi
8678
8679
8680
8681
8682
8683  # Publish this variable in the help.
8684
8685
8686  if [ -z "${GZIP+x}" ]; then
8687    # The variable is not set by user, try to locate tool using the code snippet
8688    for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733  else
8734    # The variable is set, but is it from the command line or the environment?
8735
8736    # Try to remove the string !GZIP! from our list.
8737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8739      # If it failed, the variable was not from the command line. Ignore it,
8740      # but warn the user (except for BASH, which is always set by the calling BASH).
8741      if test "xGZIP" != xBASH; then
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8743$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8744      fi
8745      # Try to locate tool using the code snippet
8746      for ac_prog in pigz gzip
8747do
8748  # Extract the first word of "$ac_prog", so it can be a program name with args.
8749set dummy $ac_prog; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_GZIP+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $GZIP in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778GZIP=$ac_cv_path_GZIP
8779if test -n "$GZIP"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8781$as_echo "$GZIP" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788  test -n "$GZIP" && break
8789done
8790
8791    else
8792      # If it succeeded, then it was overridden by the user. We will use it
8793      # for the tool.
8794
8795      # First remove it from the list of overridden variables, so we can test
8796      # for unknown variables in the end.
8797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8798
8799      # Check if we try to supply an empty value
8800      if test "x$GZIP" = x; then
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8802$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8804$as_echo_n "checking for GZIP... " >&6; }
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8806$as_echo "disabled" >&6; }
8807      else
8808        # Check if the provided tool contains a complete path.
8809        tool_specified="$GZIP"
8810        tool_basename="${tool_specified##*/}"
8811        if test "x$tool_basename" = "x$tool_specified"; then
8812          # A command without a complete path is provided, search $PATH.
8813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8814$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8815          # Extract the first word of "$tool_basename", so it can be a program name with args.
8816set dummy $tool_basename; ac_word=$2
8817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8818$as_echo_n "checking for $ac_word... " >&6; }
8819if ${ac_cv_path_GZIP+:} false; then :
8820  $as_echo_n "(cached) " >&6
8821else
8822  case $GZIP in
8823  [\\/]* | ?:[\\/]*)
8824  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8825  ;;
8826  *)
8827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8828for as_dir in $PATH
8829do
8830  IFS=$as_save_IFS
8831  test -z "$as_dir" && as_dir=.
8832    for ac_exec_ext in '' $ac_executable_extensions; do
8833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8834    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8836    break 2
8837  fi
8838done
8839  done
8840IFS=$as_save_IFS
8841
8842  ;;
8843esac
8844fi
8845GZIP=$ac_cv_path_GZIP
8846if test -n "$GZIP"; then
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8848$as_echo "$GZIP" >&6; }
8849else
8850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8851$as_echo "no" >&6; }
8852fi
8853
8854
8855          if test "x$GZIP" = x; then
8856            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8857          fi
8858        else
8859          # Otherwise we believe it is a complete path. Use it as it is.
8860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8861$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8862          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8863$as_echo_n "checking for GZIP... " >&6; }
8864          if test ! -x "$tool_specified"; then
8865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8866$as_echo "not found" >&6; }
8867            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8868          fi
8869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8870$as_echo "$tool_specified" >&6; }
8871        fi
8872      fi
8873    fi
8874
8875  fi
8876
8877
8878
8879  if test "x$GZIP" = x; then
8880    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8881  fi
8882
8883
8884
8885
8886
8887  # Publish this variable in the help.
8888
8889
8890  if [ -z "${LN+x}" ]; then
8891    # The variable is not set by user, try to locate tool using the code snippet
8892    for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937  else
8938    # The variable is set, but is it from the command line or the environment?
8939
8940    # Try to remove the string !LN! from our list.
8941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8943      # If it failed, the variable was not from the command line. Ignore it,
8944      # but warn the user (except for BASH, which is always set by the calling BASH).
8945      if test "xLN" != xBASH; then
8946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8947$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8948      fi
8949      # Try to locate tool using the code snippet
8950      for ac_prog in ln
8951do
8952  # Extract the first word of "$ac_prog", so it can be a program name with args.
8953set dummy $ac_prog; ac_word=$2
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8955$as_echo_n "checking for $ac_word... " >&6; }
8956if ${ac_cv_path_LN+:} false; then :
8957  $as_echo_n "(cached) " >&6
8958else
8959  case $LN in
8960  [\\/]* | ?:[\\/]*)
8961  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8962  ;;
8963  *)
8964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965for as_dir in $PATH
8966do
8967  IFS=$as_save_IFS
8968  test -z "$as_dir" && as_dir=.
8969    for ac_exec_ext in '' $ac_executable_extensions; do
8970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8971    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8973    break 2
8974  fi
8975done
8976  done
8977IFS=$as_save_IFS
8978
8979  ;;
8980esac
8981fi
8982LN=$ac_cv_path_LN
8983if test -n "$LN"; then
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8985$as_echo "$LN" >&6; }
8986else
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
8989fi
8990
8991
8992  test -n "$LN" && break
8993done
8994
8995    else
8996      # If it succeeded, then it was overridden by the user. We will use it
8997      # for the tool.
8998
8999      # First remove it from the list of overridden variables, so we can test
9000      # for unknown variables in the end.
9001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9002
9003      # Check if we try to supply an empty value
9004      if test "x$LN" = x; then
9005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9006$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9008$as_echo_n "checking for LN... " >&6; }
9009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9010$as_echo "disabled" >&6; }
9011      else
9012        # Check if the provided tool contains a complete path.
9013        tool_specified="$LN"
9014        tool_basename="${tool_specified##*/}"
9015        if test "x$tool_basename" = "x$tool_specified"; then
9016          # A command without a complete path is provided, search $PATH.
9017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9018$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9019          # Extract the first word of "$tool_basename", so it can be a program name with args.
9020set dummy $tool_basename; ac_word=$2
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9022$as_echo_n "checking for $ac_word... " >&6; }
9023if ${ac_cv_path_LN+:} false; then :
9024  $as_echo_n "(cached) " >&6
9025else
9026  case $LN in
9027  [\\/]* | ?:[\\/]*)
9028  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9029  ;;
9030  *)
9031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032for as_dir in $PATH
9033do
9034  IFS=$as_save_IFS
9035  test -z "$as_dir" && as_dir=.
9036    for ac_exec_ext in '' $ac_executable_extensions; do
9037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9040    break 2
9041  fi
9042done
9043  done
9044IFS=$as_save_IFS
9045
9046  ;;
9047esac
9048fi
9049LN=$ac_cv_path_LN
9050if test -n "$LN"; then
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9052$as_echo "$LN" >&6; }
9053else
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
9056fi
9057
9058
9059          if test "x$LN" = x; then
9060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9061          fi
9062        else
9063          # Otherwise we believe it is a complete path. Use it as it is.
9064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9065$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9067$as_echo_n "checking for LN... " >&6; }
9068          if test ! -x "$tool_specified"; then
9069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9070$as_echo "not found" >&6; }
9071            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9072          fi
9073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9074$as_echo "$tool_specified" >&6; }
9075        fi
9076      fi
9077    fi
9078
9079  fi
9080
9081
9082
9083  if test "x$LN" = x; then
9084    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9085  fi
9086
9087
9088
9089
9090
9091  # Publish this variable in the help.
9092
9093
9094  if [ -z "${LS+x}" ]; then
9095    # The variable is not set by user, try to locate tool using the code snippet
9096    for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141  else
9142    # The variable is set, but is it from the command line or the environment?
9143
9144    # Try to remove the string !LS! from our list.
9145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9147      # If it failed, the variable was not from the command line. Ignore it,
9148      # but warn the user (except for BASH, which is always set by the calling BASH).
9149      if test "xLS" != xBASH; then
9150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9151$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9152      fi
9153      # Try to locate tool using the code snippet
9154      for ac_prog in ls
9155do
9156  # Extract the first word of "$ac_prog", so it can be a program name with args.
9157set dummy $ac_prog; ac_word=$2
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9159$as_echo_n "checking for $ac_word... " >&6; }
9160if ${ac_cv_path_LS+:} false; then :
9161  $as_echo_n "(cached) " >&6
9162else
9163  case $LS in
9164  [\\/]* | ?:[\\/]*)
9165  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9166  ;;
9167  *)
9168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9169for as_dir in $PATH
9170do
9171  IFS=$as_save_IFS
9172  test -z "$as_dir" && as_dir=.
9173    for ac_exec_ext in '' $ac_executable_extensions; do
9174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9175    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9177    break 2
9178  fi
9179done
9180  done
9181IFS=$as_save_IFS
9182
9183  ;;
9184esac
9185fi
9186LS=$ac_cv_path_LS
9187if test -n "$LS"; then
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9189$as_echo "$LS" >&6; }
9190else
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
9194
9195
9196  test -n "$LS" && break
9197done
9198
9199    else
9200      # If it succeeded, then it was overridden by the user. We will use it
9201      # for the tool.
9202
9203      # First remove it from the list of overridden variables, so we can test
9204      # for unknown variables in the end.
9205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9206
9207      # Check if we try to supply an empty value
9208      if test "x$LS" = x; then
9209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9210$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9212$as_echo_n "checking for LS... " >&6; }
9213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9214$as_echo "disabled" >&6; }
9215      else
9216        # Check if the provided tool contains a complete path.
9217        tool_specified="$LS"
9218        tool_basename="${tool_specified##*/}"
9219        if test "x$tool_basename" = "x$tool_specified"; then
9220          # A command without a complete path is provided, search $PATH.
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9222$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9223          # Extract the first word of "$tool_basename", so it can be a program name with args.
9224set dummy $tool_basename; ac_word=$2
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
9227if ${ac_cv_path_LS+:} false; then :
9228  $as_echo_n "(cached) " >&6
9229else
9230  case $LS in
9231  [\\/]* | ?:[\\/]*)
9232  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9233  ;;
9234  *)
9235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250  ;;
9251esac
9252fi
9253LS=$ac_cv_path_LS
9254if test -n "$LS"; then
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9256$as_echo "$LS" >&6; }
9257else
9258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
9260fi
9261
9262
9263          if test "x$LS" = x; then
9264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9265          fi
9266        else
9267          # Otherwise we believe it is a complete path. Use it as it is.
9268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9269$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9271$as_echo_n "checking for LS... " >&6; }
9272          if test ! -x "$tool_specified"; then
9273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9274$as_echo "not found" >&6; }
9275            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9276          fi
9277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9278$as_echo "$tool_specified" >&6; }
9279        fi
9280      fi
9281    fi
9282
9283  fi
9284
9285
9286
9287  if test "x$LS" = x; then
9288    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9289  fi
9290
9291
9292
9293
9294
9295  # Publish this variable in the help.
9296
9297
9298  if [ -z "${MKDIR+x}" ]; then
9299    # The variable is not set by user, try to locate tool using the code snippet
9300    for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345  else
9346    # The variable is set, but is it from the command line or the environment?
9347
9348    # Try to remove the string !MKDIR! from our list.
9349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9351      # If it failed, the variable was not from the command line. Ignore it,
9352      # but warn the user (except for BASH, which is always set by the calling BASH).
9353      if test "xMKDIR" != xBASH; then
9354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9355$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9356      fi
9357      # Try to locate tool using the code snippet
9358      for ac_prog in mkdir
9359do
9360  # Extract the first word of "$ac_prog", so it can be a program name with args.
9361set dummy $ac_prog; ac_word=$2
9362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9363$as_echo_n "checking for $ac_word... " >&6; }
9364if ${ac_cv_path_MKDIR+:} false; then :
9365  $as_echo_n "(cached) " >&6
9366else
9367  case $MKDIR in
9368  [\\/]* | ?:[\\/]*)
9369  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9370  ;;
9371  *)
9372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373for as_dir in $PATH
9374do
9375  IFS=$as_save_IFS
9376  test -z "$as_dir" && as_dir=.
9377    for ac_exec_ext in '' $ac_executable_extensions; do
9378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9379    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9381    break 2
9382  fi
9383done
9384  done
9385IFS=$as_save_IFS
9386
9387  ;;
9388esac
9389fi
9390MKDIR=$ac_cv_path_MKDIR
9391if test -n "$MKDIR"; then
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9393$as_echo "$MKDIR" >&6; }
9394else
9395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
9397fi
9398
9399
9400  test -n "$MKDIR" && break
9401done
9402
9403    else
9404      # If it succeeded, then it was overridden by the user. We will use it
9405      # for the tool.
9406
9407      # First remove it from the list of overridden variables, so we can test
9408      # for unknown variables in the end.
9409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9410
9411      # Check if we try to supply an empty value
9412      if test "x$MKDIR" = x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9414$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9416$as_echo_n "checking for MKDIR... " >&6; }
9417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9418$as_echo "disabled" >&6; }
9419      else
9420        # Check if the provided tool contains a complete path.
9421        tool_specified="$MKDIR"
9422        tool_basename="${tool_specified##*/}"
9423        if test "x$tool_basename" = "x$tool_specified"; then
9424          # A command without a complete path is provided, search $PATH.
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9426$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9427          # Extract the first word of "$tool_basename", so it can be a program name with args.
9428set dummy $tool_basename; ac_word=$2
9429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430$as_echo_n "checking for $ac_word... " >&6; }
9431if ${ac_cv_path_MKDIR+:} false; then :
9432  $as_echo_n "(cached) " >&6
9433else
9434  case $MKDIR in
9435  [\\/]* | ?:[\\/]*)
9436  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9437  ;;
9438  *)
9439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9440for as_dir in $PATH
9441do
9442  IFS=$as_save_IFS
9443  test -z "$as_dir" && as_dir=.
9444    for ac_exec_ext in '' $ac_executable_extensions; do
9445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9446    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9448    break 2
9449  fi
9450done
9451  done
9452IFS=$as_save_IFS
9453
9454  ;;
9455esac
9456fi
9457MKDIR=$ac_cv_path_MKDIR
9458if test -n "$MKDIR"; then
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9460$as_echo "$MKDIR" >&6; }
9461else
9462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464fi
9465
9466
9467          if test "x$MKDIR" = x; then
9468            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9469          fi
9470        else
9471          # Otherwise we believe it is a complete path. Use it as it is.
9472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9473$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9474          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9475$as_echo_n "checking for MKDIR... " >&6; }
9476          if test ! -x "$tool_specified"; then
9477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9478$as_echo "not found" >&6; }
9479            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9480          fi
9481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9482$as_echo "$tool_specified" >&6; }
9483        fi
9484      fi
9485    fi
9486
9487  fi
9488
9489
9490
9491  if test "x$MKDIR" = x; then
9492    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9493  fi
9494
9495
9496
9497
9498
9499  # Publish this variable in the help.
9500
9501
9502  if [ -z "${MKTEMP+x}" ]; then
9503    # The variable is not set by user, try to locate tool using the code snippet
9504    for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549  else
9550    # The variable is set, but is it from the command line or the environment?
9551
9552    # Try to remove the string !MKTEMP! from our list.
9553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9555      # If it failed, the variable was not from the command line. Ignore it,
9556      # but warn the user (except for BASH, which is always set by the calling BASH).
9557      if test "xMKTEMP" != xBASH; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9559$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9560      fi
9561      # Try to locate tool using the code snippet
9562      for ac_prog in mktemp
9563do
9564  # Extract the first word of "$ac_prog", so it can be a program name with args.
9565set dummy $ac_prog; ac_word=$2
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9567$as_echo_n "checking for $ac_word... " >&6; }
9568if ${ac_cv_path_MKTEMP+:} false; then :
9569  $as_echo_n "(cached) " >&6
9570else
9571  case $MKTEMP in
9572  [\\/]* | ?:[\\/]*)
9573  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9574  ;;
9575  *)
9576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9577for as_dir in $PATH
9578do
9579  IFS=$as_save_IFS
9580  test -z "$as_dir" && as_dir=.
9581    for ac_exec_ext in '' $ac_executable_extensions; do
9582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9583    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9585    break 2
9586  fi
9587done
9588  done
9589IFS=$as_save_IFS
9590
9591  ;;
9592esac
9593fi
9594MKTEMP=$ac_cv_path_MKTEMP
9595if test -n "$MKTEMP"; then
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9597$as_echo "$MKTEMP" >&6; }
9598else
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
9601fi
9602
9603
9604  test -n "$MKTEMP" && break
9605done
9606
9607    else
9608      # If it succeeded, then it was overridden by the user. We will use it
9609      # for the tool.
9610
9611      # First remove it from the list of overridden variables, so we can test
9612      # for unknown variables in the end.
9613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9614
9615      # Check if we try to supply an empty value
9616      if test "x$MKTEMP" = x; then
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9618$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9620$as_echo_n "checking for MKTEMP... " >&6; }
9621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9622$as_echo "disabled" >&6; }
9623      else
9624        # Check if the provided tool contains a complete path.
9625        tool_specified="$MKTEMP"
9626        tool_basename="${tool_specified##*/}"
9627        if test "x$tool_basename" = "x$tool_specified"; then
9628          # A command without a complete path is provided, search $PATH.
9629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9630$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9631          # Extract the first word of "$tool_basename", so it can be a program name with args.
9632set dummy $tool_basename; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_MKTEMP+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $MKTEMP in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661MKTEMP=$ac_cv_path_MKTEMP
9662if test -n "$MKTEMP"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9664$as_echo "$MKTEMP" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671          if test "x$MKTEMP" = x; then
9672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673          fi
9674        else
9675          # Otherwise we believe it is a complete path. Use it as it is.
9676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9677$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9679$as_echo_n "checking for MKTEMP... " >&6; }
9680          if test ! -x "$tool_specified"; then
9681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682$as_echo "not found" >&6; }
9683            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9684          fi
9685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686$as_echo "$tool_specified" >&6; }
9687        fi
9688      fi
9689    fi
9690
9691  fi
9692
9693
9694
9695  if test "x$MKTEMP" = x; then
9696    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9697  fi
9698
9699
9700
9701
9702
9703  # Publish this variable in the help.
9704
9705
9706  if [ -z "${MV+x}" ]; then
9707    # The variable is not set by user, try to locate tool using the code snippet
9708    for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753  else
9754    # The variable is set, but is it from the command line or the environment?
9755
9756    # Try to remove the string !MV! from our list.
9757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9759      # If it failed, the variable was not from the command line. Ignore it,
9760      # but warn the user (except for BASH, which is always set by the calling BASH).
9761      if test "xMV" != xBASH; then
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9763$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9764      fi
9765      # Try to locate tool using the code snippet
9766      for ac_prog in mv
9767do
9768  # Extract the first word of "$ac_prog", so it can be a program name with args.
9769set dummy $ac_prog; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if ${ac_cv_path_MV+:} false; then :
9773  $as_echo_n "(cached) " >&6
9774else
9775  case $MV in
9776  [\\/]* | ?:[\\/]*)
9777  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9778  ;;
9779  *)
9780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781for as_dir in $PATH
9782do
9783  IFS=$as_save_IFS
9784  test -z "$as_dir" && as_dir=.
9785    for ac_exec_ext in '' $ac_executable_extensions; do
9786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9787    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789    break 2
9790  fi
9791done
9792  done
9793IFS=$as_save_IFS
9794
9795  ;;
9796esac
9797fi
9798MV=$ac_cv_path_MV
9799if test -n "$MV"; then
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9801$as_echo "$MV" >&6; }
9802else
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805fi
9806
9807
9808  test -n "$MV" && break
9809done
9810
9811    else
9812      # If it succeeded, then it was overridden by the user. We will use it
9813      # for the tool.
9814
9815      # First remove it from the list of overridden variables, so we can test
9816      # for unknown variables in the end.
9817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9818
9819      # Check if we try to supply an empty value
9820      if test "x$MV" = x; then
9821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9822$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9824$as_echo_n "checking for MV... " >&6; }
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9826$as_echo "disabled" >&6; }
9827      else
9828        # Check if the provided tool contains a complete path.
9829        tool_specified="$MV"
9830        tool_basename="${tool_specified##*/}"
9831        if test "x$tool_basename" = "x$tool_specified"; then
9832          # A command without a complete path is provided, search $PATH.
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9834$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9835          # Extract the first word of "$tool_basename", so it can be a program name with args.
9836set dummy $tool_basename; ac_word=$2
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838$as_echo_n "checking for $ac_word... " >&6; }
9839if ${ac_cv_path_MV+:} false; then :
9840  $as_echo_n "(cached) " >&6
9841else
9842  case $MV in
9843  [\\/]* | ?:[\\/]*)
9844  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9845  ;;
9846  *)
9847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9848for as_dir in $PATH
9849do
9850  IFS=$as_save_IFS
9851  test -z "$as_dir" && as_dir=.
9852    for ac_exec_ext in '' $ac_executable_extensions; do
9853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9854    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9856    break 2
9857  fi
9858done
9859  done
9860IFS=$as_save_IFS
9861
9862  ;;
9863esac
9864fi
9865MV=$ac_cv_path_MV
9866if test -n "$MV"; then
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9868$as_echo "$MV" >&6; }
9869else
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
9872fi
9873
9874
9875          if test "x$MV" = x; then
9876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9877          fi
9878        else
9879          # Otherwise we believe it is a complete path. Use it as it is.
9880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9881$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9883$as_echo_n "checking for MV... " >&6; }
9884          if test ! -x "$tool_specified"; then
9885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9886$as_echo "not found" >&6; }
9887            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9888          fi
9889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9890$as_echo "$tool_specified" >&6; }
9891        fi
9892      fi
9893    fi
9894
9895  fi
9896
9897
9898
9899  if test "x$MV" = x; then
9900    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9901  fi
9902
9903
9904
9905
9906
9907  # Publish this variable in the help.
9908
9909
9910  if [ -z "${NAWK+x}" ]; then
9911    # The variable is not set by user, try to locate tool using the code snippet
9912    for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957  else
9958    # The variable is set, but is it from the command line or the environment?
9959
9960    # Try to remove the string !NAWK! from our list.
9961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9963      # If it failed, the variable was not from the command line. Ignore it,
9964      # but warn the user (except for BASH, which is always set by the calling BASH).
9965      if test "xNAWK" != xBASH; then
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9967$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9968      fi
9969      # Try to locate tool using the code snippet
9970      for ac_prog in nawk gawk awk
9971do
9972  # Extract the first word of "$ac_prog", so it can be a program name with args.
9973set dummy $ac_prog; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if ${ac_cv_path_NAWK+:} false; then :
9977  $as_echo_n "(cached) " >&6
9978else
9979  case $NAWK in
9980  [\\/]* | ?:[\\/]*)
9981  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9982  ;;
9983  *)
9984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987  IFS=$as_save_IFS
9988  test -z "$as_dir" && as_dir=.
9989    for ac_exec_ext in '' $ac_executable_extensions; do
9990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993    break 2
9994  fi
9995done
9996  done
9997IFS=$as_save_IFS
9998
9999  ;;
10000esac
10001fi
10002NAWK=$ac_cv_path_NAWK
10003if test -n "$NAWK"; then
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10005$as_echo "$NAWK" >&6; }
10006else
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009fi
10010
10011
10012  test -n "$NAWK" && break
10013done
10014
10015    else
10016      # If it succeeded, then it was overridden by the user. We will use it
10017      # for the tool.
10018
10019      # First remove it from the list of overridden variables, so we can test
10020      # for unknown variables in the end.
10021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10022
10023      # Check if we try to supply an empty value
10024      if test "x$NAWK" = x; then
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10026$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10028$as_echo_n "checking for NAWK... " >&6; }
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10030$as_echo "disabled" >&6; }
10031      else
10032        # Check if the provided tool contains a complete path.
10033        tool_specified="$NAWK"
10034        tool_basename="${tool_specified##*/}"
10035        if test "x$tool_basename" = "x$tool_specified"; then
10036          # A command without a complete path is provided, search $PATH.
10037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10038$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10039          # Extract the first word of "$tool_basename", so it can be a program name with args.
10040set dummy $tool_basename; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if ${ac_cv_path_NAWK+:} false; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $NAWK in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10058    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069NAWK=$ac_cv_path_NAWK
10070if test -n "$NAWK"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10072$as_echo "$NAWK" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079          if test "x$NAWK" = x; then
10080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10081          fi
10082        else
10083          # Otherwise we believe it is a complete path. Use it as it is.
10084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10085$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10087$as_echo_n "checking for NAWK... " >&6; }
10088          if test ! -x "$tool_specified"; then
10089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10090$as_echo "not found" >&6; }
10091            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10092          fi
10093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10094$as_echo "$tool_specified" >&6; }
10095        fi
10096      fi
10097    fi
10098
10099  fi
10100
10101
10102
10103  if test "x$NAWK" = x; then
10104    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10105  fi
10106
10107
10108
10109
10110
10111  # Publish this variable in the help.
10112
10113
10114  if [ -z "${PRINTF+x}" ]; then
10115    # The variable is not set by user, try to locate tool using the code snippet
10116    for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161  else
10162    # The variable is set, but is it from the command line or the environment?
10163
10164    # Try to remove the string !PRINTF! from our list.
10165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10167      # If it failed, the variable was not from the command line. Ignore it,
10168      # but warn the user (except for BASH, which is always set by the calling BASH).
10169      if test "xPRINTF" != xBASH; then
10170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10171$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10172      fi
10173      # Try to locate tool using the code snippet
10174      for ac_prog in printf
10175do
10176  # Extract the first word of "$ac_prog", so it can be a program name with args.
10177set dummy $ac_prog; ac_word=$2
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179$as_echo_n "checking for $ac_word... " >&6; }
10180if ${ac_cv_path_PRINTF+:} false; then :
10181  $as_echo_n "(cached) " >&6
10182else
10183  case $PRINTF in
10184  [\\/]* | ?:[\\/]*)
10185  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10186  ;;
10187  *)
10188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189for as_dir in $PATH
10190do
10191  IFS=$as_save_IFS
10192  test -z "$as_dir" && as_dir=.
10193    for ac_exec_ext in '' $ac_executable_extensions; do
10194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10195    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197    break 2
10198  fi
10199done
10200  done
10201IFS=$as_save_IFS
10202
10203  ;;
10204esac
10205fi
10206PRINTF=$ac_cv_path_PRINTF
10207if test -n "$PRINTF"; then
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10209$as_echo "$PRINTF" >&6; }
10210else
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212$as_echo "no" >&6; }
10213fi
10214
10215
10216  test -n "$PRINTF" && break
10217done
10218
10219    else
10220      # If it succeeded, then it was overridden by the user. We will use it
10221      # for the tool.
10222
10223      # First remove it from the list of overridden variables, so we can test
10224      # for unknown variables in the end.
10225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10226
10227      # Check if we try to supply an empty value
10228      if test "x$PRINTF" = x; then
10229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10230$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10232$as_echo_n "checking for PRINTF... " >&6; }
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10234$as_echo "disabled" >&6; }
10235      else
10236        # Check if the provided tool contains a complete path.
10237        tool_specified="$PRINTF"
10238        tool_basename="${tool_specified##*/}"
10239        if test "x$tool_basename" = "x$tool_specified"; then
10240          # A command without a complete path is provided, search $PATH.
10241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10242$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10243          # Extract the first word of "$tool_basename", so it can be a program name with args.
10244set dummy $tool_basename; ac_word=$2
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10246$as_echo_n "checking for $ac_word... " >&6; }
10247if ${ac_cv_path_PRINTF+:} false; then :
10248  $as_echo_n "(cached) " >&6
10249else
10250  case $PRINTF in
10251  [\\/]* | ?:[\\/]*)
10252  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10253  ;;
10254  *)
10255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10256for as_dir in $PATH
10257do
10258  IFS=$as_save_IFS
10259  test -z "$as_dir" && as_dir=.
10260    for ac_exec_ext in '' $ac_executable_extensions; do
10261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10262    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10264    break 2
10265  fi
10266done
10267  done
10268IFS=$as_save_IFS
10269
10270  ;;
10271esac
10272fi
10273PRINTF=$ac_cv_path_PRINTF
10274if test -n "$PRINTF"; then
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10276$as_echo "$PRINTF" >&6; }
10277else
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282
10283          if test "x$PRINTF" = x; then
10284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10285          fi
10286        else
10287          # Otherwise we believe it is a complete path. Use it as it is.
10288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10289$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10291$as_echo_n "checking for PRINTF... " >&6; }
10292          if test ! -x "$tool_specified"; then
10293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10294$as_echo "not found" >&6; }
10295            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10296          fi
10297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10298$as_echo "$tool_specified" >&6; }
10299        fi
10300      fi
10301    fi
10302
10303  fi
10304
10305
10306
10307  if test "x$PRINTF" = x; then
10308    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10309  fi
10310
10311
10312
10313
10314
10315  # Publish this variable in the help.
10316
10317
10318  if [ -z "${RM+x}" ]; then
10319    # The variable is not set by user, try to locate tool using the code snippet
10320    for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365  else
10366    # The variable is set, but is it from the command line or the environment?
10367
10368    # Try to remove the string !RM! from our list.
10369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10371      # If it failed, the variable was not from the command line. Ignore it,
10372      # but warn the user (except for BASH, which is always set by the calling BASH).
10373      if test "xRM" != xBASH; then
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10375$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10376      fi
10377      # Try to locate tool using the code snippet
10378      for ac_prog in rm
10379do
10380  # Extract the first word of "$ac_prog", so it can be a program name with args.
10381set dummy $ac_prog; ac_word=$2
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
10384if ${ac_cv_path_RM+:} false; then :
10385  $as_echo_n "(cached) " >&6
10386else
10387  case $RM in
10388  [\\/]* | ?:[\\/]*)
10389  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10390  ;;
10391  *)
10392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10393for as_dir in $PATH
10394do
10395  IFS=$as_save_IFS
10396  test -z "$as_dir" && as_dir=.
10397    for ac_exec_ext in '' $ac_executable_extensions; do
10398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10399    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10401    break 2
10402  fi
10403done
10404  done
10405IFS=$as_save_IFS
10406
10407  ;;
10408esac
10409fi
10410RM=$ac_cv_path_RM
10411if test -n "$RM"; then
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10413$as_echo "$RM" >&6; }
10414else
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
10417fi
10418
10419
10420  test -n "$RM" && break
10421done
10422
10423    else
10424      # If it succeeded, then it was overridden by the user. We will use it
10425      # for the tool.
10426
10427      # First remove it from the list of overridden variables, so we can test
10428      # for unknown variables in the end.
10429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10430
10431      # Check if we try to supply an empty value
10432      if test "x$RM" = x; then
10433        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10434$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10436$as_echo_n "checking for RM... " >&6; }
10437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10438$as_echo "disabled" >&6; }
10439      else
10440        # Check if the provided tool contains a complete path.
10441        tool_specified="$RM"
10442        tool_basename="${tool_specified##*/}"
10443        if test "x$tool_basename" = "x$tool_specified"; then
10444          # A command without a complete path is provided, search $PATH.
10445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10446$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10447          # Extract the first word of "$tool_basename", so it can be a program name with args.
10448set dummy $tool_basename; ac_word=$2
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10450$as_echo_n "checking for $ac_word... " >&6; }
10451if ${ac_cv_path_RM+:} false; then :
10452  $as_echo_n "(cached) " >&6
10453else
10454  case $RM in
10455  [\\/]* | ?:[\\/]*)
10456  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10457  ;;
10458  *)
10459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460for as_dir in $PATH
10461do
10462  IFS=$as_save_IFS
10463  test -z "$as_dir" && as_dir=.
10464    for ac_exec_ext in '' $ac_executable_extensions; do
10465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10466    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10468    break 2
10469  fi
10470done
10471  done
10472IFS=$as_save_IFS
10473
10474  ;;
10475esac
10476fi
10477RM=$ac_cv_path_RM
10478if test -n "$RM"; then
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10480$as_echo "$RM" >&6; }
10481else
10482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10483$as_echo "no" >&6; }
10484fi
10485
10486
10487          if test "x$RM" = x; then
10488            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10489          fi
10490        else
10491          # Otherwise we believe it is a complete path. Use it as it is.
10492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10493$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10494          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10495$as_echo_n "checking for RM... " >&6; }
10496          if test ! -x "$tool_specified"; then
10497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10498$as_echo "not found" >&6; }
10499            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10500          fi
10501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10502$as_echo "$tool_specified" >&6; }
10503        fi
10504      fi
10505    fi
10506
10507  fi
10508
10509
10510
10511  if test "x$RM" = x; then
10512    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10513  fi
10514
10515
10516
10517
10518
10519  # Publish this variable in the help.
10520
10521
10522  if [ -z "${RMDIR+x}" ]; then
10523    # The variable is not set by user, try to locate tool using the code snippet
10524    for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569  else
10570    # The variable is set, but is it from the command line or the environment?
10571
10572    # Try to remove the string !RMDIR! from our list.
10573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10575      # If it failed, the variable was not from the command line. Ignore it,
10576      # but warn the user (except for BASH, which is always set by the calling BASH).
10577      if test "xRMDIR" != xBASH; then
10578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10579$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10580      fi
10581      # Try to locate tool using the code snippet
10582      for ac_prog in rmdir
10583do
10584  # Extract the first word of "$ac_prog", so it can be a program name with args.
10585set dummy $ac_prog; ac_word=$2
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10587$as_echo_n "checking for $ac_word... " >&6; }
10588if ${ac_cv_path_RMDIR+:} false; then :
10589  $as_echo_n "(cached) " >&6
10590else
10591  case $RMDIR in
10592  [\\/]* | ?:[\\/]*)
10593  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10594  ;;
10595  *)
10596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10597for as_dir in $PATH
10598do
10599  IFS=$as_save_IFS
10600  test -z "$as_dir" && as_dir=.
10601    for ac_exec_ext in '' $ac_executable_extensions; do
10602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10603    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10605    break 2
10606  fi
10607done
10608  done
10609IFS=$as_save_IFS
10610
10611  ;;
10612esac
10613fi
10614RMDIR=$ac_cv_path_RMDIR
10615if test -n "$RMDIR"; then
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10617$as_echo "$RMDIR" >&6; }
10618else
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
10621fi
10622
10623
10624  test -n "$RMDIR" && break
10625done
10626
10627    else
10628      # If it succeeded, then it was overridden by the user. We will use it
10629      # for the tool.
10630
10631      # First remove it from the list of overridden variables, so we can test
10632      # for unknown variables in the end.
10633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10634
10635      # Check if we try to supply an empty value
10636      if test "x$RMDIR" = x; then
10637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10638$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10640$as_echo_n "checking for RMDIR... " >&6; }
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10642$as_echo "disabled" >&6; }
10643      else
10644        # Check if the provided tool contains a complete path.
10645        tool_specified="$RMDIR"
10646        tool_basename="${tool_specified##*/}"
10647        if test "x$tool_basename" = "x$tool_specified"; then
10648          # A command without a complete path is provided, search $PATH.
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10650$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10651          # Extract the first word of "$tool_basename", so it can be a program name with args.
10652set dummy $tool_basename; ac_word=$2
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10654$as_echo_n "checking for $ac_word... " >&6; }
10655if ${ac_cv_path_RMDIR+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  case $RMDIR in
10659  [\\/]* | ?:[\\/]*)
10660  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10661  ;;
10662  *)
10663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666  IFS=$as_save_IFS
10667  test -z "$as_dir" && as_dir=.
10668    for ac_exec_ext in '' $ac_executable_extensions; do
10669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10670    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10672    break 2
10673  fi
10674done
10675  done
10676IFS=$as_save_IFS
10677
10678  ;;
10679esac
10680fi
10681RMDIR=$ac_cv_path_RMDIR
10682if test -n "$RMDIR"; then
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10684$as_echo "$RMDIR" >&6; }
10685else
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
10688fi
10689
10690
10691          if test "x$RMDIR" = x; then
10692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10693          fi
10694        else
10695          # Otherwise we believe it is a complete path. Use it as it is.
10696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10697$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10699$as_echo_n "checking for RMDIR... " >&6; }
10700          if test ! -x "$tool_specified"; then
10701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10702$as_echo "not found" >&6; }
10703            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10704          fi
10705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10706$as_echo "$tool_specified" >&6; }
10707        fi
10708      fi
10709    fi
10710
10711  fi
10712
10713
10714
10715  if test "x$RMDIR" = x; then
10716    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10717  fi
10718
10719
10720
10721
10722
10723  # Publish this variable in the help.
10724
10725
10726  if [ -z "${SH+x}" ]; then
10727    # The variable is not set by user, try to locate tool using the code snippet
10728    for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773  else
10774    # The variable is set, but is it from the command line or the environment?
10775
10776    # Try to remove the string !SH! from our list.
10777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10779      # If it failed, the variable was not from the command line. Ignore it,
10780      # but warn the user (except for BASH, which is always set by the calling BASH).
10781      if test "xSH" != xBASH; then
10782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10783$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10784      fi
10785      # Try to locate tool using the code snippet
10786      for ac_prog in sh
10787do
10788  # Extract the first word of "$ac_prog", so it can be a program name with args.
10789set dummy $ac_prog; ac_word=$2
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10791$as_echo_n "checking for $ac_word... " >&6; }
10792if ${ac_cv_path_SH+:} false; then :
10793  $as_echo_n "(cached) " >&6
10794else
10795  case $SH in
10796  [\\/]* | ?:[\\/]*)
10797  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10798  ;;
10799  *)
10800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10801for as_dir in $PATH
10802do
10803  IFS=$as_save_IFS
10804  test -z "$as_dir" && as_dir=.
10805    for ac_exec_ext in '' $ac_executable_extensions; do
10806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10807    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10809    break 2
10810  fi
10811done
10812  done
10813IFS=$as_save_IFS
10814
10815  ;;
10816esac
10817fi
10818SH=$ac_cv_path_SH
10819if test -n "$SH"; then
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10821$as_echo "$SH" >&6; }
10822else
10823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10824$as_echo "no" >&6; }
10825fi
10826
10827
10828  test -n "$SH" && break
10829done
10830
10831    else
10832      # If it succeeded, then it was overridden by the user. We will use it
10833      # for the tool.
10834
10835      # First remove it from the list of overridden variables, so we can test
10836      # for unknown variables in the end.
10837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10838
10839      # Check if we try to supply an empty value
10840      if test "x$SH" = x; then
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10842$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10844$as_echo_n "checking for SH... " >&6; }
10845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10846$as_echo "disabled" >&6; }
10847      else
10848        # Check if the provided tool contains a complete path.
10849        tool_specified="$SH"
10850        tool_basename="${tool_specified##*/}"
10851        if test "x$tool_basename" = "x$tool_specified"; then
10852          # A command without a complete path is provided, search $PATH.
10853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10854$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10855          # Extract the first word of "$tool_basename", so it can be a program name with args.
10856set dummy $tool_basename; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_SH+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $SH in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885SH=$ac_cv_path_SH
10886if test -n "$SH"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10888$as_echo "$SH" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895          if test "x$SH" = x; then
10896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10897          fi
10898        else
10899          # Otherwise we believe it is a complete path. Use it as it is.
10900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10901$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10903$as_echo_n "checking for SH... " >&6; }
10904          if test ! -x "$tool_specified"; then
10905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10906$as_echo "not found" >&6; }
10907            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10908          fi
10909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10910$as_echo "$tool_specified" >&6; }
10911        fi
10912      fi
10913    fi
10914
10915  fi
10916
10917
10918
10919  if test "x$SH" = x; then
10920    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10921  fi
10922
10923
10924
10925
10926
10927  # Publish this variable in the help.
10928
10929
10930  if [ -z "${SORT+x}" ]; then
10931    # The variable is not set by user, try to locate tool using the code snippet
10932    for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977  else
10978    # The variable is set, but is it from the command line or the environment?
10979
10980    # Try to remove the string !SORT! from our list.
10981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10983      # If it failed, the variable was not from the command line. Ignore it,
10984      # but warn the user (except for BASH, which is always set by the calling BASH).
10985      if test "xSORT" != xBASH; then
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10987$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10988      fi
10989      # Try to locate tool using the code snippet
10990      for ac_prog in sort
10991do
10992  # Extract the first word of "$ac_prog", so it can be a program name with args.
10993set dummy $ac_prog; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_SORT+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $SORT in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022SORT=$ac_cv_path_SORT
11023if test -n "$SORT"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11025$as_echo "$SORT" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032  test -n "$SORT" && break
11033done
11034
11035    else
11036      # If it succeeded, then it was overridden by the user. We will use it
11037      # for the tool.
11038
11039      # First remove it from the list of overridden variables, so we can test
11040      # for unknown variables in the end.
11041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11042
11043      # Check if we try to supply an empty value
11044      if test "x$SORT" = x; then
11045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11046$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11048$as_echo_n "checking for SORT... " >&6; }
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11050$as_echo "disabled" >&6; }
11051      else
11052        # Check if the provided tool contains a complete path.
11053        tool_specified="$SORT"
11054        tool_basename="${tool_specified##*/}"
11055        if test "x$tool_basename" = "x$tool_specified"; then
11056          # A command without a complete path is provided, search $PATH.
11057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11058$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11059          # Extract the first word of "$tool_basename", so it can be a program name with args.
11060set dummy $tool_basename; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_SORT+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $SORT in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089SORT=$ac_cv_path_SORT
11090if test -n "$SORT"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11092$as_echo "$SORT" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099          if test "x$SORT" = x; then
11100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11101          fi
11102        else
11103          # Otherwise we believe it is a complete path. Use it as it is.
11104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11105$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11107$as_echo_n "checking for SORT... " >&6; }
11108          if test ! -x "$tool_specified"; then
11109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11110$as_echo "not found" >&6; }
11111            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11112          fi
11113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11114$as_echo "$tool_specified" >&6; }
11115        fi
11116      fi
11117    fi
11118
11119  fi
11120
11121
11122
11123  if test "x$SORT" = x; then
11124    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11125  fi
11126
11127
11128
11129
11130
11131  # Publish this variable in the help.
11132
11133
11134  if [ -z "${TAIL+x}" ]; then
11135    # The variable is not set by user, try to locate tool using the code snippet
11136    for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181  else
11182    # The variable is set, but is it from the command line or the environment?
11183
11184    # Try to remove the string !TAIL! from our list.
11185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11187      # If it failed, the variable was not from the command line. Ignore it,
11188      # but warn the user (except for BASH, which is always set by the calling BASH).
11189      if test "xTAIL" != xBASH; then
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11191$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11192      fi
11193      # Try to locate tool using the code snippet
11194      for ac_prog in tail
11195do
11196  # Extract the first word of "$ac_prog", so it can be a program name with args.
11197set dummy $ac_prog; ac_word=$2
11198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11199$as_echo_n "checking for $ac_word... " >&6; }
11200if ${ac_cv_path_TAIL+:} false; then :
11201  $as_echo_n "(cached) " >&6
11202else
11203  case $TAIL in
11204  [\\/]* | ?:[\\/]*)
11205  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11206  ;;
11207  *)
11208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11209for as_dir in $PATH
11210do
11211  IFS=$as_save_IFS
11212  test -z "$as_dir" && as_dir=.
11213    for ac_exec_ext in '' $ac_executable_extensions; do
11214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11215    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11217    break 2
11218  fi
11219done
11220  done
11221IFS=$as_save_IFS
11222
11223  ;;
11224esac
11225fi
11226TAIL=$ac_cv_path_TAIL
11227if test -n "$TAIL"; then
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11229$as_echo "$TAIL" >&6; }
11230else
11231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
11233fi
11234
11235
11236  test -n "$TAIL" && break
11237done
11238
11239    else
11240      # If it succeeded, then it was overridden by the user. We will use it
11241      # for the tool.
11242
11243      # First remove it from the list of overridden variables, so we can test
11244      # for unknown variables in the end.
11245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11246
11247      # Check if we try to supply an empty value
11248      if test "x$TAIL" = x; then
11249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11250$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11252$as_echo_n "checking for TAIL... " >&6; }
11253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11254$as_echo "disabled" >&6; }
11255      else
11256        # Check if the provided tool contains a complete path.
11257        tool_specified="$TAIL"
11258        tool_basename="${tool_specified##*/}"
11259        if test "x$tool_basename" = "x$tool_specified"; then
11260          # A command without a complete path is provided, search $PATH.
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11262$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11263          # Extract the first word of "$tool_basename", so it can be a program name with args.
11264set dummy $tool_basename; ac_word=$2
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11266$as_echo_n "checking for $ac_word... " >&6; }
11267if ${ac_cv_path_TAIL+:} false; then :
11268  $as_echo_n "(cached) " >&6
11269else
11270  case $TAIL in
11271  [\\/]* | ?:[\\/]*)
11272  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11273  ;;
11274  *)
11275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11276for as_dir in $PATH
11277do
11278  IFS=$as_save_IFS
11279  test -z "$as_dir" && as_dir=.
11280    for ac_exec_ext in '' $ac_executable_extensions; do
11281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11282    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11284    break 2
11285  fi
11286done
11287  done
11288IFS=$as_save_IFS
11289
11290  ;;
11291esac
11292fi
11293TAIL=$ac_cv_path_TAIL
11294if test -n "$TAIL"; then
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11296$as_echo "$TAIL" >&6; }
11297else
11298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300fi
11301
11302
11303          if test "x$TAIL" = x; then
11304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11305          fi
11306        else
11307          # Otherwise we believe it is a complete path. Use it as it is.
11308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11309$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11311$as_echo_n "checking for TAIL... " >&6; }
11312          if test ! -x "$tool_specified"; then
11313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11314$as_echo "not found" >&6; }
11315            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11316          fi
11317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11318$as_echo "$tool_specified" >&6; }
11319        fi
11320      fi
11321    fi
11322
11323  fi
11324
11325
11326
11327  if test "x$TAIL" = x; then
11328    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11329  fi
11330
11331
11332
11333
11334
11335  # Publish this variable in the help.
11336
11337
11338  if [ -z "${TAR+x}" ]; then
11339    # The variable is not set by user, try to locate tool using the code snippet
11340    for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385  else
11386    # The variable is set, but is it from the command line or the environment?
11387
11388    # Try to remove the string !TAR! from our list.
11389    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11390    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11391      # If it failed, the variable was not from the command line. Ignore it,
11392      # but warn the user (except for BASH, which is always set by the calling BASH).
11393      if test "xTAR" != xBASH; then
11394        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11395$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11396      fi
11397      # Try to locate tool using the code snippet
11398      for ac_prog in gtar tar
11399do
11400  # Extract the first word of "$ac_prog", so it can be a program name with args.
11401set dummy $ac_prog; ac_word=$2
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11403$as_echo_n "checking for $ac_word... " >&6; }
11404if ${ac_cv_path_TAR+:} false; then :
11405  $as_echo_n "(cached) " >&6
11406else
11407  case $TAR in
11408  [\\/]* | ?:[\\/]*)
11409  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11410  ;;
11411  *)
11412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413for as_dir in $PATH
11414do
11415  IFS=$as_save_IFS
11416  test -z "$as_dir" && as_dir=.
11417    for ac_exec_ext in '' $ac_executable_extensions; do
11418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11419    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421    break 2
11422  fi
11423done
11424  done
11425IFS=$as_save_IFS
11426
11427  ;;
11428esac
11429fi
11430TAR=$ac_cv_path_TAR
11431if test -n "$TAR"; then
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11433$as_echo "$TAR" >&6; }
11434else
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
11437fi
11438
11439
11440  test -n "$TAR" && break
11441done
11442
11443    else
11444      # If it succeeded, then it was overridden by the user. We will use it
11445      # for the tool.
11446
11447      # First remove it from the list of overridden variables, so we can test
11448      # for unknown variables in the end.
11449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11450
11451      # Check if we try to supply an empty value
11452      if test "x$TAR" = x; then
11453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11454$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11456$as_echo_n "checking for TAR... " >&6; }
11457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11458$as_echo "disabled" >&6; }
11459      else
11460        # Check if the provided tool contains a complete path.
11461        tool_specified="$TAR"
11462        tool_basename="${tool_specified##*/}"
11463        if test "x$tool_basename" = "x$tool_specified"; then
11464          # A command without a complete path is provided, search $PATH.
11465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11466$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11467          # Extract the first word of "$tool_basename", so it can be a program name with args.
11468set dummy $tool_basename; ac_word=$2
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11470$as_echo_n "checking for $ac_word... " >&6; }
11471if ${ac_cv_path_TAR+:} false; then :
11472  $as_echo_n "(cached) " >&6
11473else
11474  case $TAR in
11475  [\\/]* | ?:[\\/]*)
11476  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11477  ;;
11478  *)
11479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11480for as_dir in $PATH
11481do
11482  IFS=$as_save_IFS
11483  test -z "$as_dir" && as_dir=.
11484    for ac_exec_ext in '' $ac_executable_extensions; do
11485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11486    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11488    break 2
11489  fi
11490done
11491  done
11492IFS=$as_save_IFS
11493
11494  ;;
11495esac
11496fi
11497TAR=$ac_cv_path_TAR
11498if test -n "$TAR"; then
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11500$as_echo "$TAR" >&6; }
11501else
11502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11503$as_echo "no" >&6; }
11504fi
11505
11506
11507          if test "x$TAR" = x; then
11508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11509          fi
11510        else
11511          # Otherwise we believe it is a complete path. Use it as it is.
11512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11513$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11515$as_echo_n "checking for TAR... " >&6; }
11516          if test ! -x "$tool_specified"; then
11517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11518$as_echo "not found" >&6; }
11519            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11520          fi
11521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11522$as_echo "$tool_specified" >&6; }
11523        fi
11524      fi
11525    fi
11526
11527  fi
11528
11529
11530
11531  if test "x$TAR" = x; then
11532    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11533  fi
11534
11535
11536
11537
11538
11539  # Publish this variable in the help.
11540
11541
11542  if [ -z "${TEE+x}" ]; then
11543    # The variable is not set by user, try to locate tool using the code snippet
11544    for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589  else
11590    # The variable is set, but is it from the command line or the environment?
11591
11592    # Try to remove the string !TEE! from our list.
11593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11595      # If it failed, the variable was not from the command line. Ignore it,
11596      # but warn the user (except for BASH, which is always set by the calling BASH).
11597      if test "xTEE" != xBASH; then
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11599$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11600      fi
11601      # Try to locate tool using the code snippet
11602      for ac_prog in tee
11603do
11604  # Extract the first word of "$ac_prog", so it can be a program name with args.
11605set dummy $ac_prog; ac_word=$2
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11607$as_echo_n "checking for $ac_word... " >&6; }
11608if ${ac_cv_path_TEE+:} false; then :
11609  $as_echo_n "(cached) " >&6
11610else
11611  case $TEE in
11612  [\\/]* | ?:[\\/]*)
11613  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11614  ;;
11615  *)
11616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617for as_dir in $PATH
11618do
11619  IFS=$as_save_IFS
11620  test -z "$as_dir" && as_dir=.
11621    for ac_exec_ext in '' $ac_executable_extensions; do
11622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11623    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625    break 2
11626  fi
11627done
11628  done
11629IFS=$as_save_IFS
11630
11631  ;;
11632esac
11633fi
11634TEE=$ac_cv_path_TEE
11635if test -n "$TEE"; then
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11637$as_echo "$TEE" >&6; }
11638else
11639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11640$as_echo "no" >&6; }
11641fi
11642
11643
11644  test -n "$TEE" && break
11645done
11646
11647    else
11648      # If it succeeded, then it was overridden by the user. We will use it
11649      # for the tool.
11650
11651      # First remove it from the list of overridden variables, so we can test
11652      # for unknown variables in the end.
11653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11654
11655      # Check if we try to supply an empty value
11656      if test "x$TEE" = x; then
11657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11658$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11660$as_echo_n "checking for TEE... " >&6; }
11661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11662$as_echo "disabled" >&6; }
11663      else
11664        # Check if the provided tool contains a complete path.
11665        tool_specified="$TEE"
11666        tool_basename="${tool_specified##*/}"
11667        if test "x$tool_basename" = "x$tool_specified"; then
11668          # A command without a complete path is provided, search $PATH.
11669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11670$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11671          # Extract the first word of "$tool_basename", so it can be a program name with args.
11672set dummy $tool_basename; ac_word=$2
11673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11674$as_echo_n "checking for $ac_word... " >&6; }
11675if ${ac_cv_path_TEE+:} false; then :
11676  $as_echo_n "(cached) " >&6
11677else
11678  case $TEE in
11679  [\\/]* | ?:[\\/]*)
11680  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11681  ;;
11682  *)
11683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11684for as_dir in $PATH
11685do
11686  IFS=$as_save_IFS
11687  test -z "$as_dir" && as_dir=.
11688    for ac_exec_ext in '' $ac_executable_extensions; do
11689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11690    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11692    break 2
11693  fi
11694done
11695  done
11696IFS=$as_save_IFS
11697
11698  ;;
11699esac
11700fi
11701TEE=$ac_cv_path_TEE
11702if test -n "$TEE"; then
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11704$as_echo "$TEE" >&6; }
11705else
11706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
11708fi
11709
11710
11711          if test "x$TEE" = x; then
11712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11713          fi
11714        else
11715          # Otherwise we believe it is a complete path. Use it as it is.
11716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11717$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11719$as_echo_n "checking for TEE... " >&6; }
11720          if test ! -x "$tool_specified"; then
11721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11722$as_echo "not found" >&6; }
11723            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11724          fi
11725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11726$as_echo "$tool_specified" >&6; }
11727        fi
11728      fi
11729    fi
11730
11731  fi
11732
11733
11734
11735  if test "x$TEE" = x; then
11736    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11737  fi
11738
11739
11740
11741
11742
11743  # Publish this variable in the help.
11744
11745
11746  if [ -z "${TOUCH+x}" ]; then
11747    # The variable is not set by user, try to locate tool using the code snippet
11748    for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793  else
11794    # The variable is set, but is it from the command line or the environment?
11795
11796    # Try to remove the string !TOUCH! from our list.
11797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11799      # If it failed, the variable was not from the command line. Ignore it,
11800      # but warn the user (except for BASH, which is always set by the calling BASH).
11801      if test "xTOUCH" != xBASH; then
11802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11803$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11804      fi
11805      # Try to locate tool using the code snippet
11806      for ac_prog in touch
11807do
11808  # Extract the first word of "$ac_prog", so it can be a program name with args.
11809set dummy $ac_prog; ac_word=$2
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11811$as_echo_n "checking for $ac_word... " >&6; }
11812if ${ac_cv_path_TOUCH+:} false; then :
11813  $as_echo_n "(cached) " >&6
11814else
11815  case $TOUCH in
11816  [\\/]* | ?:[\\/]*)
11817  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11818  ;;
11819  *)
11820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11821for as_dir in $PATH
11822do
11823  IFS=$as_save_IFS
11824  test -z "$as_dir" && as_dir=.
11825    for ac_exec_ext in '' $ac_executable_extensions; do
11826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11827    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11829    break 2
11830  fi
11831done
11832  done
11833IFS=$as_save_IFS
11834
11835  ;;
11836esac
11837fi
11838TOUCH=$ac_cv_path_TOUCH
11839if test -n "$TOUCH"; then
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11841$as_echo "$TOUCH" >&6; }
11842else
11843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11844$as_echo "no" >&6; }
11845fi
11846
11847
11848  test -n "$TOUCH" && break
11849done
11850
11851    else
11852      # If it succeeded, then it was overridden by the user. We will use it
11853      # for the tool.
11854
11855      # First remove it from the list of overridden variables, so we can test
11856      # for unknown variables in the end.
11857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11858
11859      # Check if we try to supply an empty value
11860      if test "x$TOUCH" = x; then
11861        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11862$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11864$as_echo_n "checking for TOUCH... " >&6; }
11865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11866$as_echo "disabled" >&6; }
11867      else
11868        # Check if the provided tool contains a complete path.
11869        tool_specified="$TOUCH"
11870        tool_basename="${tool_specified##*/}"
11871        if test "x$tool_basename" = "x$tool_specified"; then
11872          # A command without a complete path is provided, search $PATH.
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11874$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11875          # Extract the first word of "$tool_basename", so it can be a program name with args.
11876set dummy $tool_basename; ac_word=$2
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11878$as_echo_n "checking for $ac_word... " >&6; }
11879if ${ac_cv_path_TOUCH+:} false; then :
11880  $as_echo_n "(cached) " >&6
11881else
11882  case $TOUCH in
11883  [\\/]* | ?:[\\/]*)
11884  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11885  ;;
11886  *)
11887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11888for as_dir in $PATH
11889do
11890  IFS=$as_save_IFS
11891  test -z "$as_dir" && as_dir=.
11892    for ac_exec_ext in '' $ac_executable_extensions; do
11893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11894    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11896    break 2
11897  fi
11898done
11899  done
11900IFS=$as_save_IFS
11901
11902  ;;
11903esac
11904fi
11905TOUCH=$ac_cv_path_TOUCH
11906if test -n "$TOUCH"; then
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11908$as_echo "$TOUCH" >&6; }
11909else
11910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
11912fi
11913
11914
11915          if test "x$TOUCH" = x; then
11916            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11917          fi
11918        else
11919          # Otherwise we believe it is a complete path. Use it as it is.
11920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11921$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11922          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11923$as_echo_n "checking for TOUCH... " >&6; }
11924          if test ! -x "$tool_specified"; then
11925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11926$as_echo "not found" >&6; }
11927            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11928          fi
11929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11930$as_echo "$tool_specified" >&6; }
11931        fi
11932      fi
11933    fi
11934
11935  fi
11936
11937
11938
11939  if test "x$TOUCH" = x; then
11940    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11941  fi
11942
11943
11944
11945
11946
11947  # Publish this variable in the help.
11948
11949
11950  if [ -z "${TR+x}" ]; then
11951    # The variable is not set by user, try to locate tool using the code snippet
11952    for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997  else
11998    # The variable is set, but is it from the command line or the environment?
11999
12000    # Try to remove the string !TR! from our list.
12001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12003      # If it failed, the variable was not from the command line. Ignore it,
12004      # but warn the user (except for BASH, which is always set by the calling BASH).
12005      if test "xTR" != xBASH; then
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12007$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12008      fi
12009      # Try to locate tool using the code snippet
12010      for ac_prog in tr
12011do
12012  # Extract the first word of "$ac_prog", so it can be a program name with args.
12013set dummy $ac_prog; ac_word=$2
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12015$as_echo_n "checking for $ac_word... " >&6; }
12016if ${ac_cv_path_TR+:} false; then :
12017  $as_echo_n "(cached) " >&6
12018else
12019  case $TR in
12020  [\\/]* | ?:[\\/]*)
12021  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12022  ;;
12023  *)
12024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12025for as_dir in $PATH
12026do
12027  IFS=$as_save_IFS
12028  test -z "$as_dir" && as_dir=.
12029    for ac_exec_ext in '' $ac_executable_extensions; do
12030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12031    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12033    break 2
12034  fi
12035done
12036  done
12037IFS=$as_save_IFS
12038
12039  ;;
12040esac
12041fi
12042TR=$ac_cv_path_TR
12043if test -n "$TR"; then
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12045$as_echo "$TR" >&6; }
12046else
12047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12048$as_echo "no" >&6; }
12049fi
12050
12051
12052  test -n "$TR" && break
12053done
12054
12055    else
12056      # If it succeeded, then it was overridden by the user. We will use it
12057      # for the tool.
12058
12059      # First remove it from the list of overridden variables, so we can test
12060      # for unknown variables in the end.
12061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12062
12063      # Check if we try to supply an empty value
12064      if test "x$TR" = x; then
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12066$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12068$as_echo_n "checking for TR... " >&6; }
12069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12070$as_echo "disabled" >&6; }
12071      else
12072        # Check if the provided tool contains a complete path.
12073        tool_specified="$TR"
12074        tool_basename="${tool_specified##*/}"
12075        if test "x$tool_basename" = "x$tool_specified"; then
12076          # A command without a complete path is provided, search $PATH.
12077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12078$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12079          # Extract the first word of "$tool_basename", so it can be a program name with args.
12080set dummy $tool_basename; ac_word=$2
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12082$as_echo_n "checking for $ac_word... " >&6; }
12083if ${ac_cv_path_TR+:} false; then :
12084  $as_echo_n "(cached) " >&6
12085else
12086  case $TR in
12087  [\\/]* | ?:[\\/]*)
12088  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12089  ;;
12090  *)
12091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092for as_dir in $PATH
12093do
12094  IFS=$as_save_IFS
12095  test -z "$as_dir" && as_dir=.
12096    for ac_exec_ext in '' $ac_executable_extensions; do
12097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12098    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12100    break 2
12101  fi
12102done
12103  done
12104IFS=$as_save_IFS
12105
12106  ;;
12107esac
12108fi
12109TR=$ac_cv_path_TR
12110if test -n "$TR"; then
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12112$as_echo "$TR" >&6; }
12113else
12114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
12116fi
12117
12118
12119          if test "x$TR" = x; then
12120            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12121          fi
12122        else
12123          # Otherwise we believe it is a complete path. Use it as it is.
12124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12125$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12127$as_echo_n "checking for TR... " >&6; }
12128          if test ! -x "$tool_specified"; then
12129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12130$as_echo "not found" >&6; }
12131            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12132          fi
12133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12134$as_echo "$tool_specified" >&6; }
12135        fi
12136      fi
12137    fi
12138
12139  fi
12140
12141
12142
12143  if test "x$TR" = x; then
12144    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12145  fi
12146
12147
12148
12149
12150
12151  # Publish this variable in the help.
12152
12153
12154  if [ -z "${UNAME+x}" ]; then
12155    # The variable is not set by user, try to locate tool using the code snippet
12156    for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201  else
12202    # The variable is set, but is it from the command line or the environment?
12203
12204    # Try to remove the string !UNAME! from our list.
12205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12207      # If it failed, the variable was not from the command line. Ignore it,
12208      # but warn the user (except for BASH, which is always set by the calling BASH).
12209      if test "xUNAME" != xBASH; then
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12211$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12212      fi
12213      # Try to locate tool using the code snippet
12214      for ac_prog in uname
12215do
12216  # Extract the first word of "$ac_prog", so it can be a program name with args.
12217set dummy $ac_prog; ac_word=$2
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12219$as_echo_n "checking for $ac_word... " >&6; }
12220if ${ac_cv_path_UNAME+:} false; then :
12221  $as_echo_n "(cached) " >&6
12222else
12223  case $UNAME in
12224  [\\/]* | ?:[\\/]*)
12225  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12226  ;;
12227  *)
12228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12229for as_dir in $PATH
12230do
12231  IFS=$as_save_IFS
12232  test -z "$as_dir" && as_dir=.
12233    for ac_exec_ext in '' $ac_executable_extensions; do
12234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12235    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12237    break 2
12238  fi
12239done
12240  done
12241IFS=$as_save_IFS
12242
12243  ;;
12244esac
12245fi
12246UNAME=$ac_cv_path_UNAME
12247if test -n "$UNAME"; then
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12249$as_echo "$UNAME" >&6; }
12250else
12251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12252$as_echo "no" >&6; }
12253fi
12254
12255
12256  test -n "$UNAME" && break
12257done
12258
12259    else
12260      # If it succeeded, then it was overridden by the user. We will use it
12261      # for the tool.
12262
12263      # First remove it from the list of overridden variables, so we can test
12264      # for unknown variables in the end.
12265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12266
12267      # Check if we try to supply an empty value
12268      if test "x$UNAME" = x; then
12269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12270$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12272$as_echo_n "checking for UNAME... " >&6; }
12273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12274$as_echo "disabled" >&6; }
12275      else
12276        # Check if the provided tool contains a complete path.
12277        tool_specified="$UNAME"
12278        tool_basename="${tool_specified##*/}"
12279        if test "x$tool_basename" = "x$tool_specified"; then
12280          # A command without a complete path is provided, search $PATH.
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12282$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12283          # Extract the first word of "$tool_basename", so it can be a program name with args.
12284set dummy $tool_basename; ac_word=$2
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12286$as_echo_n "checking for $ac_word... " >&6; }
12287if ${ac_cv_path_UNAME+:} false; then :
12288  $as_echo_n "(cached) " >&6
12289else
12290  case $UNAME in
12291  [\\/]* | ?:[\\/]*)
12292  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12293  ;;
12294  *)
12295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12296for as_dir in $PATH
12297do
12298  IFS=$as_save_IFS
12299  test -z "$as_dir" && as_dir=.
12300    for ac_exec_ext in '' $ac_executable_extensions; do
12301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12302    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12304    break 2
12305  fi
12306done
12307  done
12308IFS=$as_save_IFS
12309
12310  ;;
12311esac
12312fi
12313UNAME=$ac_cv_path_UNAME
12314if test -n "$UNAME"; then
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12316$as_echo "$UNAME" >&6; }
12317else
12318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12319$as_echo "no" >&6; }
12320fi
12321
12322
12323          if test "x$UNAME" = x; then
12324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12325          fi
12326        else
12327          # Otherwise we believe it is a complete path. Use it as it is.
12328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12329$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12331$as_echo_n "checking for UNAME... " >&6; }
12332          if test ! -x "$tool_specified"; then
12333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12334$as_echo "not found" >&6; }
12335            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12336          fi
12337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12338$as_echo "$tool_specified" >&6; }
12339        fi
12340      fi
12341    fi
12342
12343  fi
12344
12345
12346
12347  if test "x$UNAME" = x; then
12348    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12349  fi
12350
12351
12352
12353
12354
12355  # Publish this variable in the help.
12356
12357
12358  if [ -z "${UNIQ+x}" ]; then
12359    # The variable is not set by user, try to locate tool using the code snippet
12360    for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405  else
12406    # The variable is set, but is it from the command line or the environment?
12407
12408    # Try to remove the string !UNIQ! from our list.
12409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12411      # If it failed, the variable was not from the command line. Ignore it,
12412      # but warn the user (except for BASH, which is always set by the calling BASH).
12413      if test "xUNIQ" != xBASH; then
12414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12415$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12416      fi
12417      # Try to locate tool using the code snippet
12418      for ac_prog in uniq
12419do
12420  # Extract the first word of "$ac_prog", so it can be a program name with args.
12421set dummy $ac_prog; ac_word=$2
12422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12423$as_echo_n "checking for $ac_word... " >&6; }
12424if ${ac_cv_path_UNIQ+:} false; then :
12425  $as_echo_n "(cached) " >&6
12426else
12427  case $UNIQ in
12428  [\\/]* | ?:[\\/]*)
12429  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12430  ;;
12431  *)
12432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12433for as_dir in $PATH
12434do
12435  IFS=$as_save_IFS
12436  test -z "$as_dir" && as_dir=.
12437    for ac_exec_ext in '' $ac_executable_extensions; do
12438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12439    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12441    break 2
12442  fi
12443done
12444  done
12445IFS=$as_save_IFS
12446
12447  ;;
12448esac
12449fi
12450UNIQ=$ac_cv_path_UNIQ
12451if test -n "$UNIQ"; then
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12453$as_echo "$UNIQ" >&6; }
12454else
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12456$as_echo "no" >&6; }
12457fi
12458
12459
12460  test -n "$UNIQ" && break
12461done
12462
12463    else
12464      # If it succeeded, then it was overridden by the user. We will use it
12465      # for the tool.
12466
12467      # First remove it from the list of overridden variables, so we can test
12468      # for unknown variables in the end.
12469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12470
12471      # Check if we try to supply an empty value
12472      if test "x$UNIQ" = x; then
12473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12474$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12476$as_echo_n "checking for UNIQ... " >&6; }
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12478$as_echo "disabled" >&6; }
12479      else
12480        # Check if the provided tool contains a complete path.
12481        tool_specified="$UNIQ"
12482        tool_basename="${tool_specified##*/}"
12483        if test "x$tool_basename" = "x$tool_specified"; then
12484          # A command without a complete path is provided, search $PATH.
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12486$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12487          # Extract the first word of "$tool_basename", so it can be a program name with args.
12488set dummy $tool_basename; ac_word=$2
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12490$as_echo_n "checking for $ac_word... " >&6; }
12491if ${ac_cv_path_UNIQ+:} false; then :
12492  $as_echo_n "(cached) " >&6
12493else
12494  case $UNIQ in
12495  [\\/]* | ?:[\\/]*)
12496  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12497  ;;
12498  *)
12499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12500for as_dir in $PATH
12501do
12502  IFS=$as_save_IFS
12503  test -z "$as_dir" && as_dir=.
12504    for ac_exec_ext in '' $ac_executable_extensions; do
12505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12506    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12508    break 2
12509  fi
12510done
12511  done
12512IFS=$as_save_IFS
12513
12514  ;;
12515esac
12516fi
12517UNIQ=$ac_cv_path_UNIQ
12518if test -n "$UNIQ"; then
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12520$as_echo "$UNIQ" >&6; }
12521else
12522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
12524fi
12525
12526
12527          if test "x$UNIQ" = x; then
12528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12529          fi
12530        else
12531          # Otherwise we believe it is a complete path. Use it as it is.
12532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12533$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12535$as_echo_n "checking for UNIQ... " >&6; }
12536          if test ! -x "$tool_specified"; then
12537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12538$as_echo "not found" >&6; }
12539            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12540          fi
12541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12542$as_echo "$tool_specified" >&6; }
12543        fi
12544      fi
12545    fi
12546
12547  fi
12548
12549
12550
12551  if test "x$UNIQ" = x; then
12552    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12553  fi
12554
12555
12556
12557
12558
12559  # Publish this variable in the help.
12560
12561
12562  if [ -z "${WC+x}" ]; then
12563    # The variable is not set by user, try to locate tool using the code snippet
12564    for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609  else
12610    # The variable is set, but is it from the command line or the environment?
12611
12612    # Try to remove the string !WC! from our list.
12613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12615      # If it failed, the variable was not from the command line. Ignore it,
12616      # but warn the user (except for BASH, which is always set by the calling BASH).
12617      if test "xWC" != xBASH; then
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12619$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12620      fi
12621      # Try to locate tool using the code snippet
12622      for ac_prog in wc
12623do
12624  # Extract the first word of "$ac_prog", so it can be a program name with args.
12625set dummy $ac_prog; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_WC+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $WC in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654WC=$ac_cv_path_WC
12655if test -n "$WC"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12657$as_echo "$WC" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664  test -n "$WC" && break
12665done
12666
12667    else
12668      # If it succeeded, then it was overridden by the user. We will use it
12669      # for the tool.
12670
12671      # First remove it from the list of overridden variables, so we can test
12672      # for unknown variables in the end.
12673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12674
12675      # Check if we try to supply an empty value
12676      if test "x$WC" = x; then
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12678$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12680$as_echo_n "checking for WC... " >&6; }
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12682$as_echo "disabled" >&6; }
12683      else
12684        # Check if the provided tool contains a complete path.
12685        tool_specified="$WC"
12686        tool_basename="${tool_specified##*/}"
12687        if test "x$tool_basename" = "x$tool_specified"; then
12688          # A command without a complete path is provided, search $PATH.
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12690$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12691          # Extract the first word of "$tool_basename", so it can be a program name with args.
12692set dummy $tool_basename; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_WC+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $WC in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721WC=$ac_cv_path_WC
12722if test -n "$WC"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12724$as_echo "$WC" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731          if test "x$WC" = x; then
12732            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12733          fi
12734        else
12735          # Otherwise we believe it is a complete path. Use it as it is.
12736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12737$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12738          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12739$as_echo_n "checking for WC... " >&6; }
12740          if test ! -x "$tool_specified"; then
12741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12742$as_echo "not found" >&6; }
12743            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12744          fi
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12746$as_echo "$tool_specified" >&6; }
12747        fi
12748      fi
12749    fi
12750
12751  fi
12752
12753
12754
12755  if test "x$WC" = x; then
12756    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12757  fi
12758
12759
12760
12761
12762
12763  # Publish this variable in the help.
12764
12765
12766  if [ -z "${WHICH+x}" ]; then
12767    # The variable is not set by user, try to locate tool using the code snippet
12768    for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813  else
12814    # The variable is set, but is it from the command line or the environment?
12815
12816    # Try to remove the string !WHICH! from our list.
12817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12819      # If it failed, the variable was not from the command line. Ignore it,
12820      # but warn the user (except for BASH, which is always set by the calling BASH).
12821      if test "xWHICH" != xBASH; then
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12823$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12824      fi
12825      # Try to locate tool using the code snippet
12826      for ac_prog in which
12827do
12828  # Extract the first word of "$ac_prog", so it can be a program name with args.
12829set dummy $ac_prog; ac_word=$2
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12831$as_echo_n "checking for $ac_word... " >&6; }
12832if ${ac_cv_path_WHICH+:} false; then :
12833  $as_echo_n "(cached) " >&6
12834else
12835  case $WHICH in
12836  [\\/]* | ?:[\\/]*)
12837  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12838  ;;
12839  *)
12840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12841for as_dir in $PATH
12842do
12843  IFS=$as_save_IFS
12844  test -z "$as_dir" && as_dir=.
12845    for ac_exec_ext in '' $ac_executable_extensions; do
12846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12847    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12849    break 2
12850  fi
12851done
12852  done
12853IFS=$as_save_IFS
12854
12855  ;;
12856esac
12857fi
12858WHICH=$ac_cv_path_WHICH
12859if test -n "$WHICH"; then
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12861$as_echo "$WHICH" >&6; }
12862else
12863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864$as_echo "no" >&6; }
12865fi
12866
12867
12868  test -n "$WHICH" && break
12869done
12870
12871    else
12872      # If it succeeded, then it was overridden by the user. We will use it
12873      # for the tool.
12874
12875      # First remove it from the list of overridden variables, so we can test
12876      # for unknown variables in the end.
12877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12878
12879      # Check if we try to supply an empty value
12880      if test "x$WHICH" = x; then
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12882$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12884$as_echo_n "checking for WHICH... " >&6; }
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12886$as_echo "disabled" >&6; }
12887      else
12888        # Check if the provided tool contains a complete path.
12889        tool_specified="$WHICH"
12890        tool_basename="${tool_specified##*/}"
12891        if test "x$tool_basename" = "x$tool_specified"; then
12892          # A command without a complete path is provided, search $PATH.
12893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12894$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12895          # Extract the first word of "$tool_basename", so it can be a program name with args.
12896set dummy $tool_basename; ac_word=$2
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12898$as_echo_n "checking for $ac_word... " >&6; }
12899if ${ac_cv_path_WHICH+:} false; then :
12900  $as_echo_n "(cached) " >&6
12901else
12902  case $WHICH in
12903  [\\/]* | ?:[\\/]*)
12904  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12905  ;;
12906  *)
12907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12908for as_dir in $PATH
12909do
12910  IFS=$as_save_IFS
12911  test -z "$as_dir" && as_dir=.
12912    for ac_exec_ext in '' $ac_executable_extensions; do
12913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12914    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12916    break 2
12917  fi
12918done
12919  done
12920IFS=$as_save_IFS
12921
12922  ;;
12923esac
12924fi
12925WHICH=$ac_cv_path_WHICH
12926if test -n "$WHICH"; then
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12928$as_echo "$WHICH" >&6; }
12929else
12930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12931$as_echo "no" >&6; }
12932fi
12933
12934
12935          if test "x$WHICH" = x; then
12936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12937          fi
12938        else
12939          # Otherwise we believe it is a complete path. Use it as it is.
12940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12941$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12943$as_echo_n "checking for WHICH... " >&6; }
12944          if test ! -x "$tool_specified"; then
12945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12946$as_echo "not found" >&6; }
12947            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12948          fi
12949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12950$as_echo "$tool_specified" >&6; }
12951        fi
12952      fi
12953    fi
12954
12955  fi
12956
12957
12958
12959  if test "x$WHICH" = x; then
12960    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12961  fi
12962
12963
12964
12965
12966
12967  # Publish this variable in the help.
12968
12969
12970  if [ -z "${XARGS+x}" ]; then
12971    # The variable is not set by user, try to locate tool using the code snippet
12972    for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017  else
13018    # The variable is set, but is it from the command line or the environment?
13019
13020    # Try to remove the string !XARGS! from our list.
13021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13023      # If it failed, the variable was not from the command line. Ignore it,
13024      # but warn the user (except for BASH, which is always set by the calling BASH).
13025      if test "xXARGS" != xBASH; then
13026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13027$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13028      fi
13029      # Try to locate tool using the code snippet
13030      for ac_prog in xargs
13031do
13032  # Extract the first word of "$ac_prog", so it can be a program name with args.
13033set dummy $ac_prog; ac_word=$2
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13035$as_echo_n "checking for $ac_word... " >&6; }
13036if ${ac_cv_path_XARGS+:} false; then :
13037  $as_echo_n "(cached) " >&6
13038else
13039  case $XARGS in
13040  [\\/]* | ?:[\\/]*)
13041  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13042  ;;
13043  *)
13044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13045for as_dir in $PATH
13046do
13047  IFS=$as_save_IFS
13048  test -z "$as_dir" && as_dir=.
13049    for ac_exec_ext in '' $ac_executable_extensions; do
13050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13051    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13053    break 2
13054  fi
13055done
13056  done
13057IFS=$as_save_IFS
13058
13059  ;;
13060esac
13061fi
13062XARGS=$ac_cv_path_XARGS
13063if test -n "$XARGS"; then
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13065$as_echo "$XARGS" >&6; }
13066else
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13068$as_echo "no" >&6; }
13069fi
13070
13071
13072  test -n "$XARGS" && break
13073done
13074
13075    else
13076      # If it succeeded, then it was overridden by the user. We will use it
13077      # for the tool.
13078
13079      # First remove it from the list of overridden variables, so we can test
13080      # for unknown variables in the end.
13081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13082
13083      # Check if we try to supply an empty value
13084      if test "x$XARGS" = x; then
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13086$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13088$as_echo_n "checking for XARGS... " >&6; }
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13090$as_echo "disabled" >&6; }
13091      else
13092        # Check if the provided tool contains a complete path.
13093        tool_specified="$XARGS"
13094        tool_basename="${tool_specified##*/}"
13095        if test "x$tool_basename" = "x$tool_specified"; then
13096          # A command without a complete path is provided, search $PATH.
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13098$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13099          # Extract the first word of "$tool_basename", so it can be a program name with args.
13100set dummy $tool_basename; ac_word=$2
13101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13102$as_echo_n "checking for $ac_word... " >&6; }
13103if ${ac_cv_path_XARGS+:} false; then :
13104  $as_echo_n "(cached) " >&6
13105else
13106  case $XARGS in
13107  [\\/]* | ?:[\\/]*)
13108  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13109  ;;
13110  *)
13111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13112for as_dir in $PATH
13113do
13114  IFS=$as_save_IFS
13115  test -z "$as_dir" && as_dir=.
13116    for ac_exec_ext in '' $ac_executable_extensions; do
13117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13118    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13120    break 2
13121  fi
13122done
13123  done
13124IFS=$as_save_IFS
13125
13126  ;;
13127esac
13128fi
13129XARGS=$ac_cv_path_XARGS
13130if test -n "$XARGS"; then
13131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13132$as_echo "$XARGS" >&6; }
13133else
13134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13135$as_echo "no" >&6; }
13136fi
13137
13138
13139          if test "x$XARGS" = x; then
13140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13141          fi
13142        else
13143          # Otherwise we believe it is a complete path. Use it as it is.
13144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13145$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13147$as_echo_n "checking for XARGS... " >&6; }
13148          if test ! -x "$tool_specified"; then
13149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13150$as_echo "not found" >&6; }
13151            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13152          fi
13153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13154$as_echo "$tool_specified" >&6; }
13155        fi
13156      fi
13157    fi
13158
13159  fi
13160
13161
13162
13163  if test "x$XARGS" = x; then
13164    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13165  fi
13166
13167
13168
13169  # Then required tools that require some special treatment.
13170
13171
13172  # Publish this variable in the help.
13173
13174
13175  if [ -z "${AWK+x}" ]; then
13176    # The variable is not set by user, try to locate tool using the code snippet
13177    for ac_prog in gawk mawk nawk awk
13178do
13179  # Extract the first word of "$ac_prog", so it can be a program name with args.
13180set dummy $ac_prog; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_prog_AWK+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  if test -n "$AWK"; then
13187  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13188else
13189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13190for as_dir in $PATH
13191do
13192  IFS=$as_save_IFS
13193  test -z "$as_dir" && as_dir=.
13194    for ac_exec_ext in '' $ac_executable_extensions; do
13195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13196    ac_cv_prog_AWK="$ac_prog"
13197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13198    break 2
13199  fi
13200done
13201  done
13202IFS=$as_save_IFS
13203
13204fi
13205fi
13206AWK=$ac_cv_prog_AWK
13207if test -n "$AWK"; then
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13209$as_echo "$AWK" >&6; }
13210else
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
13213fi
13214
13215
13216  test -n "$AWK" && break
13217done
13218
13219  else
13220    # The variable is set, but is it from the command line or the environment?
13221
13222    # Try to remove the string !AWK! from our list.
13223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13225      # If it failed, the variable was not from the command line. Ignore it,
13226      # but warn the user (except for BASH, which is always set by the calling BASH).
13227      if test "xAWK" != xBASH; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13229$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13230      fi
13231      # Try to locate tool using the code snippet
13232      for ac_prog in gawk mawk nawk awk
13233do
13234  # Extract the first word of "$ac_prog", so it can be a program name with args.
13235set dummy $ac_prog; ac_word=$2
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13237$as_echo_n "checking for $ac_word... " >&6; }
13238if ${ac_cv_prog_AWK+:} false; then :
13239  $as_echo_n "(cached) " >&6
13240else
13241  if test -n "$AWK"; then
13242  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13243else
13244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13245for as_dir in $PATH
13246do
13247  IFS=$as_save_IFS
13248  test -z "$as_dir" && as_dir=.
13249    for ac_exec_ext in '' $ac_executable_extensions; do
13250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13251    ac_cv_prog_AWK="$ac_prog"
13252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13253    break 2
13254  fi
13255done
13256  done
13257IFS=$as_save_IFS
13258
13259fi
13260fi
13261AWK=$ac_cv_prog_AWK
13262if test -n "$AWK"; then
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13264$as_echo "$AWK" >&6; }
13265else
13266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13267$as_echo "no" >&6; }
13268fi
13269
13270
13271  test -n "$AWK" && break
13272done
13273
13274    else
13275      # If it succeeded, then it was overridden by the user. We will use it
13276      # for the tool.
13277
13278      # First remove it from the list of overridden variables, so we can test
13279      # for unknown variables in the end.
13280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13281
13282      # Check if we try to supply an empty value
13283      if test "x$AWK" = x; then
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13285$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13287$as_echo_n "checking for AWK... " >&6; }
13288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13289$as_echo "disabled" >&6; }
13290      else
13291        # Check if the provided tool contains a complete path.
13292        tool_specified="$AWK"
13293        tool_basename="${tool_specified##*/}"
13294        if test "x$tool_basename" = "x$tool_specified"; then
13295          # A command without a complete path is provided, search $PATH.
13296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13297$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13298          # Extract the first word of "$tool_basename", so it can be a program name with args.
13299set dummy $tool_basename; ac_word=$2
13300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13301$as_echo_n "checking for $ac_word... " >&6; }
13302if ${ac_cv_path_AWK+:} false; then :
13303  $as_echo_n "(cached) " >&6
13304else
13305  case $AWK in
13306  [\\/]* | ?:[\\/]*)
13307  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13308  ;;
13309  *)
13310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13311for as_dir in $PATH
13312do
13313  IFS=$as_save_IFS
13314  test -z "$as_dir" && as_dir=.
13315    for ac_exec_ext in '' $ac_executable_extensions; do
13316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13317    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13319    break 2
13320  fi
13321done
13322  done
13323IFS=$as_save_IFS
13324
13325  ;;
13326esac
13327fi
13328AWK=$ac_cv_path_AWK
13329if test -n "$AWK"; then
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13331$as_echo "$AWK" >&6; }
13332else
13333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13334$as_echo "no" >&6; }
13335fi
13336
13337
13338          if test "x$AWK" = x; then
13339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13340          fi
13341        else
13342          # Otherwise we believe it is a complete path. Use it as it is.
13343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13344$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13346$as_echo_n "checking for AWK... " >&6; }
13347          if test ! -x "$tool_specified"; then
13348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13349$as_echo "not found" >&6; }
13350            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13351          fi
13352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13353$as_echo "$tool_specified" >&6; }
13354        fi
13355      fi
13356    fi
13357
13358  fi
13359
13360
13361  if test "x$AWK" = x; then
13362    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13363  fi
13364
13365
13366
13367
13368  # Publish this variable in the help.
13369
13370
13371  if [ -z "${GREP+x}" ]; then
13372    # The variable is not set by user, try to locate tool using the code snippet
13373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13374$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13375if ${ac_cv_path_GREP+:} false; then :
13376  $as_echo_n "(cached) " >&6
13377else
13378  if test -z "$GREP"; then
13379  ac_path_GREP_found=false
13380  # Loop through the user's path and test for each of PROGNAME-LIST
13381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13382for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13383do
13384  IFS=$as_save_IFS
13385  test -z "$as_dir" && as_dir=.
13386    for ac_prog in grep ggrep; do
13387    for ac_exec_ext in '' $ac_executable_extensions; do
13388      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13389      as_fn_executable_p "$ac_path_GREP" || continue
13390# Check for GNU ac_path_GREP and select it if it is found.
13391  # Check for GNU $ac_path_GREP
13392case `"$ac_path_GREP" --version 2>&1` in
13393*GNU*)
13394  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13395*)
13396  ac_count=0
13397  $as_echo_n 0123456789 >"conftest.in"
13398  while :
13399  do
13400    cat "conftest.in" "conftest.in" >"conftest.tmp"
13401    mv "conftest.tmp" "conftest.in"
13402    cp "conftest.in" "conftest.nl"
13403    $as_echo 'GREP' >> "conftest.nl"
13404    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13405    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13406    as_fn_arith $ac_count + 1 && ac_count=$as_val
13407    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13408      # Best one so far, save it but keep looking for a better one
13409      ac_cv_path_GREP="$ac_path_GREP"
13410      ac_path_GREP_max=$ac_count
13411    fi
13412    # 10*(2^10) chars as input seems more than enough
13413    test $ac_count -gt 10 && break
13414  done
13415  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13416esac
13417
13418      $ac_path_GREP_found && break 3
13419    done
13420  done
13421  done
13422IFS=$as_save_IFS
13423  if test -z "$ac_cv_path_GREP"; then
13424    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13425  fi
13426else
13427  ac_cv_path_GREP=$GREP
13428fi
13429
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13432$as_echo "$ac_cv_path_GREP" >&6; }
13433 GREP="$ac_cv_path_GREP"
13434
13435
13436  else
13437    # The variable is set, but is it from the command line or the environment?
13438
13439    # Try to remove the string !GREP! from our list.
13440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13442      # If it failed, the variable was not from the command line. Ignore it,
13443      # but warn the user (except for BASH, which is always set by the calling BASH).
13444      if test "xGREP" != xBASH; then
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13446$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13447      fi
13448      # Try to locate tool using the code snippet
13449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13450$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13451if ${ac_cv_path_GREP+:} false; then :
13452  $as_echo_n "(cached) " >&6
13453else
13454  if test -z "$GREP"; then
13455  ac_path_GREP_found=false
13456  # Loop through the user's path and test for each of PROGNAME-LIST
13457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13458for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13459do
13460  IFS=$as_save_IFS
13461  test -z "$as_dir" && as_dir=.
13462    for ac_prog in grep ggrep; do
13463    for ac_exec_ext in '' $ac_executable_extensions; do
13464      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13465      as_fn_executable_p "$ac_path_GREP" || continue
13466# Check for GNU ac_path_GREP and select it if it is found.
13467  # Check for GNU $ac_path_GREP
13468case `"$ac_path_GREP" --version 2>&1` in
13469*GNU*)
13470  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13471*)
13472  ac_count=0
13473  $as_echo_n 0123456789 >"conftest.in"
13474  while :
13475  do
13476    cat "conftest.in" "conftest.in" >"conftest.tmp"
13477    mv "conftest.tmp" "conftest.in"
13478    cp "conftest.in" "conftest.nl"
13479    $as_echo 'GREP' >> "conftest.nl"
13480    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13481    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13482    as_fn_arith $ac_count + 1 && ac_count=$as_val
13483    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13484      # Best one so far, save it but keep looking for a better one
13485      ac_cv_path_GREP="$ac_path_GREP"
13486      ac_path_GREP_max=$ac_count
13487    fi
13488    # 10*(2^10) chars as input seems more than enough
13489    test $ac_count -gt 10 && break
13490  done
13491  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13492esac
13493
13494      $ac_path_GREP_found && break 3
13495    done
13496  done
13497  done
13498IFS=$as_save_IFS
13499  if test -z "$ac_cv_path_GREP"; then
13500    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13501  fi
13502else
13503  ac_cv_path_GREP=$GREP
13504fi
13505
13506fi
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13508$as_echo "$ac_cv_path_GREP" >&6; }
13509 GREP="$ac_cv_path_GREP"
13510
13511
13512    else
13513      # If it succeeded, then it was overridden by the user. We will use it
13514      # for the tool.
13515
13516      # First remove it from the list of overridden variables, so we can test
13517      # for unknown variables in the end.
13518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13519
13520      # Check if we try to supply an empty value
13521      if test "x$GREP" = x; then
13522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13523$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13525$as_echo_n "checking for GREP... " >&6; }
13526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13527$as_echo "disabled" >&6; }
13528      else
13529        # Check if the provided tool contains a complete path.
13530        tool_specified="$GREP"
13531        tool_basename="${tool_specified##*/}"
13532        if test "x$tool_basename" = "x$tool_specified"; then
13533          # A command without a complete path is provided, search $PATH.
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13535$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13536          # Extract the first word of "$tool_basename", so it can be a program name with args.
13537set dummy $tool_basename; ac_word=$2
13538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13539$as_echo_n "checking for $ac_word... " >&6; }
13540if ${ac_cv_path_GREP+:} false; then :
13541  $as_echo_n "(cached) " >&6
13542else
13543  case $GREP in
13544  [\\/]* | ?:[\\/]*)
13545  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13546  ;;
13547  *)
13548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13549for as_dir in $PATH
13550do
13551  IFS=$as_save_IFS
13552  test -z "$as_dir" && as_dir=.
13553    for ac_exec_ext in '' $ac_executable_extensions; do
13554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13555    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13557    break 2
13558  fi
13559done
13560  done
13561IFS=$as_save_IFS
13562
13563  ;;
13564esac
13565fi
13566GREP=$ac_cv_path_GREP
13567if test -n "$GREP"; then
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13569$as_echo "$GREP" >&6; }
13570else
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13572$as_echo "no" >&6; }
13573fi
13574
13575
13576          if test "x$GREP" = x; then
13577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13578          fi
13579        else
13580          # Otherwise we believe it is a complete path. Use it as it is.
13581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13582$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13584$as_echo_n "checking for GREP... " >&6; }
13585          if test ! -x "$tool_specified"; then
13586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13587$as_echo "not found" >&6; }
13588            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13589          fi
13590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13591$as_echo "$tool_specified" >&6; }
13592        fi
13593      fi
13594    fi
13595
13596  fi
13597
13598
13599  if test "x$GREP" = x; then
13600    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13601  fi
13602
13603
13604
13605
13606  # Publish this variable in the help.
13607
13608
13609  if [ -z "${EGREP+x}" ]; then
13610    # The variable is not set by user, try to locate tool using the code snippet
13611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13612$as_echo_n "checking for egrep... " >&6; }
13613if ${ac_cv_path_EGREP+:} false; then :
13614  $as_echo_n "(cached) " >&6
13615else
13616  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13617   then ac_cv_path_EGREP="$GREP -E"
13618   else
13619     if test -z "$EGREP"; then
13620  ac_path_EGREP_found=false
13621  # Loop through the user's path and test for each of PROGNAME-LIST
13622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13623for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13624do
13625  IFS=$as_save_IFS
13626  test -z "$as_dir" && as_dir=.
13627    for ac_prog in egrep; do
13628    for ac_exec_ext in '' $ac_executable_extensions; do
13629      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13630      as_fn_executable_p "$ac_path_EGREP" || continue
13631# Check for GNU ac_path_EGREP and select it if it is found.
13632  # Check for GNU $ac_path_EGREP
13633case `"$ac_path_EGREP" --version 2>&1` in
13634*GNU*)
13635  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13636*)
13637  ac_count=0
13638  $as_echo_n 0123456789 >"conftest.in"
13639  while :
13640  do
13641    cat "conftest.in" "conftest.in" >"conftest.tmp"
13642    mv "conftest.tmp" "conftest.in"
13643    cp "conftest.in" "conftest.nl"
13644    $as_echo 'EGREP' >> "conftest.nl"
13645    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13646    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13647    as_fn_arith $ac_count + 1 && ac_count=$as_val
13648    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13649      # Best one so far, save it but keep looking for a better one
13650      ac_cv_path_EGREP="$ac_path_EGREP"
13651      ac_path_EGREP_max=$ac_count
13652    fi
13653    # 10*(2^10) chars as input seems more than enough
13654    test $ac_count -gt 10 && break
13655  done
13656  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13657esac
13658
13659      $ac_path_EGREP_found && break 3
13660    done
13661  done
13662  done
13663IFS=$as_save_IFS
13664  if test -z "$ac_cv_path_EGREP"; then
13665    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13666  fi
13667else
13668  ac_cv_path_EGREP=$EGREP
13669fi
13670
13671   fi
13672fi
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13674$as_echo "$ac_cv_path_EGREP" >&6; }
13675 EGREP="$ac_cv_path_EGREP"
13676
13677
13678  else
13679    # The variable is set, but is it from the command line or the environment?
13680
13681    # Try to remove the string !EGREP! from our list.
13682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13684      # If it failed, the variable was not from the command line. Ignore it,
13685      # but warn the user (except for BASH, which is always set by the calling BASH).
13686      if test "xEGREP" != xBASH; then
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13688$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13689      fi
13690      # Try to locate tool using the code snippet
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13692$as_echo_n "checking for egrep... " >&6; }
13693if ${ac_cv_path_EGREP+:} false; then :
13694  $as_echo_n "(cached) " >&6
13695else
13696  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13697   then ac_cv_path_EGREP="$GREP -E"
13698   else
13699     if test -z "$EGREP"; then
13700  ac_path_EGREP_found=false
13701  # Loop through the user's path and test for each of PROGNAME-LIST
13702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13704do
13705  IFS=$as_save_IFS
13706  test -z "$as_dir" && as_dir=.
13707    for ac_prog in egrep; do
13708    for ac_exec_ext in '' $ac_executable_extensions; do
13709      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13710      as_fn_executable_p "$ac_path_EGREP" || continue
13711# Check for GNU ac_path_EGREP and select it if it is found.
13712  # Check for GNU $ac_path_EGREP
13713case `"$ac_path_EGREP" --version 2>&1` in
13714*GNU*)
13715  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13716*)
13717  ac_count=0
13718  $as_echo_n 0123456789 >"conftest.in"
13719  while :
13720  do
13721    cat "conftest.in" "conftest.in" >"conftest.tmp"
13722    mv "conftest.tmp" "conftest.in"
13723    cp "conftest.in" "conftest.nl"
13724    $as_echo 'EGREP' >> "conftest.nl"
13725    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13726    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13727    as_fn_arith $ac_count + 1 && ac_count=$as_val
13728    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13729      # Best one so far, save it but keep looking for a better one
13730      ac_cv_path_EGREP="$ac_path_EGREP"
13731      ac_path_EGREP_max=$ac_count
13732    fi
13733    # 10*(2^10) chars as input seems more than enough
13734    test $ac_count -gt 10 && break
13735  done
13736  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13737esac
13738
13739      $ac_path_EGREP_found && break 3
13740    done
13741  done
13742  done
13743IFS=$as_save_IFS
13744  if test -z "$ac_cv_path_EGREP"; then
13745    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13746  fi
13747else
13748  ac_cv_path_EGREP=$EGREP
13749fi
13750
13751   fi
13752fi
13753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13754$as_echo "$ac_cv_path_EGREP" >&6; }
13755 EGREP="$ac_cv_path_EGREP"
13756
13757
13758    else
13759      # If it succeeded, then it was overridden by the user. We will use it
13760      # for the tool.
13761
13762      # First remove it from the list of overridden variables, so we can test
13763      # for unknown variables in the end.
13764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13765
13766      # Check if we try to supply an empty value
13767      if test "x$EGREP" = x; then
13768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13769$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13771$as_echo_n "checking for EGREP... " >&6; }
13772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13773$as_echo "disabled" >&6; }
13774      else
13775        # Check if the provided tool contains a complete path.
13776        tool_specified="$EGREP"
13777        tool_basename="${tool_specified##*/}"
13778        if test "x$tool_basename" = "x$tool_specified"; then
13779          # A command without a complete path is provided, search $PATH.
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13781$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13782          # Extract the first word of "$tool_basename", so it can be a program name with args.
13783set dummy $tool_basename; ac_word=$2
13784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13785$as_echo_n "checking for $ac_word... " >&6; }
13786if ${ac_cv_path_EGREP+:} false; then :
13787  $as_echo_n "(cached) " >&6
13788else
13789  case $EGREP in
13790  [\\/]* | ?:[\\/]*)
13791  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13792  ;;
13793  *)
13794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13795for as_dir in $PATH
13796do
13797  IFS=$as_save_IFS
13798  test -z "$as_dir" && as_dir=.
13799    for ac_exec_ext in '' $ac_executable_extensions; do
13800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13801    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13803    break 2
13804  fi
13805done
13806  done
13807IFS=$as_save_IFS
13808
13809  ;;
13810esac
13811fi
13812EGREP=$ac_cv_path_EGREP
13813if test -n "$EGREP"; then
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13815$as_echo "$EGREP" >&6; }
13816else
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13818$as_echo "no" >&6; }
13819fi
13820
13821
13822          if test "x$EGREP" = x; then
13823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13824          fi
13825        else
13826          # Otherwise we believe it is a complete path. Use it as it is.
13827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13828$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13830$as_echo_n "checking for EGREP... " >&6; }
13831          if test ! -x "$tool_specified"; then
13832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13833$as_echo "not found" >&6; }
13834            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13835          fi
13836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13837$as_echo "$tool_specified" >&6; }
13838        fi
13839      fi
13840    fi
13841
13842  fi
13843
13844
13845  if test "x$EGREP" = x; then
13846    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13847  fi
13848
13849
13850
13851
13852  # Publish this variable in the help.
13853
13854
13855  if [ -z "${FGREP+x}" ]; then
13856    # The variable is not set by user, try to locate tool using the code snippet
13857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13858$as_echo_n "checking for fgrep... " >&6; }
13859if ${ac_cv_path_FGREP+:} false; then :
13860  $as_echo_n "(cached) " >&6
13861else
13862  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13863   then ac_cv_path_FGREP="$GREP -F"
13864   else
13865     if test -z "$FGREP"; then
13866  ac_path_FGREP_found=false
13867  # Loop through the user's path and test for each of PROGNAME-LIST
13868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13869for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13870do
13871  IFS=$as_save_IFS
13872  test -z "$as_dir" && as_dir=.
13873    for ac_prog in fgrep; do
13874    for ac_exec_ext in '' $ac_executable_extensions; do
13875      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13876      as_fn_executable_p "$ac_path_FGREP" || continue
13877# Check for GNU ac_path_FGREP and select it if it is found.
13878  # Check for GNU $ac_path_FGREP
13879case `"$ac_path_FGREP" --version 2>&1` in
13880*GNU*)
13881  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13882*)
13883  ac_count=0
13884  $as_echo_n 0123456789 >"conftest.in"
13885  while :
13886  do
13887    cat "conftest.in" "conftest.in" >"conftest.tmp"
13888    mv "conftest.tmp" "conftest.in"
13889    cp "conftest.in" "conftest.nl"
13890    $as_echo 'FGREP' >> "conftest.nl"
13891    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13892    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13893    as_fn_arith $ac_count + 1 && ac_count=$as_val
13894    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13895      # Best one so far, save it but keep looking for a better one
13896      ac_cv_path_FGREP="$ac_path_FGREP"
13897      ac_path_FGREP_max=$ac_count
13898    fi
13899    # 10*(2^10) chars as input seems more than enough
13900    test $ac_count -gt 10 && break
13901  done
13902  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13903esac
13904
13905      $ac_path_FGREP_found && break 3
13906    done
13907  done
13908  done
13909IFS=$as_save_IFS
13910  if test -z "$ac_cv_path_FGREP"; then
13911    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13912  fi
13913else
13914  ac_cv_path_FGREP=$FGREP
13915fi
13916
13917   fi
13918fi
13919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13920$as_echo "$ac_cv_path_FGREP" >&6; }
13921 FGREP="$ac_cv_path_FGREP"
13922
13923
13924  else
13925    # The variable is set, but is it from the command line or the environment?
13926
13927    # Try to remove the string !FGREP! from our list.
13928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13930      # If it failed, the variable was not from the command line. Ignore it,
13931      # but warn the user (except for BASH, which is always set by the calling BASH).
13932      if test "xFGREP" != xBASH; then
13933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13934$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13935      fi
13936      # Try to locate tool using the code snippet
13937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13938$as_echo_n "checking for fgrep... " >&6; }
13939if ${ac_cv_path_FGREP+:} false; then :
13940  $as_echo_n "(cached) " >&6
13941else
13942  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13943   then ac_cv_path_FGREP="$GREP -F"
13944   else
13945     if test -z "$FGREP"; then
13946  ac_path_FGREP_found=false
13947  # Loop through the user's path and test for each of PROGNAME-LIST
13948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13949for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13950do
13951  IFS=$as_save_IFS
13952  test -z "$as_dir" && as_dir=.
13953    for ac_prog in fgrep; do
13954    for ac_exec_ext in '' $ac_executable_extensions; do
13955      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13956      as_fn_executable_p "$ac_path_FGREP" || continue
13957# Check for GNU ac_path_FGREP and select it if it is found.
13958  # Check for GNU $ac_path_FGREP
13959case `"$ac_path_FGREP" --version 2>&1` in
13960*GNU*)
13961  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13962*)
13963  ac_count=0
13964  $as_echo_n 0123456789 >"conftest.in"
13965  while :
13966  do
13967    cat "conftest.in" "conftest.in" >"conftest.tmp"
13968    mv "conftest.tmp" "conftest.in"
13969    cp "conftest.in" "conftest.nl"
13970    $as_echo 'FGREP' >> "conftest.nl"
13971    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13972    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13973    as_fn_arith $ac_count + 1 && ac_count=$as_val
13974    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13975      # Best one so far, save it but keep looking for a better one
13976      ac_cv_path_FGREP="$ac_path_FGREP"
13977      ac_path_FGREP_max=$ac_count
13978    fi
13979    # 10*(2^10) chars as input seems more than enough
13980    test $ac_count -gt 10 && break
13981  done
13982  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13983esac
13984
13985      $ac_path_FGREP_found && break 3
13986    done
13987  done
13988  done
13989IFS=$as_save_IFS
13990  if test -z "$ac_cv_path_FGREP"; then
13991    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13992  fi
13993else
13994  ac_cv_path_FGREP=$FGREP
13995fi
13996
13997   fi
13998fi
13999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14000$as_echo "$ac_cv_path_FGREP" >&6; }
14001 FGREP="$ac_cv_path_FGREP"
14002
14003
14004    else
14005      # If it succeeded, then it was overridden by the user. We will use it
14006      # for the tool.
14007
14008      # First remove it from the list of overridden variables, so we can test
14009      # for unknown variables in the end.
14010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14011
14012      # Check if we try to supply an empty value
14013      if test "x$FGREP" = x; then
14014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14015$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14017$as_echo_n "checking for FGREP... " >&6; }
14018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14019$as_echo "disabled" >&6; }
14020      else
14021        # Check if the provided tool contains a complete path.
14022        tool_specified="$FGREP"
14023        tool_basename="${tool_specified##*/}"
14024        if test "x$tool_basename" = "x$tool_specified"; then
14025          # A command without a complete path is provided, search $PATH.
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14027$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14028          # Extract the first word of "$tool_basename", so it can be a program name with args.
14029set dummy $tool_basename; ac_word=$2
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14031$as_echo_n "checking for $ac_word... " >&6; }
14032if ${ac_cv_path_FGREP+:} false; then :
14033  $as_echo_n "(cached) " >&6
14034else
14035  case $FGREP in
14036  [\\/]* | ?:[\\/]*)
14037  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14038  ;;
14039  *)
14040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14041for as_dir in $PATH
14042do
14043  IFS=$as_save_IFS
14044  test -z "$as_dir" && as_dir=.
14045    for ac_exec_ext in '' $ac_executable_extensions; do
14046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14047    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14049    break 2
14050  fi
14051done
14052  done
14053IFS=$as_save_IFS
14054
14055  ;;
14056esac
14057fi
14058FGREP=$ac_cv_path_FGREP
14059if test -n "$FGREP"; then
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14061$as_echo "$FGREP" >&6; }
14062else
14063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14064$as_echo "no" >&6; }
14065fi
14066
14067
14068          if test "x$FGREP" = x; then
14069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14070          fi
14071        else
14072          # Otherwise we believe it is a complete path. Use it as it is.
14073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14074$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14076$as_echo_n "checking for FGREP... " >&6; }
14077          if test ! -x "$tool_specified"; then
14078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14079$as_echo "not found" >&6; }
14080            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14081          fi
14082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14083$as_echo "$tool_specified" >&6; }
14084        fi
14085      fi
14086    fi
14087
14088  fi
14089
14090
14091  if test "x$FGREP" = x; then
14092    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14093  fi
14094
14095
14096
14097
14098  # Publish this variable in the help.
14099
14100
14101  if [ -z "${SED+x}" ]; then
14102    # The variable is not set by user, try to locate tool using the code snippet
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14104$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14105if ${ac_cv_path_SED+:} false; then :
14106  $as_echo_n "(cached) " >&6
14107else
14108            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14109     for ac_i in 1 2 3 4 5 6 7; do
14110       ac_script="$ac_script$as_nl$ac_script"
14111     done
14112     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14113     { ac_script=; unset ac_script;}
14114     if test -z "$SED"; then
14115  ac_path_SED_found=false
14116  # Loop through the user's path and test for each of PROGNAME-LIST
14117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14118for as_dir in $PATH
14119do
14120  IFS=$as_save_IFS
14121  test -z "$as_dir" && as_dir=.
14122    for ac_prog in sed gsed; do
14123    for ac_exec_ext in '' $ac_executable_extensions; do
14124      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14125      as_fn_executable_p "$ac_path_SED" || continue
14126# Check for GNU ac_path_SED and select it if it is found.
14127  # Check for GNU $ac_path_SED
14128case `"$ac_path_SED" --version 2>&1` in
14129*GNU*)
14130  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14131*)
14132  ac_count=0
14133  $as_echo_n 0123456789 >"conftest.in"
14134  while :
14135  do
14136    cat "conftest.in" "conftest.in" >"conftest.tmp"
14137    mv "conftest.tmp" "conftest.in"
14138    cp "conftest.in" "conftest.nl"
14139    $as_echo '' >> "conftest.nl"
14140    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14141    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14142    as_fn_arith $ac_count + 1 && ac_count=$as_val
14143    if test $ac_count -gt ${ac_path_SED_max-0}; then
14144      # Best one so far, save it but keep looking for a better one
14145      ac_cv_path_SED="$ac_path_SED"
14146      ac_path_SED_max=$ac_count
14147    fi
14148    # 10*(2^10) chars as input seems more than enough
14149    test $ac_count -gt 10 && break
14150  done
14151  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14152esac
14153
14154      $ac_path_SED_found && break 3
14155    done
14156  done
14157  done
14158IFS=$as_save_IFS
14159  if test -z "$ac_cv_path_SED"; then
14160    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14161  fi
14162else
14163  ac_cv_path_SED=$SED
14164fi
14165
14166fi
14167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14168$as_echo "$ac_cv_path_SED" >&6; }
14169 SED="$ac_cv_path_SED"
14170  rm -f conftest.sed
14171
14172  else
14173    # The variable is set, but is it from the command line or the environment?
14174
14175    # Try to remove the string !SED! from our list.
14176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14178      # If it failed, the variable was not from the command line. Ignore it,
14179      # but warn the user (except for BASH, which is always set by the calling BASH).
14180      if test "xSED" != xBASH; then
14181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14182$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14183      fi
14184      # Try to locate tool using the code snippet
14185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14186$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14187if ${ac_cv_path_SED+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14191     for ac_i in 1 2 3 4 5 6 7; do
14192       ac_script="$ac_script$as_nl$ac_script"
14193     done
14194     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14195     { ac_script=; unset ac_script;}
14196     if test -z "$SED"; then
14197  ac_path_SED_found=false
14198  # Loop through the user's path and test for each of PROGNAME-LIST
14199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14200for as_dir in $PATH
14201do
14202  IFS=$as_save_IFS
14203  test -z "$as_dir" && as_dir=.
14204    for ac_prog in sed gsed; do
14205    for ac_exec_ext in '' $ac_executable_extensions; do
14206      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14207      as_fn_executable_p "$ac_path_SED" || continue
14208# Check for GNU ac_path_SED and select it if it is found.
14209  # Check for GNU $ac_path_SED
14210case `"$ac_path_SED" --version 2>&1` in
14211*GNU*)
14212  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14213*)
14214  ac_count=0
14215  $as_echo_n 0123456789 >"conftest.in"
14216  while :
14217  do
14218    cat "conftest.in" "conftest.in" >"conftest.tmp"
14219    mv "conftest.tmp" "conftest.in"
14220    cp "conftest.in" "conftest.nl"
14221    $as_echo '' >> "conftest.nl"
14222    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14224    as_fn_arith $ac_count + 1 && ac_count=$as_val
14225    if test $ac_count -gt ${ac_path_SED_max-0}; then
14226      # Best one so far, save it but keep looking for a better one
14227      ac_cv_path_SED="$ac_path_SED"
14228      ac_path_SED_max=$ac_count
14229    fi
14230    # 10*(2^10) chars as input seems more than enough
14231    test $ac_count -gt 10 && break
14232  done
14233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14234esac
14235
14236      $ac_path_SED_found && break 3
14237    done
14238  done
14239  done
14240IFS=$as_save_IFS
14241  if test -z "$ac_cv_path_SED"; then
14242    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14243  fi
14244else
14245  ac_cv_path_SED=$SED
14246fi
14247
14248fi
14249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14250$as_echo "$ac_cv_path_SED" >&6; }
14251 SED="$ac_cv_path_SED"
14252  rm -f conftest.sed
14253
14254    else
14255      # If it succeeded, then it was overridden by the user. We will use it
14256      # for the tool.
14257
14258      # First remove it from the list of overridden variables, so we can test
14259      # for unknown variables in the end.
14260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14261
14262      # Check if we try to supply an empty value
14263      if test "x$SED" = x; then
14264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14265$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14267$as_echo_n "checking for SED... " >&6; }
14268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14269$as_echo "disabled" >&6; }
14270      else
14271        # Check if the provided tool contains a complete path.
14272        tool_specified="$SED"
14273        tool_basename="${tool_specified##*/}"
14274        if test "x$tool_basename" = "x$tool_specified"; then
14275          # A command without a complete path is provided, search $PATH.
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14277$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14278          # Extract the first word of "$tool_basename", so it can be a program name with args.
14279set dummy $tool_basename; ac_word=$2
14280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14281$as_echo_n "checking for $ac_word... " >&6; }
14282if ${ac_cv_path_SED+:} false; then :
14283  $as_echo_n "(cached) " >&6
14284else
14285  case $SED in
14286  [\\/]* | ?:[\\/]*)
14287  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14288  ;;
14289  *)
14290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14291for as_dir in $PATH
14292do
14293  IFS=$as_save_IFS
14294  test -z "$as_dir" && as_dir=.
14295    for ac_exec_ext in '' $ac_executable_extensions; do
14296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14297    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14299    break 2
14300  fi
14301done
14302  done
14303IFS=$as_save_IFS
14304
14305  ;;
14306esac
14307fi
14308SED=$ac_cv_path_SED
14309if test -n "$SED"; then
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14311$as_echo "$SED" >&6; }
14312else
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14314$as_echo "no" >&6; }
14315fi
14316
14317
14318          if test "x$SED" = x; then
14319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14320          fi
14321        else
14322          # Otherwise we believe it is a complete path. Use it as it is.
14323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14324$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14326$as_echo_n "checking for SED... " >&6; }
14327          if test ! -x "$tool_specified"; then
14328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14329$as_echo "not found" >&6; }
14330            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14331          fi
14332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14333$as_echo "$tool_specified" >&6; }
14334        fi
14335      fi
14336    fi
14337
14338  fi
14339
14340
14341  if test "x$SED" = x; then
14342    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14343  fi
14344
14345
14346
14347  # Always force rm.
14348  RM="$RM -f"
14349
14350  # pwd behaves differently on various platforms and some don't support the -L flag.
14351  # Always use the bash builtin pwd to get uniform behavior.
14352  THEPWDCMD=pwd
14353
14354  # These are not required on all platforms
14355
14356
14357  # Publish this variable in the help.
14358
14359
14360  if [ -z "${CYGPATH+x}" ]; then
14361    # The variable is not set by user, try to locate tool using the code snippet
14362    for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407  else
14408    # The variable is set, but is it from the command line or the environment?
14409
14410    # Try to remove the string !CYGPATH! from our list.
14411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14413      # If it failed, the variable was not from the command line. Ignore it,
14414      # but warn the user (except for BASH, which is always set by the calling BASH).
14415      if test "xCYGPATH" != xBASH; then
14416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14417$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14418      fi
14419      # Try to locate tool using the code snippet
14420      for ac_prog in cygpath
14421do
14422  # Extract the first word of "$ac_prog", so it can be a program name with args.
14423set dummy $ac_prog; ac_word=$2
14424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14425$as_echo_n "checking for $ac_word... " >&6; }
14426if ${ac_cv_path_CYGPATH+:} false; then :
14427  $as_echo_n "(cached) " >&6
14428else
14429  case $CYGPATH in
14430  [\\/]* | ?:[\\/]*)
14431  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14432  ;;
14433  *)
14434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14435for as_dir in $PATH
14436do
14437  IFS=$as_save_IFS
14438  test -z "$as_dir" && as_dir=.
14439    for ac_exec_ext in '' $ac_executable_extensions; do
14440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14441    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14443    break 2
14444  fi
14445done
14446  done
14447IFS=$as_save_IFS
14448
14449  ;;
14450esac
14451fi
14452CYGPATH=$ac_cv_path_CYGPATH
14453if test -n "$CYGPATH"; then
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14455$as_echo "$CYGPATH" >&6; }
14456else
14457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14458$as_echo "no" >&6; }
14459fi
14460
14461
14462  test -n "$CYGPATH" && break
14463done
14464
14465    else
14466      # If it succeeded, then it was overridden by the user. We will use it
14467      # for the tool.
14468
14469      # First remove it from the list of overridden variables, so we can test
14470      # for unknown variables in the end.
14471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14472
14473      # Check if we try to supply an empty value
14474      if test "x$CYGPATH" = x; then
14475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14476$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14478$as_echo_n "checking for CYGPATH... " >&6; }
14479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14480$as_echo "disabled" >&6; }
14481      else
14482        # Check if the provided tool contains a complete path.
14483        tool_specified="$CYGPATH"
14484        tool_basename="${tool_specified##*/}"
14485        if test "x$tool_basename" = "x$tool_specified"; then
14486          # A command without a complete path is provided, search $PATH.
14487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14488$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14489          # Extract the first word of "$tool_basename", so it can be a program name with args.
14490set dummy $tool_basename; ac_word=$2
14491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14492$as_echo_n "checking for $ac_word... " >&6; }
14493if ${ac_cv_path_CYGPATH+:} false; then :
14494  $as_echo_n "(cached) " >&6
14495else
14496  case $CYGPATH in
14497  [\\/]* | ?:[\\/]*)
14498  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14499  ;;
14500  *)
14501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14502for as_dir in $PATH
14503do
14504  IFS=$as_save_IFS
14505  test -z "$as_dir" && as_dir=.
14506    for ac_exec_ext in '' $ac_executable_extensions; do
14507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14508    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14510    break 2
14511  fi
14512done
14513  done
14514IFS=$as_save_IFS
14515
14516  ;;
14517esac
14518fi
14519CYGPATH=$ac_cv_path_CYGPATH
14520if test -n "$CYGPATH"; then
14521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14522$as_echo "$CYGPATH" >&6; }
14523else
14524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14525$as_echo "no" >&6; }
14526fi
14527
14528
14529          if test "x$CYGPATH" = x; then
14530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14531          fi
14532        else
14533          # Otherwise we believe it is a complete path. Use it as it is.
14534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14535$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14537$as_echo_n "checking for CYGPATH... " >&6; }
14538          if test ! -x "$tool_specified"; then
14539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14540$as_echo "not found" >&6; }
14541            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14542          fi
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14544$as_echo "$tool_specified" >&6; }
14545        fi
14546      fi
14547    fi
14548
14549  fi
14550
14551
14552
14553
14554  # Publish this variable in the help.
14555
14556
14557  if [ -z "${READLINK+x}" ]; then
14558    # The variable is not set by user, try to locate tool using the code snippet
14559    for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604  else
14605    # The variable is set, but is it from the command line or the environment?
14606
14607    # Try to remove the string !READLINK! from our list.
14608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14610      # If it failed, the variable was not from the command line. Ignore it,
14611      # but warn the user (except for BASH, which is always set by the calling BASH).
14612      if test "xREADLINK" != xBASH; then
14613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14614$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14615      fi
14616      # Try to locate tool using the code snippet
14617      for ac_prog in greadlink readlink
14618do
14619  # Extract the first word of "$ac_prog", so it can be a program name with args.
14620set dummy $ac_prog; ac_word=$2
14621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14622$as_echo_n "checking for $ac_word... " >&6; }
14623if ${ac_cv_path_READLINK+:} false; then :
14624  $as_echo_n "(cached) " >&6
14625else
14626  case $READLINK in
14627  [\\/]* | ?:[\\/]*)
14628  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14629  ;;
14630  *)
14631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14632for as_dir in $PATH
14633do
14634  IFS=$as_save_IFS
14635  test -z "$as_dir" && as_dir=.
14636    for ac_exec_ext in '' $ac_executable_extensions; do
14637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14638    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14640    break 2
14641  fi
14642done
14643  done
14644IFS=$as_save_IFS
14645
14646  ;;
14647esac
14648fi
14649READLINK=$ac_cv_path_READLINK
14650if test -n "$READLINK"; then
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14652$as_echo "$READLINK" >&6; }
14653else
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14655$as_echo "no" >&6; }
14656fi
14657
14658
14659  test -n "$READLINK" && break
14660done
14661
14662    else
14663      # If it succeeded, then it was overridden by the user. We will use it
14664      # for the tool.
14665
14666      # First remove it from the list of overridden variables, so we can test
14667      # for unknown variables in the end.
14668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14669
14670      # Check if we try to supply an empty value
14671      if test "x$READLINK" = x; then
14672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14673$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14675$as_echo_n "checking for READLINK... " >&6; }
14676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14677$as_echo "disabled" >&6; }
14678      else
14679        # Check if the provided tool contains a complete path.
14680        tool_specified="$READLINK"
14681        tool_basename="${tool_specified##*/}"
14682        if test "x$tool_basename" = "x$tool_specified"; then
14683          # A command without a complete path is provided, search $PATH.
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14685$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14686          # Extract the first word of "$tool_basename", so it can be a program name with args.
14687set dummy $tool_basename; ac_word=$2
14688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14689$as_echo_n "checking for $ac_word... " >&6; }
14690if ${ac_cv_path_READLINK+:} false; then :
14691  $as_echo_n "(cached) " >&6
14692else
14693  case $READLINK in
14694  [\\/]* | ?:[\\/]*)
14695  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14696  ;;
14697  *)
14698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14699for as_dir in $PATH
14700do
14701  IFS=$as_save_IFS
14702  test -z "$as_dir" && as_dir=.
14703    for ac_exec_ext in '' $ac_executable_extensions; do
14704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14705    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14707    break 2
14708  fi
14709done
14710  done
14711IFS=$as_save_IFS
14712
14713  ;;
14714esac
14715fi
14716READLINK=$ac_cv_path_READLINK
14717if test -n "$READLINK"; then
14718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14719$as_echo "$READLINK" >&6; }
14720else
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14722$as_echo "no" >&6; }
14723fi
14724
14725
14726          if test "x$READLINK" = x; then
14727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14728          fi
14729        else
14730          # Otherwise we believe it is a complete path. Use it as it is.
14731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14732$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14734$as_echo_n "checking for READLINK... " >&6; }
14735          if test ! -x "$tool_specified"; then
14736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14737$as_echo "not found" >&6; }
14738            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14739          fi
14740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14741$as_echo "$tool_specified" >&6; }
14742        fi
14743      fi
14744    fi
14745
14746  fi
14747
14748
14749
14750
14751  # Publish this variable in the help.
14752
14753
14754  if [ -z "${DF+x}" ]; then
14755    # The variable is not set by user, try to locate tool using the code snippet
14756    for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801  else
14802    # The variable is set, but is it from the command line or the environment?
14803
14804    # Try to remove the string !DF! from our list.
14805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14807      # If it failed, the variable was not from the command line. Ignore it,
14808      # but warn the user (except for BASH, which is always set by the calling BASH).
14809      if test "xDF" != xBASH; then
14810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14811$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14812      fi
14813      # Try to locate tool using the code snippet
14814      for ac_prog in df
14815do
14816  # Extract the first word of "$ac_prog", so it can be a program name with args.
14817set dummy $ac_prog; ac_word=$2
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14819$as_echo_n "checking for $ac_word... " >&6; }
14820if ${ac_cv_path_DF+:} false; then :
14821  $as_echo_n "(cached) " >&6
14822else
14823  case $DF in
14824  [\\/]* | ?:[\\/]*)
14825  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14826  ;;
14827  *)
14828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14829for as_dir in $PATH
14830do
14831  IFS=$as_save_IFS
14832  test -z "$as_dir" && as_dir=.
14833    for ac_exec_ext in '' $ac_executable_extensions; do
14834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14835    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14837    break 2
14838  fi
14839done
14840  done
14841IFS=$as_save_IFS
14842
14843  ;;
14844esac
14845fi
14846DF=$ac_cv_path_DF
14847if test -n "$DF"; then
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14849$as_echo "$DF" >&6; }
14850else
14851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14852$as_echo "no" >&6; }
14853fi
14854
14855
14856  test -n "$DF" && break
14857done
14858
14859    else
14860      # If it succeeded, then it was overridden by the user. We will use it
14861      # for the tool.
14862
14863      # First remove it from the list of overridden variables, so we can test
14864      # for unknown variables in the end.
14865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14866
14867      # Check if we try to supply an empty value
14868      if test "x$DF" = x; then
14869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14870$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14872$as_echo_n "checking for DF... " >&6; }
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14874$as_echo "disabled" >&6; }
14875      else
14876        # Check if the provided tool contains a complete path.
14877        tool_specified="$DF"
14878        tool_basename="${tool_specified##*/}"
14879        if test "x$tool_basename" = "x$tool_specified"; then
14880          # A command without a complete path is provided, search $PATH.
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14882$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14883          # Extract the first word of "$tool_basename", so it can be a program name with args.
14884set dummy $tool_basename; ac_word=$2
14885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14886$as_echo_n "checking for $ac_word... " >&6; }
14887if ${ac_cv_path_DF+:} false; then :
14888  $as_echo_n "(cached) " >&6
14889else
14890  case $DF in
14891  [\\/]* | ?:[\\/]*)
14892  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14893  ;;
14894  *)
14895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14896for as_dir in $PATH
14897do
14898  IFS=$as_save_IFS
14899  test -z "$as_dir" && as_dir=.
14900    for ac_exec_ext in '' $ac_executable_extensions; do
14901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14902    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14904    break 2
14905  fi
14906done
14907  done
14908IFS=$as_save_IFS
14909
14910  ;;
14911esac
14912fi
14913DF=$ac_cv_path_DF
14914if test -n "$DF"; then
14915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14916$as_echo "$DF" >&6; }
14917else
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14919$as_echo "no" >&6; }
14920fi
14921
14922
14923          if test "x$DF" = x; then
14924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14925          fi
14926        else
14927          # Otherwise we believe it is a complete path. Use it as it is.
14928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14929$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14931$as_echo_n "checking for DF... " >&6; }
14932          if test ! -x "$tool_specified"; then
14933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14934$as_echo "not found" >&6; }
14935            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14936          fi
14937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14938$as_echo "$tool_specified" >&6; }
14939        fi
14940      fi
14941    fi
14942
14943  fi
14944
14945
14946
14947
14948  # Publish this variable in the help.
14949
14950
14951  if [ -z "${CPIO+x}" ]; then
14952    # The variable is not set by user, try to locate tool using the code snippet
14953    for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998  else
14999    # The variable is set, but is it from the command line or the environment?
15000
15001    # Try to remove the string !CPIO! from our list.
15002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15004      # If it failed, the variable was not from the command line. Ignore it,
15005      # but warn the user (except for BASH, which is always set by the calling BASH).
15006      if test "xCPIO" != xBASH; then
15007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15008$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15009      fi
15010      # Try to locate tool using the code snippet
15011      for ac_prog in cpio bsdcpio
15012do
15013  # Extract the first word of "$ac_prog", so it can be a program name with args.
15014set dummy $ac_prog; ac_word=$2
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15016$as_echo_n "checking for $ac_word... " >&6; }
15017if ${ac_cv_path_CPIO+:} false; then :
15018  $as_echo_n "(cached) " >&6
15019else
15020  case $CPIO in
15021  [\\/]* | ?:[\\/]*)
15022  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15023  ;;
15024  *)
15025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15026for as_dir in $PATH
15027do
15028  IFS=$as_save_IFS
15029  test -z "$as_dir" && as_dir=.
15030    for ac_exec_ext in '' $ac_executable_extensions; do
15031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15032    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15034    break 2
15035  fi
15036done
15037  done
15038IFS=$as_save_IFS
15039
15040  ;;
15041esac
15042fi
15043CPIO=$ac_cv_path_CPIO
15044if test -n "$CPIO"; then
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15046$as_echo "$CPIO" >&6; }
15047else
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
15050fi
15051
15052
15053  test -n "$CPIO" && break
15054done
15055
15056    else
15057      # If it succeeded, then it was overridden by the user. We will use it
15058      # for the tool.
15059
15060      # First remove it from the list of overridden variables, so we can test
15061      # for unknown variables in the end.
15062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15063
15064      # Check if we try to supply an empty value
15065      if test "x$CPIO" = x; then
15066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15067$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15069$as_echo_n "checking for CPIO... " >&6; }
15070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15071$as_echo "disabled" >&6; }
15072      else
15073        # Check if the provided tool contains a complete path.
15074        tool_specified="$CPIO"
15075        tool_basename="${tool_specified##*/}"
15076        if test "x$tool_basename" = "x$tool_specified"; then
15077          # A command without a complete path is provided, search $PATH.
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15079$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15080          # Extract the first word of "$tool_basename", so it can be a program name with args.
15081set dummy $tool_basename; ac_word=$2
15082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15083$as_echo_n "checking for $ac_word... " >&6; }
15084if ${ac_cv_path_CPIO+:} false; then :
15085  $as_echo_n "(cached) " >&6
15086else
15087  case $CPIO in
15088  [\\/]* | ?:[\\/]*)
15089  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15090  ;;
15091  *)
15092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15093for as_dir in $PATH
15094do
15095  IFS=$as_save_IFS
15096  test -z "$as_dir" && as_dir=.
15097    for ac_exec_ext in '' $ac_executable_extensions; do
15098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15099    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15101    break 2
15102  fi
15103done
15104  done
15105IFS=$as_save_IFS
15106
15107  ;;
15108esac
15109fi
15110CPIO=$ac_cv_path_CPIO
15111if test -n "$CPIO"; then
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15113$as_echo "$CPIO" >&6; }
15114else
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15116$as_echo "no" >&6; }
15117fi
15118
15119
15120          if test "x$CPIO" = x; then
15121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15122          fi
15123        else
15124          # Otherwise we believe it is a complete path. Use it as it is.
15125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15126$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15128$as_echo_n "checking for CPIO... " >&6; }
15129          if test ! -x "$tool_specified"; then
15130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15131$as_echo "not found" >&6; }
15132            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15133          fi
15134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15135$as_echo "$tool_specified" >&6; }
15136        fi
15137      fi
15138    fi
15139
15140  fi
15141
15142
15143
15144
15145  # Publish this variable in the help.
15146
15147
15148  if [ -z "${NICE+x}" ]; then
15149    # The variable is not set by user, try to locate tool using the code snippet
15150    for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195  else
15196    # The variable is set, but is it from the command line or the environment?
15197
15198    # Try to remove the string !NICE! from our list.
15199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15201      # If it failed, the variable was not from the command line. Ignore it,
15202      # but warn the user (except for BASH, which is always set by the calling BASH).
15203      if test "xNICE" != xBASH; then
15204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15205$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15206      fi
15207      # Try to locate tool using the code snippet
15208      for ac_prog in nice
15209do
15210  # Extract the first word of "$ac_prog", so it can be a program name with args.
15211set dummy $ac_prog; ac_word=$2
15212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15213$as_echo_n "checking for $ac_word... " >&6; }
15214if ${ac_cv_path_NICE+:} false; then :
15215  $as_echo_n "(cached) " >&6
15216else
15217  case $NICE in
15218  [\\/]* | ?:[\\/]*)
15219  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15220  ;;
15221  *)
15222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15223for as_dir in $PATH
15224do
15225  IFS=$as_save_IFS
15226  test -z "$as_dir" && as_dir=.
15227    for ac_exec_ext in '' $ac_executable_extensions; do
15228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15229    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15231    break 2
15232  fi
15233done
15234  done
15235IFS=$as_save_IFS
15236
15237  ;;
15238esac
15239fi
15240NICE=$ac_cv_path_NICE
15241if test -n "$NICE"; then
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15243$as_echo "$NICE" >&6; }
15244else
15245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15246$as_echo "no" >&6; }
15247fi
15248
15249
15250  test -n "$NICE" && break
15251done
15252
15253    else
15254      # If it succeeded, then it was overridden by the user. We will use it
15255      # for the tool.
15256
15257      # First remove it from the list of overridden variables, so we can test
15258      # for unknown variables in the end.
15259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15260
15261      # Check if we try to supply an empty value
15262      if test "x$NICE" = x; then
15263        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15264$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15265        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15266$as_echo_n "checking for NICE... " >&6; }
15267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15268$as_echo "disabled" >&6; }
15269      else
15270        # Check if the provided tool contains a complete path.
15271        tool_specified="$NICE"
15272        tool_basename="${tool_specified##*/}"
15273        if test "x$tool_basename" = "x$tool_specified"; then
15274          # A command without a complete path is provided, search $PATH.
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15276$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15277          # Extract the first word of "$tool_basename", so it can be a program name with args.
15278set dummy $tool_basename; ac_word=$2
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15280$as_echo_n "checking for $ac_word... " >&6; }
15281if ${ac_cv_path_NICE+:} false; then :
15282  $as_echo_n "(cached) " >&6
15283else
15284  case $NICE in
15285  [\\/]* | ?:[\\/]*)
15286  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15287  ;;
15288  *)
15289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15290for as_dir in $PATH
15291do
15292  IFS=$as_save_IFS
15293  test -z "$as_dir" && as_dir=.
15294    for ac_exec_ext in '' $ac_executable_extensions; do
15295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15296    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15298    break 2
15299  fi
15300done
15301  done
15302IFS=$as_save_IFS
15303
15304  ;;
15305esac
15306fi
15307NICE=$ac_cv_path_NICE
15308if test -n "$NICE"; then
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15310$as_echo "$NICE" >&6; }
15311else
15312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15313$as_echo "no" >&6; }
15314fi
15315
15316
15317          if test "x$NICE" = x; then
15318            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15319          fi
15320        else
15321          # Otherwise we believe it is a complete path. Use it as it is.
15322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15323$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15324          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15325$as_echo_n "checking for NICE... " >&6; }
15326          if test ! -x "$tool_specified"; then
15327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15328$as_echo "not found" >&6; }
15329            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15330          fi
15331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15332$as_echo "$tool_specified" >&6; }
15333        fi
15334      fi
15335    fi
15336
15337  fi
15338
15339
15340
15341
15342  # Publish this variable in the help.
15343
15344
15345  if [ -z "${PANDOC+x}" ]; then
15346    # The variable is not set by user, try to locate tool using the code snippet
15347    for ac_prog in pandoc
15348do
15349  # Extract the first word of "$ac_prog", so it can be a program name with args.
15350set dummy $ac_prog; ac_word=$2
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15352$as_echo_n "checking for $ac_word... " >&6; }
15353if ${ac_cv_path_PANDOC+:} false; then :
15354  $as_echo_n "(cached) " >&6
15355else
15356  case $PANDOC in
15357  [\\/]* | ?:[\\/]*)
15358  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15359  ;;
15360  *)
15361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15362for as_dir in $PATH
15363do
15364  IFS=$as_save_IFS
15365  test -z "$as_dir" && as_dir=.
15366    for ac_exec_ext in '' $ac_executable_extensions; do
15367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15368    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15370    break 2
15371  fi
15372done
15373  done
15374IFS=$as_save_IFS
15375
15376  ;;
15377esac
15378fi
15379PANDOC=$ac_cv_path_PANDOC
15380if test -n "$PANDOC"; then
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15382$as_echo "$PANDOC" >&6; }
15383else
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15385$as_echo "no" >&6; }
15386fi
15387
15388
15389  test -n "$PANDOC" && break
15390done
15391
15392  else
15393    # The variable is set, but is it from the command line or the environment?
15394
15395    # Try to remove the string !PANDOC! from our list.
15396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15398      # If it failed, the variable was not from the command line. Ignore it,
15399      # but warn the user (except for BASH, which is always set by the calling BASH).
15400      if test "xPANDOC" != xBASH; then
15401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15402$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15403      fi
15404      # Try to locate tool using the code snippet
15405      for ac_prog in pandoc
15406do
15407  # Extract the first word of "$ac_prog", so it can be a program name with args.
15408set dummy $ac_prog; ac_word=$2
15409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15410$as_echo_n "checking for $ac_word... " >&6; }
15411if ${ac_cv_path_PANDOC+:} false; then :
15412  $as_echo_n "(cached) " >&6
15413else
15414  case $PANDOC in
15415  [\\/]* | ?:[\\/]*)
15416  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15417  ;;
15418  *)
15419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15420for as_dir in $PATH
15421do
15422  IFS=$as_save_IFS
15423  test -z "$as_dir" && as_dir=.
15424    for ac_exec_ext in '' $ac_executable_extensions; do
15425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15426    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15428    break 2
15429  fi
15430done
15431  done
15432IFS=$as_save_IFS
15433
15434  ;;
15435esac
15436fi
15437PANDOC=$ac_cv_path_PANDOC
15438if test -n "$PANDOC"; then
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15440$as_echo "$PANDOC" >&6; }
15441else
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15443$as_echo "no" >&6; }
15444fi
15445
15446
15447  test -n "$PANDOC" && break
15448done
15449
15450    else
15451      # If it succeeded, then it was overridden by the user. We will use it
15452      # for the tool.
15453
15454      # First remove it from the list of overridden variables, so we can test
15455      # for unknown variables in the end.
15456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15457
15458      # Check if we try to supply an empty value
15459      if test "x$PANDOC" = x; then
15460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15461$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15463$as_echo_n "checking for PANDOC... " >&6; }
15464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15465$as_echo "disabled" >&6; }
15466      else
15467        # Check if the provided tool contains a complete path.
15468        tool_specified="$PANDOC"
15469        tool_basename="${tool_specified##*/}"
15470        if test "x$tool_basename" = "x$tool_specified"; then
15471          # A command without a complete path is provided, search $PATH.
15472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15473$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15474          # Extract the first word of "$tool_basename", so it can be a program name with args.
15475set dummy $tool_basename; ac_word=$2
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15477$as_echo_n "checking for $ac_word... " >&6; }
15478if ${ac_cv_path_PANDOC+:} false; then :
15479  $as_echo_n "(cached) " >&6
15480else
15481  case $PANDOC in
15482  [\\/]* | ?:[\\/]*)
15483  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15484  ;;
15485  *)
15486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15487for as_dir in $PATH
15488do
15489  IFS=$as_save_IFS
15490  test -z "$as_dir" && as_dir=.
15491    for ac_exec_ext in '' $ac_executable_extensions; do
15492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15493    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15495    break 2
15496  fi
15497done
15498  done
15499IFS=$as_save_IFS
15500
15501  ;;
15502esac
15503fi
15504PANDOC=$ac_cv_path_PANDOC
15505if test -n "$PANDOC"; then
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15507$as_echo "$PANDOC" >&6; }
15508else
15509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15510$as_echo "no" >&6; }
15511fi
15512
15513
15514          if test "x$PANDOC" = x; then
15515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15516          fi
15517        else
15518          # Otherwise we believe it is a complete path. Use it as it is.
15519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15520$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15522$as_echo_n "checking for PANDOC... " >&6; }
15523          if test ! -x "$tool_specified"; then
15524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15525$as_echo "not found" >&6; }
15526            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15527          fi
15528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15529$as_echo "$tool_specified" >&6; }
15530        fi
15531      fi
15532    fi
15533
15534  fi
15535
15536
15537
15538
15539# Now we can determine OpenJDK build and target platforms. This is required to
15540# have early on.
15541# Make sure we can run config.sub.
15542$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15543  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15544
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15546$as_echo_n "checking build system type... " >&6; }
15547if ${ac_cv_build+:} false; then :
15548  $as_echo_n "(cached) " >&6
15549else
15550  ac_build_alias=$build_alias
15551test "x$ac_build_alias" = x &&
15552  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15553test "x$ac_build_alias" = x &&
15554  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15555ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15556  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15557
15558fi
15559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15560$as_echo "$ac_cv_build" >&6; }
15561case $ac_cv_build in
15562*-*-*) ;;
15563*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15564esac
15565build=$ac_cv_build
15566ac_save_IFS=$IFS; IFS='-'
15567set x $ac_cv_build
15568shift
15569build_cpu=$1
15570build_vendor=$2
15571shift; shift
15572# Remember, the first character of IFS is used to create $*,
15573# except with old shells:
15574build_os=$*
15575IFS=$ac_save_IFS
15576case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15577
15578
15579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15580$as_echo_n "checking host system type... " >&6; }
15581if ${ac_cv_host+:} false; then :
15582  $as_echo_n "(cached) " >&6
15583else
15584  if test "x$host_alias" = x; then
15585  ac_cv_host=$ac_cv_build
15586else
15587  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15588    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15589fi
15590
15591fi
15592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15593$as_echo "$ac_cv_host" >&6; }
15594case $ac_cv_host in
15595*-*-*) ;;
15596*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15597esac
15598host=$ac_cv_host
15599ac_save_IFS=$IFS; IFS='-'
15600set x $ac_cv_host
15601shift
15602host_cpu=$1
15603host_vendor=$2
15604shift; shift
15605# Remember, the first character of IFS is used to create $*,
15606# except with old shells:
15607host_os=$*
15608IFS=$ac_save_IFS
15609case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15610
15611
15612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15613$as_echo_n "checking target system type... " >&6; }
15614if ${ac_cv_target+:} false; then :
15615  $as_echo_n "(cached) " >&6
15616else
15617  if test "x$target_alias" = x; then
15618  ac_cv_target=$ac_cv_host
15619else
15620  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15621    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15622fi
15623
15624fi
15625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15626$as_echo "$ac_cv_target" >&6; }
15627case $ac_cv_target in
15628*-*-*) ;;
15629*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15630esac
15631target=$ac_cv_target
15632ac_save_IFS=$IFS; IFS='-'
15633set x $ac_cv_target
15634shift
15635target_cpu=$1
15636target_vendor=$2
15637shift; shift
15638# Remember, the first character of IFS is used to create $*,
15639# except with old shells:
15640target_os=$*
15641IFS=$ac_save_IFS
15642case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15643
15644
15645# The aliases save the names the user supplied, while $host etc.
15646# will get canonicalized.
15647test -n "$target_alias" &&
15648  test "$program_prefix$program_suffix$program_transform_name" = \
15649    NONENONEs,x,x, &&
15650  program_prefix=${target_alias}-
15651
15652  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15653  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15654  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15655  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15656  # to use the configure naming style.
15657
15658
15659
15660
15661
15662  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15663  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15664  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15665  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15666  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15667  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15668
15669
15670
15671  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15672
15673  case "$build_os" in
15674    *linux*)
15675      VAR_OS=linux
15676      VAR_OS_TYPE=unix
15677      ;;
15678    *solaris*)
15679      VAR_OS=solaris
15680      VAR_OS_TYPE=unix
15681      ;;
15682    *darwin*)
15683      VAR_OS=macosx
15684      VAR_OS_TYPE=unix
15685      ;;
15686    *bsd*)
15687      VAR_OS=bsd
15688      VAR_OS_TYPE=unix
15689      ;;
15690    *cygwin*)
15691      VAR_OS=windows
15692      VAR_OS_ENV=windows.cygwin
15693      ;;
15694    *mingw*)
15695      VAR_OS=windows
15696      VAR_OS_ENV=windows.msys
15697      ;;
15698    *aix*)
15699      VAR_OS=aix
15700      VAR_OS_TYPE=unix
15701      ;;
15702    *)
15703      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15704      ;;
15705  esac
15706
15707
15708  # First argument is the cpu name from the trip/quad
15709  case "$build_cpu" in
15710    x86_64)
15711      VAR_CPU=x86_64
15712      VAR_CPU_ARCH=x86
15713      VAR_CPU_BITS=64
15714      VAR_CPU_ENDIAN=little
15715      ;;
15716    i?86)
15717      VAR_CPU=x86
15718      VAR_CPU_ARCH=x86
15719      VAR_CPU_BITS=32
15720      VAR_CPU_ENDIAN=little
15721      ;;
15722    arm*)
15723      VAR_CPU=arm
15724      VAR_CPU_ARCH=arm
15725      VAR_CPU_BITS=32
15726      VAR_CPU_ENDIAN=little
15727      ;;
15728    aarch64)
15729      VAR_CPU=aarch64
15730      VAR_CPU_ARCH=aarch64
15731      VAR_CPU_BITS=64
15732      VAR_CPU_ENDIAN=little
15733      ;;
15734    powerpc)
15735      VAR_CPU=ppc
15736      VAR_CPU_ARCH=ppc
15737      VAR_CPU_BITS=32
15738      VAR_CPU_ENDIAN=big
15739      ;;
15740    powerpc64)
15741      VAR_CPU=ppc64
15742      VAR_CPU_ARCH=ppc
15743      VAR_CPU_BITS=64
15744      VAR_CPU_ENDIAN=big
15745      ;;
15746    powerpc64le)
15747      VAR_CPU=ppc64le
15748      VAR_CPU_ARCH=ppc
15749      VAR_CPU_BITS=64
15750      VAR_CPU_ENDIAN=little
15751      ;;
15752    s390)
15753      VAR_CPU=s390
15754      VAR_CPU_ARCH=s390
15755      VAR_CPU_BITS=32
15756      VAR_CPU_ENDIAN=big
15757      ;;
15758    s390x)
15759      VAR_CPU=s390x
15760      VAR_CPU_ARCH=s390
15761      VAR_CPU_BITS=64
15762      VAR_CPU_ENDIAN=big
15763      ;;
15764    sparc)
15765      VAR_CPU=sparc
15766      VAR_CPU_ARCH=sparc
15767      VAR_CPU_BITS=32
15768      VAR_CPU_ENDIAN=big
15769      ;;
15770    sparcv9|sparc64)
15771      VAR_CPU=sparcv9
15772      VAR_CPU_ARCH=sparc
15773      VAR_CPU_BITS=64
15774      VAR_CPU_ENDIAN=big
15775      ;;
15776    *)
15777      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15778      ;;
15779  esac
15780
15781  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15782  OPENJDK_BUILD_OS="$VAR_OS"
15783  if test "x$VAR_OS_TYPE" != x; then
15784    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15785  else
15786    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15787  fi
15788  if test "x$VAR_OS_ENV" != x; then
15789    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15790  else
15791    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15792  fi
15793  OPENJDK_BUILD_CPU="$VAR_CPU"
15794  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15795  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15796  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15797
15798
15799
15800
15801
15802
15803
15804
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15806$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15808$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15809
15810  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15811
15812  case "$host_os" in
15813    *linux*)
15814      VAR_OS=linux
15815      VAR_OS_TYPE=unix
15816      ;;
15817    *solaris*)
15818      VAR_OS=solaris
15819      VAR_OS_TYPE=unix
15820      ;;
15821    *darwin*)
15822      VAR_OS=macosx
15823      VAR_OS_TYPE=unix
15824      ;;
15825    *bsd*)
15826      VAR_OS=bsd
15827      VAR_OS_TYPE=unix
15828      ;;
15829    *cygwin*)
15830      VAR_OS=windows
15831      VAR_OS_ENV=windows.cygwin
15832      ;;
15833    *mingw*)
15834      VAR_OS=windows
15835      VAR_OS_ENV=windows.msys
15836      ;;
15837    *aix*)
15838      VAR_OS=aix
15839      VAR_OS_TYPE=unix
15840      ;;
15841    *)
15842      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15843      ;;
15844  esac
15845
15846
15847  # First argument is the cpu name from the trip/quad
15848  case "$host_cpu" in
15849    x86_64)
15850      VAR_CPU=x86_64
15851      VAR_CPU_ARCH=x86
15852      VAR_CPU_BITS=64
15853      VAR_CPU_ENDIAN=little
15854      ;;
15855    i?86)
15856      VAR_CPU=x86
15857      VAR_CPU_ARCH=x86
15858      VAR_CPU_BITS=32
15859      VAR_CPU_ENDIAN=little
15860      ;;
15861    arm*)
15862      VAR_CPU=arm
15863      VAR_CPU_ARCH=arm
15864      VAR_CPU_BITS=32
15865      VAR_CPU_ENDIAN=little
15866      ;;
15867    aarch64)
15868      VAR_CPU=aarch64
15869      VAR_CPU_ARCH=aarch64
15870      VAR_CPU_BITS=64
15871      VAR_CPU_ENDIAN=little
15872      ;;
15873    powerpc)
15874      VAR_CPU=ppc
15875      VAR_CPU_ARCH=ppc
15876      VAR_CPU_BITS=32
15877      VAR_CPU_ENDIAN=big
15878      ;;
15879    powerpc64)
15880      VAR_CPU=ppc64
15881      VAR_CPU_ARCH=ppc
15882      VAR_CPU_BITS=64
15883      VAR_CPU_ENDIAN=big
15884      ;;
15885    powerpc64le)
15886      VAR_CPU=ppc64le
15887      VAR_CPU_ARCH=ppc
15888      VAR_CPU_BITS=64
15889      VAR_CPU_ENDIAN=little
15890      ;;
15891    s390)
15892      VAR_CPU=s390
15893      VAR_CPU_ARCH=s390
15894      VAR_CPU_BITS=32
15895      VAR_CPU_ENDIAN=big
15896      ;;
15897    s390x)
15898      VAR_CPU=s390x
15899      VAR_CPU_ARCH=s390
15900      VAR_CPU_BITS=64
15901      VAR_CPU_ENDIAN=big
15902      ;;
15903    sparc)
15904      VAR_CPU=sparc
15905      VAR_CPU_ARCH=sparc
15906      VAR_CPU_BITS=32
15907      VAR_CPU_ENDIAN=big
15908      ;;
15909    sparcv9|sparc64)
15910      VAR_CPU=sparcv9
15911      VAR_CPU_ARCH=sparc
15912      VAR_CPU_BITS=64
15913      VAR_CPU_ENDIAN=big
15914      ;;
15915    *)
15916      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15917      ;;
15918  esac
15919
15920  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15921  OPENJDK_TARGET_OS="$VAR_OS"
15922  if test "x$VAR_OS_TYPE" != x; then
15923    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15924  else
15925    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15926  fi
15927  if test "x$VAR_OS_ENV" != x; then
15928    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15929  else
15930    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15931  fi
15932  OPENJDK_TARGET_CPU="$VAR_CPU"
15933  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15934  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15935  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15936
15937
15938
15939
15940
15941
15942
15943
15944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15945$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15947$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15948
15949
15950
15951# Check whether --with-target-bits was given.
15952if test "${with_target_bits+set}" = set; then :
15953  withval=$with_target_bits;
15954fi
15955
15956
15957  # We have three types of compiles:
15958  # native  == normal compilation, target system == build system
15959  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15960  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15961  #
15962  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15963    # We're doing a proper cross-compilation
15964    COMPILE_TYPE="cross"
15965  else
15966    COMPILE_TYPE="native"
15967  fi
15968
15969  if test "x$with_target_bits" != x; then
15970    if test "x$COMPILE_TYPE" = "xcross"; then
15971      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15972    fi
15973
15974    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15975      # A reduced build is requested
15976      COMPILE_TYPE="reduced"
15977      OPENJDK_TARGET_CPU_BITS=32
15978      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15979        OPENJDK_TARGET_CPU=x86
15980      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15981        OPENJDK_TARGET_CPU=sparc
15982      else
15983        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15984      fi
15985    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15986      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
15987    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15988      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15989$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15990    else
15991      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15992    fi
15993  fi
15994
15995
15996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15997$as_echo_n "checking compilation type... " >&6; }
15998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15999$as_echo "$COMPILE_TYPE" >&6; }
16000
16001
16002  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16003    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16004  else
16005    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16006  fi
16007
16008  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16009    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16010  else
16011    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16012  fi
16013
16014  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16015
16016
16017
16018  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16019    RELEASE_FILE_OS_NAME=SunOS
16020  fi
16021  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16022    RELEASE_FILE_OS_NAME=Linux
16023  fi
16024  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16025    RELEASE_FILE_OS_NAME=Windows
16026  fi
16027  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16028    RELEASE_FILE_OS_NAME="Darwin"
16029  fi
16030  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16031    RELEASE_FILE_OS_NAME="AIX"
16032  fi
16033  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16034
16035
16036
16037
16038
16039
16040  # Also store the legacy naming of the cpu.
16041  # Ie i586 and amd64 instead of x86 and x86_64
16042  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16043  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16044    OPENJDK_TARGET_CPU_LEGACY="i586"
16045  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16046    # On all platforms except MacOSX replace x86_64 with amd64.
16047    OPENJDK_TARGET_CPU_LEGACY="amd64"
16048  fi
16049
16050
16051  # And the second legacy naming of the cpu.
16052  # Ie i386 and amd64 instead of x86 and x86_64.
16053  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16054  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16055    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16056  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16057    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16058  fi
16059
16060
16061  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16062  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16063  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16064  OPENJDK_TARGET_CPU_ISADIR=""
16065  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16066    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16067      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16068    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16069      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16070    fi
16071  fi
16072
16073
16074  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16075  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16076  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16077    # On linux only, we replace x86 with i386.
16078    OPENJDK_TARGET_CPU_OSARCH="i386"
16079  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16080    # On all platforms except macosx, we replace x86_64 with amd64.
16081    OPENJDK_TARGET_CPU_OSARCH="amd64"
16082  fi
16083
16084
16085  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16086  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16087    OPENJDK_TARGET_CPU_JLI="i386"
16088  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16089    # On all platforms except macosx, we replace x86_64 with amd64.
16090    OPENJDK_TARGET_CPU_JLI="amd64"
16091  fi
16092
16093  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16094      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16095  else
16096      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16097  fi
16098
16099
16100  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16101  # Macosx is osx and x86_64 is x64
16102  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16103    OPENJDK_TARGET_OS_BUNDLE="osx"
16104  else
16105    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16106  fi
16107  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16108    OPENJDK_TARGET_CPU_BUNDLE="x64"
16109  else
16110    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16111  fi
16112  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16113
16114
16115  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16116    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16117    # unpack200.exe. This variable is used in
16118    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16119    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16120      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16121    fi
16122  fi
16123
16124  if test "x$COMPILE_TYPE" = "xcross"; then
16125    # FIXME: ... or should this include reduced builds..?
16126    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16127  else
16128    DEFINE_CROSS_COMPILE_ARCH=""
16129  fi
16130
16131
16132  # Convert openjdk platform names to hotspot names
16133
16134  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16135  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16136    HOTSPOT_TARGET_OS=bsd
16137  fi
16138
16139
16140  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16141  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16142    HOTSPOT_TARGET_OS_TYPE=posix
16143  fi
16144
16145
16146  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16147  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16148    HOTSPOT_TARGET_CPU=x86_32
16149  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16150    HOTSPOT_TARGET_CPU=sparc
16151  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16152    HOTSPOT_TARGET_CPU=ppc_64
16153  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16154    HOTSPOT_TARGET_CPU=ppc_64
16155  fi
16156
16157
16158  # This is identical with OPENJDK_*, but define anyway for consistency.
16159  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16160
16161
16162  # Setup HOTSPOT_TARGET_CPU_DEFINE
16163  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16164    HOTSPOT_TARGET_CPU_DEFINE=IA32
16165  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16166    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16167  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16168    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16169  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16170    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16171  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16172    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16173  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16174    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16175
16176  # The cpu defines below are for zero, we don't support them directly.
16177  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16178    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16179  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16180    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16181  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16182    HOTSPOT_TARGET_CPU_DEFINE=S390
16183  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16184    HOTSPOT_TARGET_CPU_DEFINE=S390
16185  elif test "x$OPENJDK_TARGET_CPU" != x; then
16186    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16187  fi
16188
16189
16190
16191
16192  # Also store the legacy naming of the cpu.
16193  # Ie i586 and amd64 instead of x86 and x86_64
16194  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16195  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16196    OPENJDK_BUILD_CPU_LEGACY="i586"
16197  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16198    # On all platforms except MacOSX replace x86_64 with amd64.
16199    OPENJDK_BUILD_CPU_LEGACY="amd64"
16200  fi
16201
16202
16203  # And the second legacy naming of the cpu.
16204  # Ie i386 and amd64 instead of x86 and x86_64.
16205  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16206  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16207    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16208  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16209    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16210  fi
16211
16212
16213  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16214  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16215  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16216  OPENJDK_BUILD_CPU_ISADIR=""
16217  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16218    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16219      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16220    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16221      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16222    fi
16223  fi
16224
16225
16226  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16227  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16228  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16229    # On linux only, we replace x86 with i386.
16230    OPENJDK_BUILD_CPU_OSARCH="i386"
16231  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16232    # On all platforms except macosx, we replace x86_64 with amd64.
16233    OPENJDK_BUILD_CPU_OSARCH="amd64"
16234  fi
16235
16236
16237  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16238  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16239    OPENJDK_BUILD_CPU_JLI="i386"
16240  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16241    # On all platforms except macosx, we replace x86_64 with amd64.
16242    OPENJDK_BUILD_CPU_JLI="amd64"
16243  fi
16244
16245  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16246      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16247  else
16248      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16249  fi
16250
16251
16252  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16253  # Macosx is osx and x86_64 is x64
16254  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16255    OPENJDK_BUILD_OS_BUNDLE="osx"
16256  else
16257    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16258  fi
16259  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16260    OPENJDK_BUILD_CPU_BUNDLE="x64"
16261  else
16262    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16263  fi
16264  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16265
16266
16267  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16268    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16269    # unpack200.exe. This variable is used in
16270    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16271    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16272      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16273    fi
16274  fi
16275
16276  if test "x$COMPILE_TYPE" = "xcross"; then
16277    # FIXME: ... or should this include reduced builds..?
16278    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16279  else
16280    DEFINE_CROSS_COMPILE_ARCH=""
16281  fi
16282
16283
16284  # Convert openjdk platform names to hotspot names
16285
16286  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16287  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16288    HOTSPOT_BUILD_OS=bsd
16289  fi
16290
16291
16292  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16293  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16294    HOTSPOT_BUILD_OS_TYPE=posix
16295  fi
16296
16297
16298  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16299  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16300    HOTSPOT_BUILD_CPU=x86_32
16301  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16302    HOTSPOT_BUILD_CPU=sparc
16303  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16304    HOTSPOT_BUILD_CPU=ppc_64
16305  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16306    HOTSPOT_BUILD_CPU=ppc_64
16307  fi
16308
16309
16310  # This is identical with OPENJDK_*, but define anyway for consistency.
16311  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16312
16313
16314  # Setup HOTSPOT_BUILD_CPU_DEFINE
16315  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16316    HOTSPOT_BUILD_CPU_DEFINE=IA32
16317  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16318    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16319  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16320    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16321  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16322    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16323  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16324    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16325  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16326    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16327
16328  # The cpu defines below are for zero, we don't support them directly.
16329  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16330    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16331  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16332    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16333  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16334    HOTSPOT_BUILD_CPU_DEFINE=S390
16335  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16336    HOTSPOT_BUILD_CPU_DEFINE=S390
16337  elif test "x$OPENJDK_BUILD_CPU" != x; then
16338    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16339  fi
16340
16341
16342
16343
16344
16345
16346# Continue setting up basic stuff. Most remaining code require fundamental tools.
16347
16348  # Save the current directory this script was started from
16349  CURDIR="$PWD"
16350
16351  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16352  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16353  # was not available at that time.
16354  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16355  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16356    ORIGINAL_PATH="$REWRITTEN_PATH"
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16358$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16359  fi
16360
16361  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16362    PATH_SEP=";"
16363
16364  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16365  if test $SRC_ROOT_LENGTH -gt 100; then
16366    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16367  fi
16368
16369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16371$as_echo_n "checking cygwin release... " >&6; }
16372    CYGWIN_VERSION=`$UNAME -r`
16373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16374$as_echo "$CYGWIN_VERSION" >&6; }
16375    WINDOWS_ENV_VENDOR='cygwin'
16376    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16377
16378    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16379    if test "x$CYGWIN_VERSION_OLD" != x; then
16380      { $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
16381$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;}
16382      as_fn_error $? "Cannot continue" "$LINENO" 5
16383    fi
16384    if test "x$CYGPATH" = x; then
16385      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16386    fi
16387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16388$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16389    # The cmd output ends with Windows line endings (CR/LF)
16390    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16391    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16392    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16394$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16395    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16396    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16397    if test "x$test_cygdrive_prefix" = x; then
16398      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16399    fi
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16402$as_echo_n "checking msys release... " >&6; }
16403    MSYS_VERSION=`$UNAME -r`
16404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16405$as_echo "$MSYS_VERSION" >&6; }
16406
16407    WINDOWS_ENV_VENDOR='msys'
16408    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16409
16410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16411$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16412    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16413    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16414
16415  windows_path="$MSYS_ROOT_PATH"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    MSYS_ROOT_PATH="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    MSYS_ROOT_PATH="$unix_path"
16422  fi
16423
16424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16425$as_echo "$MSYS_ROOT_PATH" >&6; }
16426    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16427  else
16428    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16429  fi
16430
16431  # Test if windows or unix (cygwin/msys) find is first in path.
16432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16433$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16434  FIND_BINARY_OUTPUT=`find --version 2>&1`
16435  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16437$as_echo "unix style" >&6; }
16438  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16440$as_echo "Windows" >&6; }
16441    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16442$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16443    { $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
16444$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16445    as_fn_error $? "Cannot continue" "$LINENO" 5
16446  else
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16448$as_echo "unknown" >&6; }
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16450$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16451  fi
16452
16453  else
16454    PATH_SEP=":"
16455  fi
16456
16457
16458  # We get the top-level directory from the supporting wrappers.
16459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16460$as_echo_n "checking for top-level directory... " >&6; }
16461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16462$as_echo "$TOPDIR" >&6; }
16463
16464
16465  # Save the original version of TOPDIR for string comparisons
16466  ORIGINAL_TOPDIR="$TOPDIR"
16467
16468
16469  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16470
16471  # Only process if variable expands to non-empty
16472
16473  if test "x$CURDIR" != x; then
16474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16475
16476  # Input might be given as Windows format, start by converting to
16477  # unix format.
16478  path="$CURDIR"
16479  new_path=`$CYGPATH -u "$path"`
16480
16481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16484  # "foo.exe" is OK but "foo" is an error.
16485  #
16486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16487  # It is also a way to make sure we got the proper file name for the real test later on.
16488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16489  if test "x$test_shortpath" = x; then
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16491$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16492    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16493  fi
16494
16495  # Call helper function which possibly converts this using DOS-style short mode.
16496  # If so, the updated path is stored in $new_path.
16497
16498  input_path="$new_path"
16499  # Check if we need to convert this using DOS-style short mode. If the path
16500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16501  # take no chances and rewrite it.
16502  # Note: m4 eats our [], so we need to use [ and ] instead.
16503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16504  if test "x$has_forbidden_chars" != x; then
16505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16509      # Going to short mode and back again did indeed matter. Since short mode is
16510      # case insensitive, let's make it lowercase to improve readability.
16511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16512      # Now convert it back to Unix-style (cygpath)
16513      input_path=`$CYGPATH -u "$shortmode_path"`
16514      new_path="$input_path"
16515    fi
16516  fi
16517
16518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16519  if test "x$test_cygdrive_prefix" = x; then
16520    # As a simple fix, exclude /usr/bin since it's not a real path.
16521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16523      # a path prefixed by /cygdrive for fixpath to work.
16524      new_path="$CYGWIN_ROOT_PATH$input_path"
16525    fi
16526  fi
16527
16528
16529  if test "x$path" != "x$new_path"; then
16530    CURDIR="$new_path"
16531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16532$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16533  fi
16534
16535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16536
16537  path="$CURDIR"
16538  has_colon=`$ECHO $path | $GREP ^.:`
16539  new_path="$path"
16540  if test "x$has_colon" = x; then
16541    # Not in mixed or Windows style, start by that.
16542    new_path=`cmd //c echo $path`
16543  fi
16544
16545
16546  input_path="$new_path"
16547  # Check if we need to convert this using DOS-style short mode. If the path
16548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16549  # take no chances and rewrite it.
16550  # Note: m4 eats our [], so we need to use [ and ] instead.
16551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16552  if test "x$has_forbidden_chars" != x; then
16553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16555  fi
16556
16557
16558  windows_path="$new_path"
16559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16560    unix_path=`$CYGPATH -u "$windows_path"`
16561    new_path="$unix_path"
16562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16564    new_path="$unix_path"
16565  fi
16566
16567  if test "x$path" != "x$new_path"; then
16568    CURDIR="$new_path"
16569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16570$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16571  fi
16572
16573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16575
16576    else
16577      # We're on a unix platform. Hooray! :)
16578      path="$CURDIR"
16579      has_space=`$ECHO "$path" | $GREP " "`
16580      if test "x$has_space" != x; then
16581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16582$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16584      fi
16585
16586      # Use eval to expand a potential ~
16587      eval path="$path"
16588      if test ! -f "$path" && test ! -d "$path"; then
16589        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16590      fi
16591
16592      if test -d "$path"; then
16593        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16594      else
16595        dir="`$DIRNAME "$path"`"
16596        base="`$BASENAME "$path"`"
16597        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16598      fi
16599    fi
16600  fi
16601
16602
16603  # Only process if variable expands to non-empty
16604
16605  if test "x$TOPDIR" != x; then
16606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607
16608  # Input might be given as Windows format, start by converting to
16609  # unix format.
16610  path="$TOPDIR"
16611  new_path=`$CYGPATH -u "$path"`
16612
16613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16616  # "foo.exe" is OK but "foo" is an error.
16617  #
16618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16619  # It is also a way to make sure we got the proper file name for the real test later on.
16620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16621  if test "x$test_shortpath" = x; then
16622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16623$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16624    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16625  fi
16626
16627  # Call helper function which possibly converts this using DOS-style short mode.
16628  # If so, the updated path is stored in $new_path.
16629
16630  input_path="$new_path"
16631  # Check if we need to convert this using DOS-style short mode. If the path
16632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16633  # take no chances and rewrite it.
16634  # Note: m4 eats our [], so we need to use [ and ] instead.
16635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16636  if test "x$has_forbidden_chars" != x; then
16637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16641      # Going to short mode and back again did indeed matter. Since short mode is
16642      # case insensitive, let's make it lowercase to improve readability.
16643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16644      # Now convert it back to Unix-style (cygpath)
16645      input_path=`$CYGPATH -u "$shortmode_path"`
16646      new_path="$input_path"
16647    fi
16648  fi
16649
16650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16651  if test "x$test_cygdrive_prefix" = x; then
16652    # As a simple fix, exclude /usr/bin since it's not a real path.
16653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16655      # a path prefixed by /cygdrive for fixpath to work.
16656      new_path="$CYGWIN_ROOT_PATH$input_path"
16657    fi
16658  fi
16659
16660
16661  if test "x$path" != "x$new_path"; then
16662    TOPDIR="$new_path"
16663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16664$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16665  fi
16666
16667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16668
16669  path="$TOPDIR"
16670  has_colon=`$ECHO $path | $GREP ^.:`
16671  new_path="$path"
16672  if test "x$has_colon" = x; then
16673    # Not in mixed or Windows style, start by that.
16674    new_path=`cmd //c echo $path`
16675  fi
16676
16677
16678  input_path="$new_path"
16679  # Check if we need to convert this using DOS-style short mode. If the path
16680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16681  # take no chances and rewrite it.
16682  # Note: m4 eats our [], so we need to use [ and ] instead.
16683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16684  if test "x$has_forbidden_chars" != x; then
16685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16687  fi
16688
16689
16690  windows_path="$new_path"
16691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16692    unix_path=`$CYGPATH -u "$windows_path"`
16693    new_path="$unix_path"
16694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16696    new_path="$unix_path"
16697  fi
16698
16699  if test "x$path" != "x$new_path"; then
16700    TOPDIR="$new_path"
16701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16702$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16703  fi
16704
16705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16707
16708    else
16709      # We're on a unix platform. Hooray! :)
16710      path="$TOPDIR"
16711      has_space=`$ECHO "$path" | $GREP " "`
16712      if test "x$has_space" != x; then
16713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16714$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16716      fi
16717
16718      # Use eval to expand a potential ~
16719      eval path="$path"
16720      if test ! -f "$path" && test ! -d "$path"; then
16721        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16722      fi
16723
16724      if test -d "$path"; then
16725        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16726      else
16727        dir="`$DIRNAME "$path"`"
16728        base="`$BASENAME "$path"`"
16729        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16730      fi
16731    fi
16732  fi
16733
16734  # SRC_ROOT is a traditional alias for TOPDIR.
16735  SRC_ROOT=$TOPDIR
16736
16737  # Calculate a canonical version of TOPDIR for string comparisons
16738  CANONICAL_TOPDIR=$TOPDIR
16739
16740  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16741    # Follow a chain of symbolic links. Use readlink
16742    # where it exists, else fall back to horribly
16743    # complicated shell code.
16744    if test "x$READLINK_TESTED" != yes; then
16745      # On MacOSX there is a readlink tool with a different
16746      # purpose than the GNU readlink tool. Check the found readlink.
16747      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16748      if test "x$ISGNU" = x; then
16749        # A readlink that we do not know how to use.
16750        # Are there other non-GNU readlinks out there?
16751        READLINK_TESTED=yes
16752        READLINK=
16753      fi
16754    fi
16755
16756    if test "x$READLINK" != x; then
16757      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16758    else
16759      # Save the current directory for restoring afterwards
16760      STARTDIR=$PWD
16761      COUNTER=0
16762      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16763      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16764      cd $sym_link_dir
16765      # Use -P flag to resolve symlinks in directories.
16766      cd `$THEPWDCMD -P`
16767      sym_link_dir=`$THEPWDCMD -P`
16768      # Resolve file symlinks
16769      while test $COUNTER -lt 20; do
16770        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16771        if test "x$ISLINK" == x; then
16772          # This is not a symbolic link! We are done!
16773          break
16774        fi
16775        # Again resolve directory symlinks since the target of the just found
16776        # link could be in a different directory
16777        cd `$DIRNAME $ISLINK`
16778        sym_link_dir=`$THEPWDCMD -P`
16779        sym_link_file=`$BASENAME $ISLINK`
16780        let COUNTER=COUNTER+1
16781      done
16782      cd $STARTDIR
16783      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16784    fi
16785  fi
16786
16787
16788
16789  # Locate the directory of this script.
16790  AUTOCONF_DIR=$TOPDIR/common/autoconf
16791
16792  # Setup username (for use in adhoc version strings etc)
16793  # Outer [ ] to quote m4.
16794   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16795
16796
16797
16798# Check if it's a pure open build or if custom sources are to be used.
16799
16800  # Check whether --enable-openjdk-only was given.
16801if test "${enable_openjdk_only+set}" = set; then :
16802  enableval=$enable_openjdk_only;
16803else
16804  enable_openjdk_only="no"
16805fi
16806
16807
16808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16809$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16811$as_echo "$enable_openjdk_only" >&6; }
16812  if test "x$enable_openjdk_only" = "xyes"; then
16813    SUPPRESS_CUSTOM_EXTENSIONS="true"
16814  elif test "x$enable_openjdk_only" = "xno"; then
16815    SUPPRESS_CUSTOM_EXTENSIONS="false"
16816  else
16817    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16818  fi
16819
16820  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16821  # the IncludeCustomExtension macro.
16822
16823
16824# Check whether --with-custom-make-dir was given.
16825if test "${with_custom_make_dir+set}" = set; then :
16826  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
16827$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16828fi
16829
16830
16831
16832
16833# These are needed to be able to create a configuration name (and thus the output directory)
16834
16835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16836$as_echo_n "checking which variant of the JDK to build... " >&6; }
16837
16838# Check whether --with-jdk-variant was given.
16839if test "${with_jdk_variant+set}" = set; then :
16840  withval=$with_jdk_variant;
16841fi
16842
16843
16844  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16845    JDK_VARIANT="normal"
16846  else
16847    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16848  fi
16849
16850
16851
16852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16853$as_echo "$JDK_VARIANT" >&6; }
16854
16855
16856  DEBUG_LEVEL="release"
16857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16858$as_echo_n "checking which debug level to use... " >&6; }
16859  # Check whether --enable-debug was given.
16860if test "${enable_debug+set}" = set; then :
16861  enableval=$enable_debug;
16862        ENABLE_DEBUG="${enableval}"
16863        DEBUG_LEVEL="fastdebug"
16864
16865else
16866  ENABLE_DEBUG="no"
16867fi
16868
16869
16870
16871# Check whether --with-debug-level was given.
16872if test "${with_debug_level+set}" = set; then :
16873  withval=$with_debug_level;
16874        DEBUG_LEVEL="${withval}"
16875        if test "x$ENABLE_DEBUG" = xyes; then
16876          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16877        fi
16878
16879fi
16880
16881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16882$as_echo "$DEBUG_LEVEL" >&6; }
16883
16884  if test "x$DEBUG_LEVEL" != xrelease && \
16885      test "x$DEBUG_LEVEL" != xoptimized && \
16886      test "x$DEBUG_LEVEL" != xfastdebug && \
16887      test "x$DEBUG_LEVEL" != xslowdebug; then
16888    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16889  fi
16890
16891  # Translate DEBUG_LEVEL to debug level used by Hotspot
16892  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16893  if test "x$DEBUG_LEVEL" = xrelease; then
16894    HOTSPOT_DEBUG_LEVEL="product"
16895  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16896    HOTSPOT_DEBUG_LEVEL="debug"
16897  fi
16898
16899  if test "x$DEBUG_LEVEL" = xoptimized; then
16900    # The debug level 'optimized' is a little special because it is currently only
16901    # applicable to the HotSpot build where it means to build a completely
16902    # optimized version of the VM without any debugging code (like for the
16903    # 'release' debug level which is called 'product' in the HotSpot build) but
16904    # with the exception that it can contain additional code which is otherwise
16905    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16906    # test new and/or experimental features which are not intended for customer
16907    # shipment. Because these new features need to be tested and benchmarked in
16908    # real world scenarios, we want to build the containing JDK at the 'release'
16909    # debug level.
16910    DEBUG_LEVEL="release"
16911  fi
16912
16913
16914
16915
16916
16917
16918# Check whether --with-jvm-variants was given.
16919if test "${with_jvm_variants+set}" = set; then :
16920  withval=$with_jvm_variants;
16921fi
16922
16923
16924
16925
16926# Check whether --with-cpu-port was given.
16927if test "${with_cpu_port+set}" = set; then :
16928  withval=$with_cpu_port;
16929fi
16930
16931
16932  if test "x$with_cpu_port" != x; then
16933    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16934      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16935    fi
16936    if test "x$with_cpu_port" != xarm64 && \
16937        test "x$with_cpu_port" != xaarch64; then
16938      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16939    fi
16940    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16941  fi
16942
16943
16944  if test "x$with_jvm_variants" = x; then
16945    with_jvm_variants="server"
16946  fi
16947  JVM_VARIANTS_OPT="$with_jvm_variants"
16948
16949  # Has the user listed more than one variant?
16950  # Additional [] needed to keep m4 from mangling shell constructs.
16951  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16952    BUILDING_MULTIPLE_JVM_VARIANTS=true
16953  else
16954    BUILDING_MULTIPLE_JVM_VARIANTS=false
16955  fi
16956  # Replace the commas with AND for use in the build directory name.
16957  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16958
16959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16960$as_echo_n "checking which variants of the JVM to build... " >&6; }
16961  # JVM_VARIANTS is a space-separated list.
16962  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16963  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16965$as_echo "$JVM_VARIANTS" >&6; }
16966
16967  # Check that the selected variants are valid
16968
16969  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16970  # Notice that the original variant failes on SLES 10 and 11
16971  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16972  STACK=${JVM_VARIANTS// /$'\n'}
16973  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16974  if test "x$INVALID_VARIANTS" != x; then
16975    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16976$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16977    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16978  fi
16979
16980  # All "special" variants share the same output directory ("server")
16981  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16982  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16983  STACK=${JVM_VARIANTS// /$'\n'}
16984  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16985  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16986    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16987  fi
16988
16989  # The "main" variant is the one used by other libs to link against during the
16990  # build.
16991  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16992    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16993    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16994      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16995        JVM_VARIANT_MAIN="$variant"
16996        break
16997      fi
16998    done
16999  else
17000    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17001  fi
17002
17003
17004
17005
17006
17007  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17008    # zero behaves as a platform and rewrites these values. This is really weird. :(
17009    # We are guaranteed that we do not build any other variants when building zero.
17010    HOTSPOT_TARGET_CPU=zero
17011    HOTSPOT_TARGET_CPU_ARCH=zero
17012  fi
17013
17014
17015# With basic setup done, call the custom early hook.
17016
17017
17018# Check if we have devkits, extra paths or sysroot set.
17019
17020
17021# Check whether --with-devkit was given.
17022if test "${with_devkit+set}" = set; then :
17023  withval=$with_devkit;
17024
17025  # Only process if variable expands to non-empty
17026
17027  if test "x$with_devkit" != x; then
17028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029
17030  # Input might be given as Windows format, start by converting to
17031  # unix format.
17032  path="$with_devkit"
17033  new_path=`$CYGPATH -u "$path"`
17034
17035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17038  # "foo.exe" is OK but "foo" is an error.
17039  #
17040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17041  # It is also a way to make sure we got the proper file name for the real test later on.
17042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17043  if test "x$test_shortpath" = x; then
17044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17045$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17046    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17047  fi
17048
17049  # Call helper function which possibly converts this using DOS-style short mode.
17050  # If so, the updated path is stored in $new_path.
17051
17052  input_path="$new_path"
17053  # Check if we need to convert this using DOS-style short mode. If the path
17054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17055  # take no chances and rewrite it.
17056  # Note: m4 eats our [], so we need to use [ and ] instead.
17057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17058  if test "x$has_forbidden_chars" != x; then
17059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17063      # Going to short mode and back again did indeed matter. Since short mode is
17064      # case insensitive, let's make it lowercase to improve readability.
17065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17066      # Now convert it back to Unix-style (cygpath)
17067      input_path=`$CYGPATH -u "$shortmode_path"`
17068      new_path="$input_path"
17069    fi
17070  fi
17071
17072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17073  if test "x$test_cygdrive_prefix" = x; then
17074    # As a simple fix, exclude /usr/bin since it's not a real path.
17075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17077      # a path prefixed by /cygdrive for fixpath to work.
17078      new_path="$CYGWIN_ROOT_PATH$input_path"
17079    fi
17080  fi
17081
17082
17083  if test "x$path" != "x$new_path"; then
17084    with_devkit="$new_path"
17085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17086$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17087  fi
17088
17089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17090
17091  path="$with_devkit"
17092  has_colon=`$ECHO $path | $GREP ^.:`
17093  new_path="$path"
17094  if test "x$has_colon" = x; then
17095    # Not in mixed or Windows style, start by that.
17096    new_path=`cmd //c echo $path`
17097  fi
17098
17099
17100  input_path="$new_path"
17101  # Check if we need to convert this using DOS-style short mode. If the path
17102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17103  # take no chances and rewrite it.
17104  # Note: m4 eats our [], so we need to use [ and ] instead.
17105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17106  if test "x$has_forbidden_chars" != x; then
17107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17109  fi
17110
17111
17112  windows_path="$new_path"
17113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114    unix_path=`$CYGPATH -u "$windows_path"`
17115    new_path="$unix_path"
17116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118    new_path="$unix_path"
17119  fi
17120
17121  if test "x$path" != "x$new_path"; then
17122    with_devkit="$new_path"
17123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17124$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17125  fi
17126
17127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17129
17130    else
17131      # We're on a unix platform. Hooray! :)
17132      path="$with_devkit"
17133      has_space=`$ECHO "$path" | $GREP " "`
17134      if test "x$has_space" != x; then
17135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17136$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17138      fi
17139
17140      # Use eval to expand a potential ~
17141      eval path="$path"
17142      if test ! -f "$path" && test ! -d "$path"; then
17143        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17144      fi
17145
17146      if test -d "$path"; then
17147        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17148      else
17149        dir="`$DIRNAME "$path"`"
17150        base="`$BASENAME "$path"`"
17151        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17152      fi
17153    fi
17154  fi
17155
17156        DEVKIT_ROOT="$with_devkit"
17157        # Check for a meta data info file in the root of the devkit
17158        if test -f "$DEVKIT_ROOT/devkit.info"; then
17159          . $DEVKIT_ROOT/devkit.info
17160          # This potentially sets the following:
17161          # A descriptive name of the devkit
17162
17163  if test "x$DEVKIT_NAME" = x; then
17164    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17165  fi
17166
17167          # Corresponds to --with-extra-path
17168
17169  if test "x$DEVKIT_EXTRA_PATH" = x; then
17170    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17171  fi
17172
17173          # Corresponds to --with-toolchain-path
17174
17175  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17176    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17177  fi
17178
17179          # Corresponds to --with-sysroot
17180
17181  if test "x$DEVKIT_SYSROOT" = x; then
17182    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17183  fi
17184
17185
17186          # Identifies the Visual Studio version in the devkit
17187
17188  if test "x$DEVKIT_VS_VERSION" = x; then
17189    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17190  fi
17191
17192          # The Visual Studio include environment variable
17193
17194  if test "x$DEVKIT_VS_INCLUDE" = x; then
17195    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17196  fi
17197
17198          # The Visual Studio lib environment variable
17199
17200  if test "x$DEVKIT_VS_LIB" = x; then
17201    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17202  fi
17203
17204          # Corresponds to --with-msvcr-dll
17205
17206  if test "x$DEVKIT_MSVCR_DLL" = x; then
17207    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17208  fi
17209
17210          # Corresponds to --with-msvcp-dll
17211
17212  if test "x$DEVKIT_MSVCP_DLL" = x; then
17213    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17214  fi
17215
17216        fi
17217
17218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17219$as_echo_n "checking for devkit... " >&6; }
17220        if test "x$DEVKIT_NAME" != x; then
17221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17222$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17223        else
17224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17225$as_echo "$DEVKIT_ROOT" >&6; }
17226        fi
17227
17228
17229  if test "x$DEVKIT_EXTRA_PATH" != x; then
17230    if test "x$EXTRA_PATH" = x; then
17231      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17232    else
17233      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17234    fi
17235  fi
17236
17237
17238        # Fallback default of just /bin if DEVKIT_PATH is not defined
17239        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17240          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17241        fi
17242
17243  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17244    if test "x$TOOLCHAIN_PATH" = x; then
17245      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17246    else
17247      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17248    fi
17249  fi
17250
17251
17252        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17253        # places for backwards compatiblity.
17254        if test "x$DEVKIT_SYSROOT" != x; then
17255          SYSROOT="$DEVKIT_SYSROOT"
17256        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17257          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17258        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17259          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17260        fi
17261
17262
17263fi
17264
17265
17266  # You can force the sysroot if the sysroot encoded into the compiler tools
17267  # is not correct.
17268
17269# Check whether --with-sys-root was given.
17270if test "${with_sys_root+set}" = set; then :
17271  withval=$with_sys_root; SYSROOT=$with_sys_root
17272
17273fi
17274
17275
17276
17277# Check whether --with-sysroot was given.
17278if test "${with_sysroot+set}" = set; then :
17279  withval=$with_sysroot; SYSROOT=$with_sysroot
17280
17281fi
17282
17283
17284
17285# Check whether --with-tools-dir was given.
17286if test "${with_tools_dir+set}" = set; then :
17287  withval=$with_tools_dir;
17288  if test "x$with_tools_dir" != x; then
17289    if test "x$TOOLCHAIN_PATH" = x; then
17290      TOOLCHAIN_PATH="$with_tools_dir"
17291    else
17292      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17293    fi
17294  fi
17295
17296
17297fi
17298
17299
17300
17301# Check whether --with-toolchain-path was given.
17302if test "${with_toolchain_path+set}" = set; then :
17303  withval=$with_toolchain_path;
17304  if test "x$with_toolchain_path" != x; then
17305    if test "x$TOOLCHAIN_PATH" = x; then
17306      TOOLCHAIN_PATH="$with_toolchain_path"
17307    else
17308      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17309    fi
17310  fi
17311
17312
17313fi
17314
17315
17316
17317# Check whether --with-extra-path was given.
17318if test "${with_extra_path+set}" = set; then :
17319  withval=$with_extra_path;
17320  if test "x$with_extra_path" != x; then
17321    if test "x$EXTRA_PATH" = x; then
17322      EXTRA_PATH="$with_extra_path"
17323    else
17324      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17325    fi
17326  fi
17327
17328
17329fi
17330
17331
17332  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17333    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17334    # If not, detect if Xcode is installed by running xcodebuild -version
17335    # if no Xcode installed, xcodebuild exits with 1
17336    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17337    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17338      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17339      # fall back on the stub binary in /usr/bin/xcodebuild
17340      # Extract the first word of "xcodebuild", so it can be a program name with args.
17341set dummy xcodebuild; ac_word=$2
17342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17343$as_echo_n "checking for $ac_word... " >&6; }
17344if ${ac_cv_path_XCODEBUILD+:} false; then :
17345  $as_echo_n "(cached) " >&6
17346else
17347  case $XCODEBUILD in
17348  [\\/]* | ?:[\\/]*)
17349  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17350  ;;
17351  *)
17352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17353for as_dir in $TOOLCHAIN_PATH
17354do
17355  IFS=$as_save_IFS
17356  test -z "$as_dir" && as_dir=.
17357    for ac_exec_ext in '' $ac_executable_extensions; do
17358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17359    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17361    break 2
17362  fi
17363done
17364  done
17365IFS=$as_save_IFS
17366
17367  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17368  ;;
17369esac
17370fi
17371XCODEBUILD=$ac_cv_path_XCODEBUILD
17372if test -n "$XCODEBUILD"; then
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17374$as_echo "$XCODEBUILD" >&6; }
17375else
17376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17377$as_echo "no" >&6; }
17378fi
17379
17380
17381    else
17382      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17383      # when only the command line tools are installed there are no SDKs, so headers
17384      # are copied into the system frameworks
17385      XCODEBUILD=
17386
17387    fi
17388
17389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17390$as_echo_n "checking for sdk name... " >&6; }
17391
17392# Check whether --with-sdk-name was given.
17393if test "${with_sdk_name+set}" = set; then :
17394  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17395
17396fi
17397
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17399$as_echo "$SDKNAME" >&6; }
17400
17401    # if toolchain path is specified then don't rely on system headers, they may not compile
17402    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17403    test -z "$TOOLCHAIN_PATH" && \
17404      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17405
17406    if test -z "$SYSROOT"; then
17407      if test -n "$XCODEBUILD"; then
17408        # if we don't have system headers, use default SDK name (last resort)
17409        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17410          SDKNAME=${SDKNAME:-macosx}
17411        fi
17412
17413        if test -n "$SDKNAME"; then
17414          # Call xcodebuild to determine SYSROOT
17415          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17416        fi
17417      else
17418        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17419          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
17420        fi
17421      fi
17422    else
17423      # warn user if --with-sdk-name was also set
17424      if test -n "$with_sdk_name"; then
17425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17426$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17427      fi
17428    fi
17429
17430    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17431      # If no system framework headers, then SYSROOT must be set, or we won't build
17432      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
17433    fi
17434
17435    # Perform a basic sanity test
17436    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17437      if test -z "$SYSROOT"; then
17438        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
17439      else
17440        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17441      fi
17442    fi
17443
17444    # set SDKROOT too, Xcode tools will pick it up
17445    SDKROOT="$SYSROOT"
17446
17447  fi
17448
17449  # Prepend the extra path to the global path
17450
17451  if test "x$EXTRA_PATH" != x; then
17452    if test "x$PATH" = x; then
17453      PATH="$EXTRA_PATH"
17454    else
17455      PATH="$EXTRA_PATH:$PATH"
17456    fi
17457  fi
17458
17459
17460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17461$as_echo_n "checking for sysroot... " >&6; }
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17463$as_echo "$SYSROOT" >&6; }
17464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17465$as_echo_n "checking for toolchain path... " >&6; }
17466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17467$as_echo "$TOOLCHAIN_PATH" >&6; }
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17469$as_echo_n "checking for extra path... " >&6; }
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17471$as_echo "$EXTRA_PATH" >&6; }
17472
17473
17474# To properly create a configuration name, we need to have the OpenJDK target
17475# and options (variants and debug level) parsed.
17476
17477
17478
17479# Check whether --with-conf-name was given.
17480if test "${with_conf_name+set}" = set; then :
17481  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17482fi
17483
17484
17485  # Test from where we are running configure, in or outside of src root.
17486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17487$as_echo_n "checking where to store configuration... " >&6; }
17488  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17489      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17490      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17491    # We are running configure from the src root.
17492    # Create a default ./build/target-variant-debuglevel output root.
17493    if test "x${CONF_NAME}" = x; then
17494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17495$as_echo "in default location" >&6; }
17496      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17497    else
17498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17499$as_echo "in build directory with custom name" >&6; }
17500    fi
17501    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17502    $MKDIR -p "$OUTPUT_ROOT"
17503    if test ! -d "$OUTPUT_ROOT"; then
17504      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17505    fi
17506  else
17507    # We are running configure from outside of the src dir.
17508    # Then use the current directory as output dir!
17509    # If configuration is situated in normal build directory, just use the build
17510    # directory name as configuration name, otherwise use the complete path.
17511    if test "x${CONF_NAME}" = x; then
17512      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17513    fi
17514    OUTPUT_ROOT="$CURDIR"
17515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17516$as_echo "in current directory" >&6; }
17517
17518    # WARNING: This might be a bad thing to do. You need to be sure you want to
17519    # have a configuration in this directory. Do some sanity checks!
17520
17521    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17522      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17523      # other files
17524      files_present=`$LS $OUTPUT_ROOT`
17525      # Configure has already touched config.log and confdefs.h in the current dir when this check
17526      # is performed.
17527      filtered_files=`$ECHO "$files_present" \
17528          | $SED -e 's/config.log//g' \
17529              -e 's/configure.log//g' \
17530              -e 's/confdefs.h//g' \
17531              -e 's/ //g' \
17532          | $TR -d '\n'`
17533      if test "x$filtered_files" != x; then
17534        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17535$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17536        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17537$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17539$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17541$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17543$as_echo "$as_me: seriously mess up just about everything." >&6;}
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17545$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17546        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17547$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17548        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17549      fi
17550    fi
17551  fi
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17553$as_echo_n "checking what configuration name to use... " >&6; }
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17555$as_echo "$CONF_NAME" >&6; }
17556
17557
17558  # Only process if variable expands to non-empty
17559
17560  if test "x$OUTPUT_ROOT" != x; then
17561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17562
17563  # Input might be given as Windows format, start by converting to
17564  # unix format.
17565  path="$OUTPUT_ROOT"
17566  new_path=`$CYGPATH -u "$path"`
17567
17568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17571  # "foo.exe" is OK but "foo" is an error.
17572  #
17573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17574  # It is also a way to make sure we got the proper file name for the real test later on.
17575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17576  if test "x$test_shortpath" = x; then
17577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17578$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17579    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17580  fi
17581
17582  # Call helper function which possibly converts this using DOS-style short mode.
17583  # If so, the updated path is stored in $new_path.
17584
17585  input_path="$new_path"
17586  # Check if we need to convert this using DOS-style short mode. If the path
17587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17588  # take no chances and rewrite it.
17589  # Note: m4 eats our [], so we need to use [ and ] instead.
17590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17591  if test "x$has_forbidden_chars" != x; then
17592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17596      # Going to short mode and back again did indeed matter. Since short mode is
17597      # case insensitive, let's make it lowercase to improve readability.
17598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17599      # Now convert it back to Unix-style (cygpath)
17600      input_path=`$CYGPATH -u "$shortmode_path"`
17601      new_path="$input_path"
17602    fi
17603  fi
17604
17605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17606  if test "x$test_cygdrive_prefix" = x; then
17607    # As a simple fix, exclude /usr/bin since it's not a real path.
17608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17610      # a path prefixed by /cygdrive for fixpath to work.
17611      new_path="$CYGWIN_ROOT_PATH$input_path"
17612    fi
17613  fi
17614
17615
17616  if test "x$path" != "x$new_path"; then
17617    OUTPUT_ROOT="$new_path"
17618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17619$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17620  fi
17621
17622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17623
17624  path="$OUTPUT_ROOT"
17625  has_colon=`$ECHO $path | $GREP ^.:`
17626  new_path="$path"
17627  if test "x$has_colon" = x; then
17628    # Not in mixed or Windows style, start by that.
17629    new_path=`cmd //c echo $path`
17630  fi
17631
17632
17633  input_path="$new_path"
17634  # Check if we need to convert this using DOS-style short mode. If the path
17635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17636  # take no chances and rewrite it.
17637  # Note: m4 eats our [], so we need to use [ and ] instead.
17638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17639  if test "x$has_forbidden_chars" != x; then
17640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17642  fi
17643
17644
17645  windows_path="$new_path"
17646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17647    unix_path=`$CYGPATH -u "$windows_path"`
17648    new_path="$unix_path"
17649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17651    new_path="$unix_path"
17652  fi
17653
17654  if test "x$path" != "x$new_path"; then
17655    OUTPUT_ROOT="$new_path"
17656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17657$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17658  fi
17659
17660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17662
17663    else
17664      # We're on a unix platform. Hooray! :)
17665      path="$OUTPUT_ROOT"
17666      has_space=`$ECHO "$path" | $GREP " "`
17667      if test "x$has_space" != x; then
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17669$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17671      fi
17672
17673      # Use eval to expand a potential ~
17674      eval path="$path"
17675      if test ! -f "$path" && test ! -d "$path"; then
17676        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17677      fi
17678
17679      if test -d "$path"; then
17680        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17681      else
17682        dir="`$DIRNAME "$path"`"
17683        base="`$BASENAME "$path"`"
17684        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17685      fi
17686    fi
17687  fi
17688
17689
17690  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17691  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17692
17693  SPEC="$OUTPUT_ROOT/spec.gmk"
17694
17695
17696
17697
17698
17699  # The spec.gmk file contains all variables for the make system.
17700  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17701
17702  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17703  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17704
17705  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17706  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17707
17708  # The compare.sh is used to compare the build output to other builds.
17709  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17710
17711  # The generated Makefile knows where the spec.gmk is and where the source is.
17712  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17713  # which will look for generated configurations
17714  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17715
17716
17717
17718# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17719
17720  for ac_prog in apt-get yum brew port pkgutil pkgadd
17721do
17722  # Extract the first word of "$ac_prog", so it can be a program name with args.
17723set dummy $ac_prog; ac_word=$2
17724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17725$as_echo_n "checking for $ac_word... " >&6; }
17726if ${ac_cv_prog_PKGHANDLER+:} false; then :
17727  $as_echo_n "(cached) " >&6
17728else
17729  if test -n "$PKGHANDLER"; then
17730  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17731else
17732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17733for as_dir in $PATH
17734do
17735  IFS=$as_save_IFS
17736  test -z "$as_dir" && as_dir=.
17737    for ac_exec_ext in '' $ac_executable_extensions; do
17738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17739    ac_cv_prog_PKGHANDLER="$ac_prog"
17740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17741    break 2
17742  fi
17743done
17744  done
17745IFS=$as_save_IFS
17746
17747fi
17748fi
17749PKGHANDLER=$ac_cv_prog_PKGHANDLER
17750if test -n "$PKGHANDLER"; then
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17752$as_echo "$PKGHANDLER" >&6; }
17753else
17754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755$as_echo "no" >&6; }
17756fi
17757
17758
17759  test -n "$PKGHANDLER" && break
17760done
17761
17762
17763
17764# Setup tools that requires more complex handling, or that is not needed by the configure script.
17765
17766
17767
17768  # Publish this variable in the help.
17769
17770
17771  if [ -z "${MAKE+x}" ]; then
17772    # The variable is not set by user, try to locate tool using the code snippet
17773
17774    # Try our hardest to locate a correct version of GNU make
17775    for ac_prog in gmake
17776do
17777  # Extract the first word of "$ac_prog", so it can be a program name with args.
17778set dummy $ac_prog; ac_word=$2
17779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17780$as_echo_n "checking for $ac_word... " >&6; }
17781if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17782  $as_echo_n "(cached) " >&6
17783else
17784  case $CHECK_GMAKE in
17785  [\\/]* | ?:[\\/]*)
17786  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17787  ;;
17788  *)
17789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17790for as_dir in $PATH
17791do
17792  IFS=$as_save_IFS
17793  test -z "$as_dir" && as_dir=.
17794    for ac_exec_ext in '' $ac_executable_extensions; do
17795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17796    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17798    break 2
17799  fi
17800done
17801  done
17802IFS=$as_save_IFS
17803
17804  ;;
17805esac
17806fi
17807CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17808if test -n "$CHECK_GMAKE"; then
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17810$as_echo "$CHECK_GMAKE" >&6; }
17811else
17812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17813$as_echo "no" >&6; }
17814fi
17815
17816
17817  test -n "$CHECK_GMAKE" && break
17818done
17819
17820
17821  MAKE_CANDIDATE=""$CHECK_GMAKE""
17822  DESCRIPTION="gmake in PATH"
17823
17824  # On Cygwin, we require a newer version of make than on other platforms
17825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17826    MAKE_VERSION_EXPR="-e 4\."
17827    MAKE_REQUIRED_VERSION="4.0"
17828   else
17829    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17830    MAKE_REQUIRED_VERSION="3.81"
17831  fi
17832
17833  if test "x$MAKE_CANDIDATE" != x; then
17834    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17835$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17836    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17837    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17838    if test "x$IS_GNU_MAKE" = x; then
17839      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17840$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17841    else
17842      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17843      if test "x$IS_MODERN_MAKE" = x; then
17844        { $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
17845$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;}
17846      else
17847        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17848          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17849            MAKE_EXPECTED_ENV='cygwin'
17850          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851            MAKE_EXPECTED_ENV='msys'
17852          else
17853            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17854          fi
17855          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17856          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17857        else
17858          # Not relevant for non-Windows
17859          IS_MAKE_CORRECT_ENV=true
17860        fi
17861        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17862          { $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
17863$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;}
17864        else
17865          FOUND_MAKE=$MAKE_CANDIDATE
17866
17867  # Only process if variable expands to non-empty
17868
17869  if test "x$FOUND_MAKE" != x; then
17870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17871
17872  # First separate the path from the arguments. This will split at the first
17873  # space.
17874  complete="$FOUND_MAKE"
17875  path="${complete%% *}"
17876  tmp="$complete EOL"
17877  arguments="${tmp#* }"
17878
17879  # Input might be given as Windows format, start by converting to
17880  # unix format.
17881  new_path=`$CYGPATH -u "$path"`
17882
17883  # Now try to locate executable using which
17884  new_path=`$WHICH "$new_path" 2> /dev/null`
17885  # bat and cmd files are not always considered executable in cygwin causing which
17886  # to not find them
17887  if test "x$new_path" = x \
17888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17890    new_path=`$CYGPATH -u "$path"`
17891  fi
17892  if test "x$new_path" = x; then
17893    # Oops. Which didn't find the executable.
17894    # The splitting of arguments from the executable at a space might have been incorrect,
17895    # since paths with space are more likely in Windows. Give it another try with the whole
17896    # argument.
17897    path="$complete"
17898    arguments="EOL"
17899    new_path=`$CYGPATH -u "$path"`
17900    new_path=`$WHICH "$new_path" 2> /dev/null`
17901    # bat and cmd files are not always considered executable in cygwin causing which
17902    # to not find them
17903    if test "x$new_path" = x \
17904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17906      new_path=`$CYGPATH -u "$path"`
17907    fi
17908    if test "x$new_path" = x; then
17909      # It's still not found. Now this is an unrecoverable error.
17910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17912      has_space=`$ECHO "$complete" | $GREP " "`
17913      if test "x$has_space" != x; then
17914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17916      fi
17917      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17918    fi
17919  fi
17920
17921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17924  # "foo.exe" is OK but "foo" is an error.
17925  #
17926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17927  # It is also a way to make sure we got the proper file name for the real test later on.
17928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17929  if test "x$test_shortpath" = x; then
17930    # Short path failed, file does not exist as specified.
17931    # Try adding .exe or .cmd
17932    if test -f "${new_path}.exe"; then
17933      input_to_shortpath="${new_path}.exe"
17934    elif test -f "${new_path}.cmd"; then
17935      input_to_shortpath="${new_path}.cmd"
17936    else
17937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17938$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17941      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17942    fi
17943  else
17944    input_to_shortpath="$new_path"
17945  fi
17946
17947  # Call helper function which possibly converts this using DOS-style short mode.
17948  # If so, the updated path is stored in $new_path.
17949  new_path="$input_to_shortpath"
17950
17951  input_path="$input_to_shortpath"
17952  # Check if we need to convert this using DOS-style short mode. If the path
17953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17954  # take no chances and rewrite it.
17955  # Note: m4 eats our [], so we need to use [ and ] instead.
17956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17957  if test "x$has_forbidden_chars" != x; then
17958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17962      # Going to short mode and back again did indeed matter. Since short mode is
17963      # case insensitive, let's make it lowercase to improve readability.
17964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17965      # Now convert it back to Unix-style (cygpath)
17966      input_path=`$CYGPATH -u "$shortmode_path"`
17967      new_path="$input_path"
17968    fi
17969  fi
17970
17971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17972  if test "x$test_cygdrive_prefix" = x; then
17973    # As a simple fix, exclude /usr/bin since it's not a real path.
17974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17976      # a path prefixed by /cygdrive for fixpath to work.
17977      new_path="$CYGWIN_ROOT_PATH$input_path"
17978    fi
17979  fi
17980
17981  # remove trailing .exe if any
17982  new_path="${new_path/%.exe/}"
17983
17984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17985
17986  # First separate the path from the arguments. This will split at the first
17987  # space.
17988  complete="$FOUND_MAKE"
17989  path="${complete%% *}"
17990  tmp="$complete EOL"
17991  arguments="${tmp#* }"
17992
17993  # Input might be given as Windows format, start by converting to
17994  # unix format.
17995  new_path="$path"
17996
17997  windows_path="$new_path"
17998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17999    unix_path=`$CYGPATH -u "$windows_path"`
18000    new_path="$unix_path"
18001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18003    new_path="$unix_path"
18004  fi
18005
18006
18007  # Now try to locate executable using which
18008  new_path=`$WHICH "$new_path" 2> /dev/null`
18009
18010  if test "x$new_path" = x; then
18011    # Oops. Which didn't find the executable.
18012    # The splitting of arguments from the executable at a space might have been incorrect,
18013    # since paths with space are more likely in Windows. Give it another try with the whole
18014    # argument.
18015    path="$complete"
18016    arguments="EOL"
18017    new_path="$path"
18018
18019  windows_path="$new_path"
18020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021    unix_path=`$CYGPATH -u "$windows_path"`
18022    new_path="$unix_path"
18023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18025    new_path="$unix_path"
18026  fi
18027
18028
18029    new_path=`$WHICH "$new_path" 2> /dev/null`
18030    # bat and cmd files are not always considered executable in MSYS causing which
18031    # to not find them
18032    if test "x$new_path" = x \
18033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18035      new_path="$path"
18036
18037  windows_path="$new_path"
18038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18039    unix_path=`$CYGPATH -u "$windows_path"`
18040    new_path="$unix_path"
18041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18043    new_path="$unix_path"
18044  fi
18045
18046    fi
18047
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Now new_path has a complete unix path to the binary
18062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18063    # Keep paths in /bin as-is, but remove trailing .exe if any
18064    new_path="${new_path/%.exe/}"
18065    # Do not save /bin paths to all_fixpath_prefixes!
18066  else
18067    # Not in mixed or Windows style, start by that.
18068    new_path=`cmd //c echo $new_path`
18069
18070  input_path="$new_path"
18071  # Check if we need to convert this using DOS-style short mode. If the path
18072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18073  # take no chances and rewrite it.
18074  # Note: m4 eats our [], so we need to use [ and ] instead.
18075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18076  if test "x$has_forbidden_chars" != x; then
18077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18079  fi
18080
18081    # Output is in $new_path
18082
18083  windows_path="$new_path"
18084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085    unix_path=`$CYGPATH -u "$windows_path"`
18086    new_path="$unix_path"
18087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18089    new_path="$unix_path"
18090  fi
18091
18092    # remove trailing .exe if any
18093    new_path="${new_path/%.exe/}"
18094
18095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18097  fi
18098
18099    else
18100      # We're on a unix platform. Hooray! :)
18101      # First separate the path from the arguments. This will split at the first
18102      # space.
18103      complete="$FOUND_MAKE"
18104      path="${complete%% *}"
18105      tmp="$complete EOL"
18106      arguments="${tmp#* }"
18107
18108      # Cannot rely on the command "which" here since it doesn't always work.
18109      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18110      if test -z "$is_absolute_path"; then
18111        # Path to executable is not absolute. Find it.
18112        IFS_save="$IFS"
18113        IFS=:
18114        for p in $PATH; do
18115          if test -f "$p/$path" && test -x "$p/$path"; then
18116            new_path="$p/$path"
18117            break
18118          fi
18119        done
18120        IFS="$IFS_save"
18121      else
18122        # This is an absolute path, we can use it without further modifications.
18123        new_path="$path"
18124      fi
18125
18126      if test "x$new_path" = x; then
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18129        has_space=`$ECHO "$complete" | $GREP " "`
18130        if test "x$has_space" != x; then
18131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18133        fi
18134        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18135      fi
18136    fi
18137
18138    # Now join together the path and the arguments once again
18139    if test "x$arguments" != xEOL; then
18140      new_complete="$new_path ${arguments% *}"
18141    else
18142      new_complete="$new_path"
18143    fi
18144
18145    if test "x$complete" != "x$new_complete"; then
18146      FOUND_MAKE="$new_complete"
18147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18148$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18149    fi
18150  fi
18151
18152        fi
18153      fi
18154    fi
18155  fi
18156
18157
18158    if test "x$FOUND_MAKE" = x; then
18159      for ac_prog in make
18160do
18161  # Extract the first word of "$ac_prog", so it can be a program name with args.
18162set dummy $ac_prog; ac_word=$2
18163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18164$as_echo_n "checking for $ac_word... " >&6; }
18165if ${ac_cv_path_CHECK_MAKE+:} false; then :
18166  $as_echo_n "(cached) " >&6
18167else
18168  case $CHECK_MAKE in
18169  [\\/]* | ?:[\\/]*)
18170  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18171  ;;
18172  *)
18173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18174for as_dir in $PATH
18175do
18176  IFS=$as_save_IFS
18177  test -z "$as_dir" && as_dir=.
18178    for ac_exec_ext in '' $ac_executable_extensions; do
18179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18180    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18182    break 2
18183  fi
18184done
18185  done
18186IFS=$as_save_IFS
18187
18188  ;;
18189esac
18190fi
18191CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18192if test -n "$CHECK_MAKE"; then
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18194$as_echo "$CHECK_MAKE" >&6; }
18195else
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18197$as_echo "no" >&6; }
18198fi
18199
18200
18201  test -n "$CHECK_MAKE" && break
18202done
18203
18204
18205  MAKE_CANDIDATE=""$CHECK_MAKE""
18206  DESCRIPTION="make in PATH"
18207
18208  # On Cygwin, we require a newer version of make than on other platforms
18209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18210    MAKE_VERSION_EXPR="-e 4\."
18211    MAKE_REQUIRED_VERSION="4.0"
18212   else
18213    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18214    MAKE_REQUIRED_VERSION="3.81"
18215  fi
18216
18217  if test "x$MAKE_CANDIDATE" != x; then
18218    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18219$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18220    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18221    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18222    if test "x$IS_GNU_MAKE" = x; then
18223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18224$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18225    else
18226      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18227      if test "x$IS_MODERN_MAKE" = x; then
18228        { $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
18229$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;}
18230      else
18231        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18232          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233            MAKE_EXPECTED_ENV='cygwin'
18234          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18235            MAKE_EXPECTED_ENV='msys'
18236          else
18237            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18238          fi
18239          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18240          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18241        else
18242          # Not relevant for non-Windows
18243          IS_MAKE_CORRECT_ENV=true
18244        fi
18245        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18246          { $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
18247$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;}
18248        else
18249          FOUND_MAKE=$MAKE_CANDIDATE
18250
18251  # Only process if variable expands to non-empty
18252
18253  if test "x$FOUND_MAKE" != x; then
18254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18255
18256  # First separate the path from the arguments. This will split at the first
18257  # space.
18258  complete="$FOUND_MAKE"
18259  path="${complete%% *}"
18260  tmp="$complete EOL"
18261  arguments="${tmp#* }"
18262
18263  # Input might be given as Windows format, start by converting to
18264  # unix format.
18265  new_path=`$CYGPATH -u "$path"`
18266
18267  # Now try to locate executable using which
18268  new_path=`$WHICH "$new_path" 2> /dev/null`
18269  # bat and cmd files are not always considered executable in cygwin causing which
18270  # to not find them
18271  if test "x$new_path" = x \
18272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18274    new_path=`$CYGPATH -u "$path"`
18275  fi
18276  if test "x$new_path" = x; then
18277    # Oops. Which didn't find the executable.
18278    # The splitting of arguments from the executable at a space might have been incorrect,
18279    # since paths with space are more likely in Windows. Give it another try with the whole
18280    # argument.
18281    path="$complete"
18282    arguments="EOL"
18283    new_path=`$CYGPATH -u "$path"`
18284    new_path=`$WHICH "$new_path" 2> /dev/null`
18285    # bat and cmd files are not always considered executable in cygwin causing which
18286    # to not find them
18287    if test "x$new_path" = x \
18288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18290      new_path=`$CYGPATH -u "$path"`
18291    fi
18292    if test "x$new_path" = x; then
18293      # It's still not found. Now this is an unrecoverable error.
18294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18296      has_space=`$ECHO "$complete" | $GREP " "`
18297      if test "x$has_space" != x; then
18298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18300      fi
18301      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18302    fi
18303  fi
18304
18305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18308  # "foo.exe" is OK but "foo" is an error.
18309  #
18310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18311  # It is also a way to make sure we got the proper file name for the real test later on.
18312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18313  if test "x$test_shortpath" = x; then
18314    # Short path failed, file does not exist as specified.
18315    # Try adding .exe or .cmd
18316    if test -f "${new_path}.exe"; then
18317      input_to_shortpath="${new_path}.exe"
18318    elif test -f "${new_path}.cmd"; then
18319      input_to_shortpath="${new_path}.cmd"
18320    else
18321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18322$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18325      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18326    fi
18327  else
18328    input_to_shortpath="$new_path"
18329  fi
18330
18331  # Call helper function which possibly converts this using DOS-style short mode.
18332  # If so, the updated path is stored in $new_path.
18333  new_path="$input_to_shortpath"
18334
18335  input_path="$input_to_shortpath"
18336  # Check if we need to convert this using DOS-style short mode. If the path
18337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18338  # take no chances and rewrite it.
18339  # Note: m4 eats our [], so we need to use [ and ] instead.
18340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18341  if test "x$has_forbidden_chars" != x; then
18342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18346      # Going to short mode and back again did indeed matter. Since short mode is
18347      # case insensitive, let's make it lowercase to improve readability.
18348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18349      # Now convert it back to Unix-style (cygpath)
18350      input_path=`$CYGPATH -u "$shortmode_path"`
18351      new_path="$input_path"
18352    fi
18353  fi
18354
18355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18356  if test "x$test_cygdrive_prefix" = x; then
18357    # As a simple fix, exclude /usr/bin since it's not a real path.
18358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18360      # a path prefixed by /cygdrive for fixpath to work.
18361      new_path="$CYGWIN_ROOT_PATH$input_path"
18362    fi
18363  fi
18364
18365  # remove trailing .exe if any
18366  new_path="${new_path/%.exe/}"
18367
18368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369
18370  # First separate the path from the arguments. This will split at the first
18371  # space.
18372  complete="$FOUND_MAKE"
18373  path="${complete%% *}"
18374  tmp="$complete EOL"
18375  arguments="${tmp#* }"
18376
18377  # Input might be given as Windows format, start by converting to
18378  # unix format.
18379  new_path="$path"
18380
18381  windows_path="$new_path"
18382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18383    unix_path=`$CYGPATH -u "$windows_path"`
18384    new_path="$unix_path"
18385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18387    new_path="$unix_path"
18388  fi
18389
18390
18391  # Now try to locate executable using which
18392  new_path=`$WHICH "$new_path" 2> /dev/null`
18393
18394  if test "x$new_path" = x; then
18395    # Oops. Which didn't find the executable.
18396    # The splitting of arguments from the executable at a space might have been incorrect,
18397    # since paths with space are more likely in Windows. Give it another try with the whole
18398    # argument.
18399    path="$complete"
18400    arguments="EOL"
18401    new_path="$path"
18402
18403  windows_path="$new_path"
18404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18405    unix_path=`$CYGPATH -u "$windows_path"`
18406    new_path="$unix_path"
18407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18409    new_path="$unix_path"
18410  fi
18411
18412
18413    new_path=`$WHICH "$new_path" 2> /dev/null`
18414    # bat and cmd files are not always considered executable in MSYS causing which
18415    # to not find them
18416    if test "x$new_path" = x \
18417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419      new_path="$path"
18420
18421  windows_path="$new_path"
18422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18423    unix_path=`$CYGPATH -u "$windows_path"`
18424    new_path="$unix_path"
18425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18427    new_path="$unix_path"
18428  fi
18429
18430    fi
18431
18432    if test "x$new_path" = x; then
18433      # It's still not found. Now this is an unrecoverable error.
18434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18436      has_space=`$ECHO "$complete" | $GREP " "`
18437      if test "x$has_space" != x; then
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18440      fi
18441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18442    fi
18443  fi
18444
18445  # Now new_path has a complete unix path to the binary
18446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18447    # Keep paths in /bin as-is, but remove trailing .exe if any
18448    new_path="${new_path/%.exe/}"
18449    # Do not save /bin paths to all_fixpath_prefixes!
18450  else
18451    # Not in mixed or Windows style, start by that.
18452    new_path=`cmd //c echo $new_path`
18453
18454  input_path="$new_path"
18455  # Check if we need to convert this using DOS-style short mode. If the path
18456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18457  # take no chances and rewrite it.
18458  # Note: m4 eats our [], so we need to use [ and ] instead.
18459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18460  if test "x$has_forbidden_chars" != x; then
18461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18463  fi
18464
18465    # Output is in $new_path
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476    # remove trailing .exe if any
18477    new_path="${new_path/%.exe/}"
18478
18479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18481  fi
18482
18483    else
18484      # We're on a unix platform. Hooray! :)
18485      # First separate the path from the arguments. This will split at the first
18486      # space.
18487      complete="$FOUND_MAKE"
18488      path="${complete%% *}"
18489      tmp="$complete EOL"
18490      arguments="${tmp#* }"
18491
18492      # Cannot rely on the command "which" here since it doesn't always work.
18493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18494      if test -z "$is_absolute_path"; then
18495        # Path to executable is not absolute. Find it.
18496        IFS_save="$IFS"
18497        IFS=:
18498        for p in $PATH; do
18499          if test -f "$p/$path" && test -x "$p/$path"; then
18500            new_path="$p/$path"
18501            break
18502          fi
18503        done
18504        IFS="$IFS_save"
18505      else
18506        # This is an absolute path, we can use it without further modifications.
18507        new_path="$path"
18508      fi
18509
18510      if test "x$new_path" = x; then
18511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18512$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18513        has_space=`$ECHO "$complete" | $GREP " "`
18514        if test "x$has_space" != x; then
18515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18517        fi
18518        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18519      fi
18520    fi
18521
18522    # Now join together the path and the arguments once again
18523    if test "x$arguments" != xEOL; then
18524      new_complete="$new_path ${arguments% *}"
18525    else
18526      new_complete="$new_path"
18527    fi
18528
18529    if test "x$complete" != "x$new_complete"; then
18530      FOUND_MAKE="$new_complete"
18531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18532$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18533    fi
18534  fi
18535
18536        fi
18537      fi
18538    fi
18539  fi
18540
18541    fi
18542
18543    if test "x$FOUND_MAKE" = x; then
18544      if test "x$TOOLCHAIN_PATH" != x; then
18545        # We have a toolchain path, check that as well before giving up.
18546        OLD_PATH=$PATH
18547        PATH=$TOOLCHAIN_PATH:$PATH
18548        for ac_prog in gmake
18549do
18550  # Extract the first word of "$ac_prog", so it can be a program name with args.
18551set dummy $ac_prog; ac_word=$2
18552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18553$as_echo_n "checking for $ac_word... " >&6; }
18554if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18555  $as_echo_n "(cached) " >&6
18556else
18557  case $CHECK_TOOLSDIR_GMAKE in
18558  [\\/]* | ?:[\\/]*)
18559  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18560  ;;
18561  *)
18562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18563for as_dir in $PATH
18564do
18565  IFS=$as_save_IFS
18566  test -z "$as_dir" && as_dir=.
18567    for ac_exec_ext in '' $ac_executable_extensions; do
18568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18569    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18571    break 2
18572  fi
18573done
18574  done
18575IFS=$as_save_IFS
18576
18577  ;;
18578esac
18579fi
18580CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18581if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18583$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18584else
18585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18586$as_echo "no" >&6; }
18587fi
18588
18589
18590  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18591done
18592
18593
18594  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18595  DESCRIPTION="gmake in tools-dir"
18596
18597  # On Cygwin, we require a newer version of make than on other platforms
18598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18599    MAKE_VERSION_EXPR="-e 4\."
18600    MAKE_REQUIRED_VERSION="4.0"
18601   else
18602    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18603    MAKE_REQUIRED_VERSION="3.81"
18604  fi
18605
18606  if test "x$MAKE_CANDIDATE" != x; then
18607    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18608$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18609    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18610    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18611    if test "x$IS_GNU_MAKE" = x; then
18612      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18613$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18614    else
18615      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18616      if test "x$IS_MODERN_MAKE" = x; then
18617        { $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
18618$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;}
18619      else
18620        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18621          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622            MAKE_EXPECTED_ENV='cygwin'
18623          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624            MAKE_EXPECTED_ENV='msys'
18625          else
18626            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18627          fi
18628          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18629          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18630        else
18631          # Not relevant for non-Windows
18632          IS_MAKE_CORRECT_ENV=true
18633        fi
18634        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18635          { $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
18636$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;}
18637        else
18638          FOUND_MAKE=$MAKE_CANDIDATE
18639
18640  # Only process if variable expands to non-empty
18641
18642  if test "x$FOUND_MAKE" != x; then
18643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18644
18645  # First separate the path from the arguments. This will split at the first
18646  # space.
18647  complete="$FOUND_MAKE"
18648  path="${complete%% *}"
18649  tmp="$complete EOL"
18650  arguments="${tmp#* }"
18651
18652  # Input might be given as Windows format, start by converting to
18653  # unix format.
18654  new_path=`$CYGPATH -u "$path"`
18655
18656  # Now try to locate executable using which
18657  new_path=`$WHICH "$new_path" 2> /dev/null`
18658  # bat and cmd files are not always considered executable in cygwin causing which
18659  # to not find them
18660  if test "x$new_path" = x \
18661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18663    new_path=`$CYGPATH -u "$path"`
18664  fi
18665  if test "x$new_path" = x; then
18666    # Oops. Which didn't find the executable.
18667    # The splitting of arguments from the executable at a space might have been incorrect,
18668    # since paths with space are more likely in Windows. Give it another try with the whole
18669    # argument.
18670    path="$complete"
18671    arguments="EOL"
18672    new_path=`$CYGPATH -u "$path"`
18673    new_path=`$WHICH "$new_path" 2> /dev/null`
18674    # bat and cmd files are not always considered executable in cygwin causing which
18675    # to not find them
18676    if test "x$new_path" = x \
18677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18679      new_path=`$CYGPATH -u "$path"`
18680    fi
18681    if test "x$new_path" = x; then
18682      # It's still not found. Now this is an unrecoverable error.
18683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18685      has_space=`$ECHO "$complete" | $GREP " "`
18686      if test "x$has_space" != x; then
18687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18689      fi
18690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18691    fi
18692  fi
18693
18694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18697  # "foo.exe" is OK but "foo" is an error.
18698  #
18699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18700  # It is also a way to make sure we got the proper file name for the real test later on.
18701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18702  if test "x$test_shortpath" = x; then
18703    # Short path failed, file does not exist as specified.
18704    # Try adding .exe or .cmd
18705    if test -f "${new_path}.exe"; then
18706      input_to_shortpath="${new_path}.exe"
18707    elif test -f "${new_path}.cmd"; then
18708      input_to_shortpath="${new_path}.cmd"
18709    else
18710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18711$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18715    fi
18716  else
18717    input_to_shortpath="$new_path"
18718  fi
18719
18720  # Call helper function which possibly converts this using DOS-style short mode.
18721  # If so, the updated path is stored in $new_path.
18722  new_path="$input_to_shortpath"
18723
18724  input_path="$input_to_shortpath"
18725  # Check if we need to convert this using DOS-style short mode. If the path
18726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18727  # take no chances and rewrite it.
18728  # Note: m4 eats our [], so we need to use [ and ] instead.
18729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18730  if test "x$has_forbidden_chars" != x; then
18731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18735      # Going to short mode and back again did indeed matter. Since short mode is
18736      # case insensitive, let's make it lowercase to improve readability.
18737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18738      # Now convert it back to Unix-style (cygpath)
18739      input_path=`$CYGPATH -u "$shortmode_path"`
18740      new_path="$input_path"
18741    fi
18742  fi
18743
18744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18745  if test "x$test_cygdrive_prefix" = x; then
18746    # As a simple fix, exclude /usr/bin since it's not a real path.
18747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18749      # a path prefixed by /cygdrive for fixpath to work.
18750      new_path="$CYGWIN_ROOT_PATH$input_path"
18751    fi
18752  fi
18753
18754  # remove trailing .exe if any
18755  new_path="${new_path/%.exe/}"
18756
18757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18758
18759  # First separate the path from the arguments. This will split at the first
18760  # space.
18761  complete="$FOUND_MAKE"
18762  path="${complete%% *}"
18763  tmp="$complete EOL"
18764  arguments="${tmp#* }"
18765
18766  # Input might be given as Windows format, start by converting to
18767  # unix format.
18768  new_path="$path"
18769
18770  windows_path="$new_path"
18771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772    unix_path=`$CYGPATH -u "$windows_path"`
18773    new_path="$unix_path"
18774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18776    new_path="$unix_path"
18777  fi
18778
18779
18780  # Now try to locate executable using which
18781  new_path=`$WHICH "$new_path" 2> /dev/null`
18782
18783  if test "x$new_path" = x; then
18784    # Oops. Which didn't find the executable.
18785    # The splitting of arguments from the executable at a space might have been incorrect,
18786    # since paths with space are more likely in Windows. Give it another try with the whole
18787    # argument.
18788    path="$complete"
18789    arguments="EOL"
18790    new_path="$path"
18791
18792  windows_path="$new_path"
18793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18794    unix_path=`$CYGPATH -u "$windows_path"`
18795    new_path="$unix_path"
18796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18798    new_path="$unix_path"
18799  fi
18800
18801
18802    new_path=`$WHICH "$new_path" 2> /dev/null`
18803    # bat and cmd files are not always considered executable in MSYS causing which
18804    # to not find them
18805    if test "x$new_path" = x \
18806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18808      new_path="$path"
18809
18810  windows_path="$new_path"
18811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18812    unix_path=`$CYGPATH -u "$windows_path"`
18813    new_path="$unix_path"
18814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18816    new_path="$unix_path"
18817  fi
18818
18819    fi
18820
18821    if test "x$new_path" = x; then
18822      # It's still not found. Now this is an unrecoverable error.
18823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18824$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18825      has_space=`$ECHO "$complete" | $GREP " "`
18826      if test "x$has_space" != x; then
18827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18829      fi
18830      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18831    fi
18832  fi
18833
18834  # Now new_path has a complete unix path to the binary
18835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18836    # Keep paths in /bin as-is, but remove trailing .exe if any
18837    new_path="${new_path/%.exe/}"
18838    # Do not save /bin paths to all_fixpath_prefixes!
18839  else
18840    # Not in mixed or Windows style, start by that.
18841    new_path=`cmd //c echo $new_path`
18842
18843  input_path="$new_path"
18844  # Check if we need to convert this using DOS-style short mode. If the path
18845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18846  # take no chances and rewrite it.
18847  # Note: m4 eats our [], so we need to use [ and ] instead.
18848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18849  if test "x$has_forbidden_chars" != x; then
18850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18852  fi
18853
18854    # Output is in $new_path
18855
18856  windows_path="$new_path"
18857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18858    unix_path=`$CYGPATH -u "$windows_path"`
18859    new_path="$unix_path"
18860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18862    new_path="$unix_path"
18863  fi
18864
18865    # remove trailing .exe if any
18866    new_path="${new_path/%.exe/}"
18867
18868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18870  fi
18871
18872    else
18873      # We're on a unix platform. Hooray! :)
18874      # First separate the path from the arguments. This will split at the first
18875      # space.
18876      complete="$FOUND_MAKE"
18877      path="${complete%% *}"
18878      tmp="$complete EOL"
18879      arguments="${tmp#* }"
18880
18881      # Cannot rely on the command "which" here since it doesn't always work.
18882      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18883      if test -z "$is_absolute_path"; then
18884        # Path to executable is not absolute. Find it.
18885        IFS_save="$IFS"
18886        IFS=:
18887        for p in $PATH; do
18888          if test -f "$p/$path" && test -x "$p/$path"; then
18889            new_path="$p/$path"
18890            break
18891          fi
18892        done
18893        IFS="$IFS_save"
18894      else
18895        # This is an absolute path, we can use it without further modifications.
18896        new_path="$path"
18897      fi
18898
18899      if test "x$new_path" = x; then
18900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18902        has_space=`$ECHO "$complete" | $GREP " "`
18903        if test "x$has_space" != x; then
18904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18906        fi
18907        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18908      fi
18909    fi
18910
18911    # Now join together the path and the arguments once again
18912    if test "x$arguments" != xEOL; then
18913      new_complete="$new_path ${arguments% *}"
18914    else
18915      new_complete="$new_path"
18916    fi
18917
18918    if test "x$complete" != "x$new_complete"; then
18919      FOUND_MAKE="$new_complete"
18920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18921$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18922    fi
18923  fi
18924
18925        fi
18926      fi
18927    fi
18928  fi
18929
18930        if test "x$FOUND_MAKE" = x; then
18931          for ac_prog in make
18932do
18933  # Extract the first word of "$ac_prog", so it can be a program name with args.
18934set dummy $ac_prog; ac_word=$2
18935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18936$as_echo_n "checking for $ac_word... " >&6; }
18937if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18938  $as_echo_n "(cached) " >&6
18939else
18940  case $CHECK_TOOLSDIR_MAKE in
18941  [\\/]* | ?:[\\/]*)
18942  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18943  ;;
18944  *)
18945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18946for as_dir in $PATH
18947do
18948  IFS=$as_save_IFS
18949  test -z "$as_dir" && as_dir=.
18950    for ac_exec_ext in '' $ac_executable_extensions; do
18951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18952    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18954    break 2
18955  fi
18956done
18957  done
18958IFS=$as_save_IFS
18959
18960  ;;
18961esac
18962fi
18963CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18964if test -n "$CHECK_TOOLSDIR_MAKE"; then
18965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18966$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18967else
18968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18969$as_echo "no" >&6; }
18970fi
18971
18972
18973  test -n "$CHECK_TOOLSDIR_MAKE" && break
18974done
18975
18976
18977  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18978  DESCRIPTION="make in tools-dir"
18979
18980  # On Cygwin, we require a newer version of make than on other platforms
18981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18982    MAKE_VERSION_EXPR="-e 4\."
18983    MAKE_REQUIRED_VERSION="4.0"
18984   else
18985    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18986    MAKE_REQUIRED_VERSION="3.81"
18987  fi
18988
18989  if test "x$MAKE_CANDIDATE" != x; then
18990    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18991$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18992    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18993    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18994    if test "x$IS_GNU_MAKE" = x; then
18995      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18996$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18997    else
18998      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18999      if test "x$IS_MODERN_MAKE" = x; then
19000        { $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
19001$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;}
19002      else
19003        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19004          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19005            MAKE_EXPECTED_ENV='cygwin'
19006          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19007            MAKE_EXPECTED_ENV='msys'
19008          else
19009            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19010          fi
19011          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19012          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19013        else
19014          # Not relevant for non-Windows
19015          IS_MAKE_CORRECT_ENV=true
19016        fi
19017        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19018          { $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
19019$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;}
19020        else
19021          FOUND_MAKE=$MAKE_CANDIDATE
19022
19023  # Only process if variable expands to non-empty
19024
19025  if test "x$FOUND_MAKE" != x; then
19026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19027
19028  # First separate the path from the arguments. This will split at the first
19029  # space.
19030  complete="$FOUND_MAKE"
19031  path="${complete%% *}"
19032  tmp="$complete EOL"
19033  arguments="${tmp#* }"
19034
19035  # Input might be given as Windows format, start by converting to
19036  # unix format.
19037  new_path=`$CYGPATH -u "$path"`
19038
19039  # Now try to locate executable using which
19040  new_path=`$WHICH "$new_path" 2> /dev/null`
19041  # bat and cmd files are not always considered executable in cygwin causing which
19042  # to not find them
19043  if test "x$new_path" = x \
19044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19046    new_path=`$CYGPATH -u "$path"`
19047  fi
19048  if test "x$new_path" = x; then
19049    # Oops. Which didn't find the executable.
19050    # The splitting of arguments from the executable at a space might have been incorrect,
19051    # since paths with space are more likely in Windows. Give it another try with the whole
19052    # argument.
19053    path="$complete"
19054    arguments="EOL"
19055    new_path=`$CYGPATH -u "$path"`
19056    new_path=`$WHICH "$new_path" 2> /dev/null`
19057    # bat and cmd files are not always considered executable in cygwin causing which
19058    # to not find them
19059    if test "x$new_path" = x \
19060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19062      new_path=`$CYGPATH -u "$path"`
19063    fi
19064    if test "x$new_path" = x; then
19065      # It's still not found. Now this is an unrecoverable error.
19066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19068      has_space=`$ECHO "$complete" | $GREP " "`
19069      if test "x$has_space" != x; then
19070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19072      fi
19073      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19074    fi
19075  fi
19076
19077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19080  # "foo.exe" is OK but "foo" is an error.
19081  #
19082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19083  # It is also a way to make sure we got the proper file name for the real test later on.
19084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19085  if test "x$test_shortpath" = x; then
19086    # Short path failed, file does not exist as specified.
19087    # Try adding .exe or .cmd
19088    if test -f "${new_path}.exe"; then
19089      input_to_shortpath="${new_path}.exe"
19090    elif test -f "${new_path}.cmd"; then
19091      input_to_shortpath="${new_path}.cmd"
19092    else
19093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19094$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19098    fi
19099  else
19100    input_to_shortpath="$new_path"
19101  fi
19102
19103  # Call helper function which possibly converts this using DOS-style short mode.
19104  # If so, the updated path is stored in $new_path.
19105  new_path="$input_to_shortpath"
19106
19107  input_path="$input_to_shortpath"
19108  # Check if we need to convert this using DOS-style short mode. If the path
19109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19110  # take no chances and rewrite it.
19111  # Note: m4 eats our [], so we need to use [ and ] instead.
19112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19113  if test "x$has_forbidden_chars" != x; then
19114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19118      # Going to short mode and back again did indeed matter. Since short mode is
19119      # case insensitive, let's make it lowercase to improve readability.
19120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19121      # Now convert it back to Unix-style (cygpath)
19122      input_path=`$CYGPATH -u "$shortmode_path"`
19123      new_path="$input_path"
19124    fi
19125  fi
19126
19127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19128  if test "x$test_cygdrive_prefix" = x; then
19129    # As a simple fix, exclude /usr/bin since it's not a real path.
19130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19132      # a path prefixed by /cygdrive for fixpath to work.
19133      new_path="$CYGWIN_ROOT_PATH$input_path"
19134    fi
19135  fi
19136
19137  # remove trailing .exe if any
19138  new_path="${new_path/%.exe/}"
19139
19140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19141
19142  # First separate the path from the arguments. This will split at the first
19143  # space.
19144  complete="$FOUND_MAKE"
19145  path="${complete%% *}"
19146  tmp="$complete EOL"
19147  arguments="${tmp#* }"
19148
19149  # Input might be given as Windows format, start by converting to
19150  # unix format.
19151  new_path="$path"
19152
19153  windows_path="$new_path"
19154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19155    unix_path=`$CYGPATH -u "$windows_path"`
19156    new_path="$unix_path"
19157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19159    new_path="$unix_path"
19160  fi
19161
19162
19163  # Now try to locate executable using which
19164  new_path=`$WHICH "$new_path" 2> /dev/null`
19165
19166  if test "x$new_path" = x; then
19167    # Oops. Which didn't find the executable.
19168    # The splitting of arguments from the executable at a space might have been incorrect,
19169    # since paths with space are more likely in Windows. Give it another try with the whole
19170    # argument.
19171    path="$complete"
19172    arguments="EOL"
19173    new_path="$path"
19174
19175  windows_path="$new_path"
19176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19177    unix_path=`$CYGPATH -u "$windows_path"`
19178    new_path="$unix_path"
19179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19181    new_path="$unix_path"
19182  fi
19183
19184
19185    new_path=`$WHICH "$new_path" 2> /dev/null`
19186    # bat and cmd files are not always considered executable in MSYS causing which
19187    # to not find them
19188    if test "x$new_path" = x \
19189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19191      new_path="$path"
19192
19193  windows_path="$new_path"
19194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19195    unix_path=`$CYGPATH -u "$windows_path"`
19196    new_path="$unix_path"
19197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19199    new_path="$unix_path"
19200  fi
19201
19202    fi
19203
19204    if test "x$new_path" = x; then
19205      # It's still not found. Now this is an unrecoverable error.
19206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19208      has_space=`$ECHO "$complete" | $GREP " "`
19209      if test "x$has_space" != x; then
19210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19212      fi
19213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19214    fi
19215  fi
19216
19217  # Now new_path has a complete unix path to the binary
19218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19219    # Keep paths in /bin as-is, but remove trailing .exe if any
19220    new_path="${new_path/%.exe/}"
19221    # Do not save /bin paths to all_fixpath_prefixes!
19222  else
19223    # Not in mixed or Windows style, start by that.
19224    new_path=`cmd //c echo $new_path`
19225
19226  input_path="$new_path"
19227  # Check if we need to convert this using DOS-style short mode. If the path
19228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19229  # take no chances and rewrite it.
19230  # Note: m4 eats our [], so we need to use [ and ] instead.
19231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19232  if test "x$has_forbidden_chars" != x; then
19233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19235  fi
19236
19237    # Output is in $new_path
19238
19239  windows_path="$new_path"
19240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241    unix_path=`$CYGPATH -u "$windows_path"`
19242    new_path="$unix_path"
19243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19245    new_path="$unix_path"
19246  fi
19247
19248    # remove trailing .exe if any
19249    new_path="${new_path/%.exe/}"
19250
19251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19253  fi
19254
19255    else
19256      # We're on a unix platform. Hooray! :)
19257      # First separate the path from the arguments. This will split at the first
19258      # space.
19259      complete="$FOUND_MAKE"
19260      path="${complete%% *}"
19261      tmp="$complete EOL"
19262      arguments="${tmp#* }"
19263
19264      # Cannot rely on the command "which" here since it doesn't always work.
19265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19266      if test -z "$is_absolute_path"; then
19267        # Path to executable is not absolute. Find it.
19268        IFS_save="$IFS"
19269        IFS=:
19270        for p in $PATH; do
19271          if test -f "$p/$path" && test -x "$p/$path"; then
19272            new_path="$p/$path"
19273            break
19274          fi
19275        done
19276        IFS="$IFS_save"
19277      else
19278        # This is an absolute path, we can use it without further modifications.
19279        new_path="$path"
19280      fi
19281
19282      if test "x$new_path" = x; then
19283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19284$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19285        has_space=`$ECHO "$complete" | $GREP " "`
19286        if test "x$has_space" != x; then
19287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19289        fi
19290        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19291      fi
19292    fi
19293
19294    # Now join together the path and the arguments once again
19295    if test "x$arguments" != xEOL; then
19296      new_complete="$new_path ${arguments% *}"
19297    else
19298      new_complete="$new_path"
19299    fi
19300
19301    if test "x$complete" != "x$new_complete"; then
19302      FOUND_MAKE="$new_complete"
19303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19304$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19305    fi
19306  fi
19307
19308        fi
19309      fi
19310    fi
19311  fi
19312
19313        fi
19314        PATH=$OLD_PATH
19315      fi
19316    fi
19317
19318    if test "x$FOUND_MAKE" = x; then
19319      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
19320    fi
19321
19322  else
19323    # The variable is set, but is it from the command line or the environment?
19324
19325    # Try to remove the string !MAKE! from our list.
19326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19328      # If it failed, the variable was not from the command line. Ignore it,
19329      # but warn the user (except for BASH, which is always set by the calling BASH).
19330      if test "xMAKE" != xBASH; then
19331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19332$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19333      fi
19334      # Try to locate tool using the code snippet
19335
19336    # Try our hardest to locate a correct version of GNU make
19337    for ac_prog in gmake
19338do
19339  # Extract the first word of "$ac_prog", so it can be a program name with args.
19340set dummy $ac_prog; ac_word=$2
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; }
19343if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  case $CHECK_GMAKE in
19347  [\\/]* | ?:[\\/]*)
19348  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19349  ;;
19350  *)
19351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19352for as_dir in $PATH
19353do
19354  IFS=$as_save_IFS
19355  test -z "$as_dir" && as_dir=.
19356    for ac_exec_ext in '' $ac_executable_extensions; do
19357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19358    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19360    break 2
19361  fi
19362done
19363  done
19364IFS=$as_save_IFS
19365
19366  ;;
19367esac
19368fi
19369CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19370if test -n "$CHECK_GMAKE"; then
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19372$as_echo "$CHECK_GMAKE" >&6; }
19373else
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19375$as_echo "no" >&6; }
19376fi
19377
19378
19379  test -n "$CHECK_GMAKE" && break
19380done
19381
19382
19383  MAKE_CANDIDATE=""$CHECK_GMAKE""
19384  DESCRIPTION="gmake in PATH"
19385
19386  # On Cygwin, we require a newer version of make than on other platforms
19387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19388    MAKE_VERSION_EXPR="-e 4\."
19389    MAKE_REQUIRED_VERSION="4.0"
19390   else
19391    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19392    MAKE_REQUIRED_VERSION="3.81"
19393  fi
19394
19395  if test "x$MAKE_CANDIDATE" != x; then
19396    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19397$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19398    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19399    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19400    if test "x$IS_GNU_MAKE" = x; then
19401      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19402$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19403    else
19404      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19405      if test "x$IS_MODERN_MAKE" = x; then
19406        { $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
19407$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;}
19408      else
19409        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19410          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19411            MAKE_EXPECTED_ENV='cygwin'
19412          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413            MAKE_EXPECTED_ENV='msys'
19414          else
19415            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19416          fi
19417          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19418          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19419        else
19420          # Not relevant for non-Windows
19421          IS_MAKE_CORRECT_ENV=true
19422        fi
19423        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19424          { $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
19425$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;}
19426        else
19427          FOUND_MAKE=$MAKE_CANDIDATE
19428
19429  # Only process if variable expands to non-empty
19430
19431  if test "x$FOUND_MAKE" != x; then
19432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19433
19434  # First separate the path from the arguments. This will split at the first
19435  # space.
19436  complete="$FOUND_MAKE"
19437  path="${complete%% *}"
19438  tmp="$complete EOL"
19439  arguments="${tmp#* }"
19440
19441  # Input might be given as Windows format, start by converting to
19442  # unix format.
19443  new_path=`$CYGPATH -u "$path"`
19444
19445  # Now try to locate executable using which
19446  new_path=`$WHICH "$new_path" 2> /dev/null`
19447  # bat and cmd files are not always considered executable in cygwin causing which
19448  # to not find them
19449  if test "x$new_path" = x \
19450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19452    new_path=`$CYGPATH -u "$path"`
19453  fi
19454  if test "x$new_path" = x; then
19455    # Oops. Which didn't find the executable.
19456    # The splitting of arguments from the executable at a space might have been incorrect,
19457    # since paths with space are more likely in Windows. Give it another try with the whole
19458    # argument.
19459    path="$complete"
19460    arguments="EOL"
19461    new_path=`$CYGPATH -u "$path"`
19462    new_path=`$WHICH "$new_path" 2> /dev/null`
19463    # bat and cmd files are not always considered executable in cygwin causing which
19464    # to not find them
19465    if test "x$new_path" = x \
19466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19468      new_path=`$CYGPATH -u "$path"`
19469    fi
19470    if test "x$new_path" = x; then
19471      # It's still not found. Now this is an unrecoverable error.
19472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19474      has_space=`$ECHO "$complete" | $GREP " "`
19475      if test "x$has_space" != x; then
19476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19478      fi
19479      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19480    fi
19481  fi
19482
19483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19486  # "foo.exe" is OK but "foo" is an error.
19487  #
19488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19489  # It is also a way to make sure we got the proper file name for the real test later on.
19490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19491  if test "x$test_shortpath" = x; then
19492    # Short path failed, file does not exist as specified.
19493    # Try adding .exe or .cmd
19494    if test -f "${new_path}.exe"; then
19495      input_to_shortpath="${new_path}.exe"
19496    elif test -f "${new_path}.cmd"; then
19497      input_to_shortpath="${new_path}.cmd"
19498    else
19499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19500$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19503      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19504    fi
19505  else
19506    input_to_shortpath="$new_path"
19507  fi
19508
19509  # Call helper function which possibly converts this using DOS-style short mode.
19510  # If so, the updated path is stored in $new_path.
19511  new_path="$input_to_shortpath"
19512
19513  input_path="$input_to_shortpath"
19514  # Check if we need to convert this using DOS-style short mode. If the path
19515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19516  # take no chances and rewrite it.
19517  # Note: m4 eats our [], so we need to use [ and ] instead.
19518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19519  if test "x$has_forbidden_chars" != x; then
19520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19524      # Going to short mode and back again did indeed matter. Since short mode is
19525      # case insensitive, let's make it lowercase to improve readability.
19526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19527      # Now convert it back to Unix-style (cygpath)
19528      input_path=`$CYGPATH -u "$shortmode_path"`
19529      new_path="$input_path"
19530    fi
19531  fi
19532
19533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19534  if test "x$test_cygdrive_prefix" = x; then
19535    # As a simple fix, exclude /usr/bin since it's not a real path.
19536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19538      # a path prefixed by /cygdrive for fixpath to work.
19539      new_path="$CYGWIN_ROOT_PATH$input_path"
19540    fi
19541  fi
19542
19543  # remove trailing .exe if any
19544  new_path="${new_path/%.exe/}"
19545
19546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19547
19548  # First separate the path from the arguments. This will split at the first
19549  # space.
19550  complete="$FOUND_MAKE"
19551  path="${complete%% *}"
19552  tmp="$complete EOL"
19553  arguments="${tmp#* }"
19554
19555  # Input might be given as Windows format, start by converting to
19556  # unix format.
19557  new_path="$path"
19558
19559  windows_path="$new_path"
19560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19561    unix_path=`$CYGPATH -u "$windows_path"`
19562    new_path="$unix_path"
19563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19565    new_path="$unix_path"
19566  fi
19567
19568
19569  # Now try to locate executable using which
19570  new_path=`$WHICH "$new_path" 2> /dev/null`
19571
19572  if test "x$new_path" = x; then
19573    # Oops. Which didn't find the executable.
19574    # The splitting of arguments from the executable at a space might have been incorrect,
19575    # since paths with space are more likely in Windows. Give it another try with the whole
19576    # argument.
19577    path="$complete"
19578    arguments="EOL"
19579    new_path="$path"
19580
19581  windows_path="$new_path"
19582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19583    unix_path=`$CYGPATH -u "$windows_path"`
19584    new_path="$unix_path"
19585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19587    new_path="$unix_path"
19588  fi
19589
19590
19591    new_path=`$WHICH "$new_path" 2> /dev/null`
19592    # bat and cmd files are not always considered executable in MSYS causing which
19593    # to not find them
19594    if test "x$new_path" = x \
19595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19597      new_path="$path"
19598
19599  windows_path="$new_path"
19600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19601    unix_path=`$CYGPATH -u "$windows_path"`
19602    new_path="$unix_path"
19603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19605    new_path="$unix_path"
19606  fi
19607
19608    fi
19609
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Now new_path has a complete unix path to the binary
19624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19625    # Keep paths in /bin as-is, but remove trailing .exe if any
19626    new_path="${new_path/%.exe/}"
19627    # Do not save /bin paths to all_fixpath_prefixes!
19628  else
19629    # Not in mixed or Windows style, start by that.
19630    new_path=`cmd //c echo $new_path`
19631
19632  input_path="$new_path"
19633  # Check if we need to convert this using DOS-style short mode. If the path
19634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19635  # take no chances and rewrite it.
19636  # Note: m4 eats our [], so we need to use [ and ] instead.
19637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19638  if test "x$has_forbidden_chars" != x; then
19639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19641  fi
19642
19643    # Output is in $new_path
19644
19645  windows_path="$new_path"
19646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19647    unix_path=`$CYGPATH -u "$windows_path"`
19648    new_path="$unix_path"
19649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19651    new_path="$unix_path"
19652  fi
19653
19654    # remove trailing .exe if any
19655    new_path="${new_path/%.exe/}"
19656
19657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19659  fi
19660
19661    else
19662      # We're on a unix platform. Hooray! :)
19663      # First separate the path from the arguments. This will split at the first
19664      # space.
19665      complete="$FOUND_MAKE"
19666      path="${complete%% *}"
19667      tmp="$complete EOL"
19668      arguments="${tmp#* }"
19669
19670      # Cannot rely on the command "which" here since it doesn't always work.
19671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19672      if test -z "$is_absolute_path"; then
19673        # Path to executable is not absolute. Find it.
19674        IFS_save="$IFS"
19675        IFS=:
19676        for p in $PATH; do
19677          if test -f "$p/$path" && test -x "$p/$path"; then
19678            new_path="$p/$path"
19679            break
19680          fi
19681        done
19682        IFS="$IFS_save"
19683      else
19684        # This is an absolute path, we can use it without further modifications.
19685        new_path="$path"
19686      fi
19687
19688      if test "x$new_path" = x; then
19689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19691        has_space=`$ECHO "$complete" | $GREP " "`
19692        if test "x$has_space" != x; then
19693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19695        fi
19696        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19697      fi
19698    fi
19699
19700    # Now join together the path and the arguments once again
19701    if test "x$arguments" != xEOL; then
19702      new_complete="$new_path ${arguments% *}"
19703    else
19704      new_complete="$new_path"
19705    fi
19706
19707    if test "x$complete" != "x$new_complete"; then
19708      FOUND_MAKE="$new_complete"
19709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19710$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19711    fi
19712  fi
19713
19714        fi
19715      fi
19716    fi
19717  fi
19718
19719
19720    if test "x$FOUND_MAKE" = x; then
19721      for ac_prog in make
19722do
19723  # Extract the first word of "$ac_prog", so it can be a program name with args.
19724set dummy $ac_prog; ac_word=$2
19725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19726$as_echo_n "checking for $ac_word... " >&6; }
19727if ${ac_cv_path_CHECK_MAKE+:} false; then :
19728  $as_echo_n "(cached) " >&6
19729else
19730  case $CHECK_MAKE in
19731  [\\/]* | ?:[\\/]*)
19732  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19733  ;;
19734  *)
19735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19736for as_dir in $PATH
19737do
19738  IFS=$as_save_IFS
19739  test -z "$as_dir" && as_dir=.
19740    for ac_exec_ext in '' $ac_executable_extensions; do
19741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19742    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19744    break 2
19745  fi
19746done
19747  done
19748IFS=$as_save_IFS
19749
19750  ;;
19751esac
19752fi
19753CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19754if test -n "$CHECK_MAKE"; then
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19756$as_echo "$CHECK_MAKE" >&6; }
19757else
19758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19759$as_echo "no" >&6; }
19760fi
19761
19762
19763  test -n "$CHECK_MAKE" && break
19764done
19765
19766
19767  MAKE_CANDIDATE=""$CHECK_MAKE""
19768  DESCRIPTION="make in PATH"
19769
19770  # On Cygwin, we require a newer version of make than on other platforms
19771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19772    MAKE_VERSION_EXPR="-e 4\."
19773    MAKE_REQUIRED_VERSION="4.0"
19774   else
19775    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19776    MAKE_REQUIRED_VERSION="3.81"
19777  fi
19778
19779  if test "x$MAKE_CANDIDATE" != x; then
19780    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19781$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19782    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19783    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19784    if test "x$IS_GNU_MAKE" = x; then
19785      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19786$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19787    else
19788      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19789      if test "x$IS_MODERN_MAKE" = x; then
19790        { $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
19791$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;}
19792      else
19793        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19794          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19795            MAKE_EXPECTED_ENV='cygwin'
19796          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19797            MAKE_EXPECTED_ENV='msys'
19798          else
19799            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19800          fi
19801          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19802          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19803        else
19804          # Not relevant for non-Windows
19805          IS_MAKE_CORRECT_ENV=true
19806        fi
19807        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19808          { $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
19809$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;}
19810        else
19811          FOUND_MAKE=$MAKE_CANDIDATE
19812
19813  # Only process if variable expands to non-empty
19814
19815  if test "x$FOUND_MAKE" != x; then
19816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19817
19818  # First separate the path from the arguments. This will split at the first
19819  # space.
19820  complete="$FOUND_MAKE"
19821  path="${complete%% *}"
19822  tmp="$complete EOL"
19823  arguments="${tmp#* }"
19824
19825  # Input might be given as Windows format, start by converting to
19826  # unix format.
19827  new_path=`$CYGPATH -u "$path"`
19828
19829  # Now try to locate executable using which
19830  new_path=`$WHICH "$new_path" 2> /dev/null`
19831  # bat and cmd files are not always considered executable in cygwin causing which
19832  # to not find them
19833  if test "x$new_path" = x \
19834      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19835      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19836    new_path=`$CYGPATH -u "$path"`
19837  fi
19838  if test "x$new_path" = x; then
19839    # Oops. Which didn't find the executable.
19840    # The splitting of arguments from the executable at a space might have been incorrect,
19841    # since paths with space are more likely in Windows. Give it another try with the whole
19842    # argument.
19843    path="$complete"
19844    arguments="EOL"
19845    new_path=`$CYGPATH -u "$path"`
19846    new_path=`$WHICH "$new_path" 2> /dev/null`
19847    # bat and cmd files are not always considered executable in cygwin causing which
19848    # to not find them
19849    if test "x$new_path" = x \
19850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19852      new_path=`$CYGPATH -u "$path"`
19853    fi
19854    if test "x$new_path" = x; then
19855      # It's still not found. Now this is an unrecoverable error.
19856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19858      has_space=`$ECHO "$complete" | $GREP " "`
19859      if test "x$has_space" != x; then
19860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19862      fi
19863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19864    fi
19865  fi
19866
19867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19870  # "foo.exe" is OK but "foo" is an error.
19871  #
19872  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19873  # It is also a way to make sure we got the proper file name for the real test later on.
19874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19875  if test "x$test_shortpath" = x; then
19876    # Short path failed, file does not exist as specified.
19877    # Try adding .exe or .cmd
19878    if test -f "${new_path}.exe"; then
19879      input_to_shortpath="${new_path}.exe"
19880    elif test -f "${new_path}.cmd"; then
19881      input_to_shortpath="${new_path}.cmd"
19882    else
19883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19888    fi
19889  else
19890    input_to_shortpath="$new_path"
19891  fi
19892
19893  # Call helper function which possibly converts this using DOS-style short mode.
19894  # If so, the updated path is stored in $new_path.
19895  new_path="$input_to_shortpath"
19896
19897  input_path="$input_to_shortpath"
19898  # Check if we need to convert this using DOS-style short mode. If the path
19899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19900  # take no chances and rewrite it.
19901  # Note: m4 eats our [], so we need to use [ and ] instead.
19902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19903  if test "x$has_forbidden_chars" != x; then
19904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19908      # Going to short mode and back again did indeed matter. Since short mode is
19909      # case insensitive, let's make it lowercase to improve readability.
19910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19911      # Now convert it back to Unix-style (cygpath)
19912      input_path=`$CYGPATH -u "$shortmode_path"`
19913      new_path="$input_path"
19914    fi
19915  fi
19916
19917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19918  if test "x$test_cygdrive_prefix" = x; then
19919    # As a simple fix, exclude /usr/bin since it's not a real path.
19920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19922      # a path prefixed by /cygdrive for fixpath to work.
19923      new_path="$CYGWIN_ROOT_PATH$input_path"
19924    fi
19925  fi
19926
19927  # remove trailing .exe if any
19928  new_path="${new_path/%.exe/}"
19929
19930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19931
19932  # First separate the path from the arguments. This will split at the first
19933  # space.
19934  complete="$FOUND_MAKE"
19935  path="${complete%% *}"
19936  tmp="$complete EOL"
19937  arguments="${tmp#* }"
19938
19939  # Input might be given as Windows format, start by converting to
19940  # unix format.
19941  new_path="$path"
19942
19943  windows_path="$new_path"
19944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19945    unix_path=`$CYGPATH -u "$windows_path"`
19946    new_path="$unix_path"
19947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19949    new_path="$unix_path"
19950  fi
19951
19952
19953  # Now try to locate executable using which
19954  new_path=`$WHICH "$new_path" 2> /dev/null`
19955
19956  if test "x$new_path" = x; then
19957    # Oops. Which didn't find the executable.
19958    # The splitting of arguments from the executable at a space might have been incorrect,
19959    # since paths with space are more likely in Windows. Give it another try with the whole
19960    # argument.
19961    path="$complete"
19962    arguments="EOL"
19963    new_path="$path"
19964
19965  windows_path="$new_path"
19966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19967    unix_path=`$CYGPATH -u "$windows_path"`
19968    new_path="$unix_path"
19969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19971    new_path="$unix_path"
19972  fi
19973
19974
19975    new_path=`$WHICH "$new_path" 2> /dev/null`
19976    # bat and cmd files are not always considered executable in MSYS causing which
19977    # to not find them
19978    if test "x$new_path" = x \
19979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981      new_path="$path"
19982
19983  windows_path="$new_path"
19984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19985    unix_path=`$CYGPATH -u "$windows_path"`
19986    new_path="$unix_path"
19987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19989    new_path="$unix_path"
19990  fi
19991
19992    fi
19993
19994    if test "x$new_path" = x; then
19995      # It's still not found. Now this is an unrecoverable error.
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19997$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19998      has_space=`$ECHO "$complete" | $GREP " "`
19999      if test "x$has_space" != x; then
20000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20002      fi
20003      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20004    fi
20005  fi
20006
20007  # Now new_path has a complete unix path to the binary
20008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20009    # Keep paths in /bin as-is, but remove trailing .exe if any
20010    new_path="${new_path/%.exe/}"
20011    # Do not save /bin paths to all_fixpath_prefixes!
20012  else
20013    # Not in mixed or Windows style, start by that.
20014    new_path=`cmd //c echo $new_path`
20015
20016  input_path="$new_path"
20017  # Check if we need to convert this using DOS-style short mode. If the path
20018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20019  # take no chances and rewrite it.
20020  # Note: m4 eats our [], so we need to use [ and ] instead.
20021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20022  if test "x$has_forbidden_chars" != x; then
20023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20025  fi
20026
20027    # Output is in $new_path
20028
20029  windows_path="$new_path"
20030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031    unix_path=`$CYGPATH -u "$windows_path"`
20032    new_path="$unix_path"
20033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20035    new_path="$unix_path"
20036  fi
20037
20038    # remove trailing .exe if any
20039    new_path="${new_path/%.exe/}"
20040
20041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20043  fi
20044
20045    else
20046      # We're on a unix platform. Hooray! :)
20047      # First separate the path from the arguments. This will split at the first
20048      # space.
20049      complete="$FOUND_MAKE"
20050      path="${complete%% *}"
20051      tmp="$complete EOL"
20052      arguments="${tmp#* }"
20053
20054      # Cannot rely on the command "which" here since it doesn't always work.
20055      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20056      if test -z "$is_absolute_path"; then
20057        # Path to executable is not absolute. Find it.
20058        IFS_save="$IFS"
20059        IFS=:
20060        for p in $PATH; do
20061          if test -f "$p/$path" && test -x "$p/$path"; then
20062            new_path="$p/$path"
20063            break
20064          fi
20065        done
20066        IFS="$IFS_save"
20067      else
20068        # This is an absolute path, we can use it without further modifications.
20069        new_path="$path"
20070      fi
20071
20072      if test "x$new_path" = x; then
20073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20074$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20075        has_space=`$ECHO "$complete" | $GREP " "`
20076        if test "x$has_space" != x; then
20077          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20079        fi
20080        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20081      fi
20082    fi
20083
20084    # Now join together the path and the arguments once again
20085    if test "x$arguments" != xEOL; then
20086      new_complete="$new_path ${arguments% *}"
20087    else
20088      new_complete="$new_path"
20089    fi
20090
20091    if test "x$complete" != "x$new_complete"; then
20092      FOUND_MAKE="$new_complete"
20093      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20094$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20095    fi
20096  fi
20097
20098        fi
20099      fi
20100    fi
20101  fi
20102
20103    fi
20104
20105    if test "x$FOUND_MAKE" = x; then
20106      if test "x$TOOLCHAIN_PATH" != x; then
20107        # We have a toolchain path, check that as well before giving up.
20108        OLD_PATH=$PATH
20109        PATH=$TOOLCHAIN_PATH:$PATH
20110        for ac_prog in gmake
20111do
20112  # Extract the first word of "$ac_prog", so it can be a program name with args.
20113set dummy $ac_prog; ac_word=$2
20114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20115$as_echo_n "checking for $ac_word... " >&6; }
20116if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20117  $as_echo_n "(cached) " >&6
20118else
20119  case $CHECK_TOOLSDIR_GMAKE in
20120  [\\/]* | ?:[\\/]*)
20121  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20122  ;;
20123  *)
20124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20125for as_dir in $PATH
20126do
20127  IFS=$as_save_IFS
20128  test -z "$as_dir" && as_dir=.
20129    for ac_exec_ext in '' $ac_executable_extensions; do
20130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20131    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20133    break 2
20134  fi
20135done
20136  done
20137IFS=$as_save_IFS
20138
20139  ;;
20140esac
20141fi
20142CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20143if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20145$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20146else
20147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20148$as_echo "no" >&6; }
20149fi
20150
20151
20152  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20153done
20154
20155
20156  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20157  DESCRIPTION="gmake in tools-dir"
20158
20159  # On Cygwin, we require a newer version of make than on other platforms
20160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20161    MAKE_VERSION_EXPR="-e 4\."
20162    MAKE_REQUIRED_VERSION="4.0"
20163   else
20164    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20165    MAKE_REQUIRED_VERSION="3.81"
20166  fi
20167
20168  if test "x$MAKE_CANDIDATE" != x; then
20169    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20170$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20171    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20172    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20173    if test "x$IS_GNU_MAKE" = x; then
20174      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20175$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20176    else
20177      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20178      if test "x$IS_MODERN_MAKE" = x; then
20179        { $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
20180$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;}
20181      else
20182        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20183          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20184            MAKE_EXPECTED_ENV='cygwin'
20185          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20186            MAKE_EXPECTED_ENV='msys'
20187          else
20188            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20189          fi
20190          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20191          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20192        else
20193          # Not relevant for non-Windows
20194          IS_MAKE_CORRECT_ENV=true
20195        fi
20196        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20197          { $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
20198$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;}
20199        else
20200          FOUND_MAKE=$MAKE_CANDIDATE
20201
20202  # Only process if variable expands to non-empty
20203
20204  if test "x$FOUND_MAKE" != x; then
20205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20206
20207  # First separate the path from the arguments. This will split at the first
20208  # space.
20209  complete="$FOUND_MAKE"
20210  path="${complete%% *}"
20211  tmp="$complete EOL"
20212  arguments="${tmp#* }"
20213
20214  # Input might be given as Windows format, start by converting to
20215  # unix format.
20216  new_path=`$CYGPATH -u "$path"`
20217
20218  # Now try to locate executable using which
20219  new_path=`$WHICH "$new_path" 2> /dev/null`
20220  # bat and cmd files are not always considered executable in cygwin causing which
20221  # to not find them
20222  if test "x$new_path" = x \
20223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20225    new_path=`$CYGPATH -u "$path"`
20226  fi
20227  if test "x$new_path" = x; then
20228    # Oops. Which didn't find the executable.
20229    # The splitting of arguments from the executable at a space might have been incorrect,
20230    # since paths with space are more likely in Windows. Give it another try with the whole
20231    # argument.
20232    path="$complete"
20233    arguments="EOL"
20234    new_path=`$CYGPATH -u "$path"`
20235    new_path=`$WHICH "$new_path" 2> /dev/null`
20236    # bat and cmd files are not always considered executable in cygwin causing which
20237    # to not find them
20238    if test "x$new_path" = x \
20239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20241      new_path=`$CYGPATH -u "$path"`
20242    fi
20243    if test "x$new_path" = x; then
20244      # It's still not found. Now this is an unrecoverable error.
20245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20247      has_space=`$ECHO "$complete" | $GREP " "`
20248      if test "x$has_space" != x; then
20249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20251      fi
20252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20253    fi
20254  fi
20255
20256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20259  # "foo.exe" is OK but "foo" is an error.
20260  #
20261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20262  # It is also a way to make sure we got the proper file name for the real test later on.
20263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20264  if test "x$test_shortpath" = x; then
20265    # Short path failed, file does not exist as specified.
20266    # Try adding .exe or .cmd
20267    if test -f "${new_path}.exe"; then
20268      input_to_shortpath="${new_path}.exe"
20269    elif test -f "${new_path}.cmd"; then
20270      input_to_shortpath="${new_path}.cmd"
20271    else
20272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20276      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20277    fi
20278  else
20279    input_to_shortpath="$new_path"
20280  fi
20281
20282  # Call helper function which possibly converts this using DOS-style short mode.
20283  # If so, the updated path is stored in $new_path.
20284  new_path="$input_to_shortpath"
20285
20286  input_path="$input_to_shortpath"
20287  # Check if we need to convert this using DOS-style short mode. If the path
20288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20289  # take no chances and rewrite it.
20290  # Note: m4 eats our [], so we need to use [ and ] instead.
20291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20292  if test "x$has_forbidden_chars" != x; then
20293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20297      # Going to short mode and back again did indeed matter. Since short mode is
20298      # case insensitive, let's make it lowercase to improve readability.
20299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20300      # Now convert it back to Unix-style (cygpath)
20301      input_path=`$CYGPATH -u "$shortmode_path"`
20302      new_path="$input_path"
20303    fi
20304  fi
20305
20306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20307  if test "x$test_cygdrive_prefix" = x; then
20308    # As a simple fix, exclude /usr/bin since it's not a real path.
20309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20311      # a path prefixed by /cygdrive for fixpath to work.
20312      new_path="$CYGWIN_ROOT_PATH$input_path"
20313    fi
20314  fi
20315
20316  # remove trailing .exe if any
20317  new_path="${new_path/%.exe/}"
20318
20319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20320
20321  # First separate the path from the arguments. This will split at the first
20322  # space.
20323  complete="$FOUND_MAKE"
20324  path="${complete%% *}"
20325  tmp="$complete EOL"
20326  arguments="${tmp#* }"
20327
20328  # Input might be given as Windows format, start by converting to
20329  # unix format.
20330  new_path="$path"
20331
20332  windows_path="$new_path"
20333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20334    unix_path=`$CYGPATH -u "$windows_path"`
20335    new_path="$unix_path"
20336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20338    new_path="$unix_path"
20339  fi
20340
20341
20342  # Now try to locate executable using which
20343  new_path=`$WHICH "$new_path" 2> /dev/null`
20344
20345  if test "x$new_path" = x; then
20346    # Oops. Which didn't find the executable.
20347    # The splitting of arguments from the executable at a space might have been incorrect,
20348    # since paths with space are more likely in Windows. Give it another try with the whole
20349    # argument.
20350    path="$complete"
20351    arguments="EOL"
20352    new_path="$path"
20353
20354  windows_path="$new_path"
20355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20356    unix_path=`$CYGPATH -u "$windows_path"`
20357    new_path="$unix_path"
20358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20360    new_path="$unix_path"
20361  fi
20362
20363
20364    new_path=`$WHICH "$new_path" 2> /dev/null`
20365    # bat and cmd files are not always considered executable in MSYS causing which
20366    # to not find them
20367    if test "x$new_path" = x \
20368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20370      new_path="$path"
20371
20372  windows_path="$new_path"
20373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20374    unix_path=`$CYGPATH -u "$windows_path"`
20375    new_path="$unix_path"
20376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20378    new_path="$unix_path"
20379  fi
20380
20381    fi
20382
20383    if test "x$new_path" = x; then
20384      # It's still not found. Now this is an unrecoverable error.
20385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20386$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20387      has_space=`$ECHO "$complete" | $GREP " "`
20388      if test "x$has_space" != x; then
20389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20391      fi
20392      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20393    fi
20394  fi
20395
20396  # Now new_path has a complete unix path to the binary
20397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20398    # Keep paths in /bin as-is, but remove trailing .exe if any
20399    new_path="${new_path/%.exe/}"
20400    # Do not save /bin paths to all_fixpath_prefixes!
20401  else
20402    # Not in mixed or Windows style, start by that.
20403    new_path=`cmd //c echo $new_path`
20404
20405  input_path="$new_path"
20406  # Check if we need to convert this using DOS-style short mode. If the path
20407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20408  # take no chances and rewrite it.
20409  # Note: m4 eats our [], so we need to use [ and ] instead.
20410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20411  if test "x$has_forbidden_chars" != x; then
20412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20414  fi
20415
20416    # Output is in $new_path
20417
20418  windows_path="$new_path"
20419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20420    unix_path=`$CYGPATH -u "$windows_path"`
20421    new_path="$unix_path"
20422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20424    new_path="$unix_path"
20425  fi
20426
20427    # remove trailing .exe if any
20428    new_path="${new_path/%.exe/}"
20429
20430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20432  fi
20433
20434    else
20435      # We're on a unix platform. Hooray! :)
20436      # First separate the path from the arguments. This will split at the first
20437      # space.
20438      complete="$FOUND_MAKE"
20439      path="${complete%% *}"
20440      tmp="$complete EOL"
20441      arguments="${tmp#* }"
20442
20443      # Cannot rely on the command "which" here since it doesn't always work.
20444      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20445      if test -z "$is_absolute_path"; then
20446        # Path to executable is not absolute. Find it.
20447        IFS_save="$IFS"
20448        IFS=:
20449        for p in $PATH; do
20450          if test -f "$p/$path" && test -x "$p/$path"; then
20451            new_path="$p/$path"
20452            break
20453          fi
20454        done
20455        IFS="$IFS_save"
20456      else
20457        # This is an absolute path, we can use it without further modifications.
20458        new_path="$path"
20459      fi
20460
20461      if test "x$new_path" = x; then
20462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20464        has_space=`$ECHO "$complete" | $GREP " "`
20465        if test "x$has_space" != x; then
20466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20468        fi
20469        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20470      fi
20471    fi
20472
20473    # Now join together the path and the arguments once again
20474    if test "x$arguments" != xEOL; then
20475      new_complete="$new_path ${arguments% *}"
20476    else
20477      new_complete="$new_path"
20478    fi
20479
20480    if test "x$complete" != "x$new_complete"; then
20481      FOUND_MAKE="$new_complete"
20482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20483$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20484    fi
20485  fi
20486
20487        fi
20488      fi
20489    fi
20490  fi
20491
20492        if test "x$FOUND_MAKE" = x; then
20493          for ac_prog in make
20494do
20495  # Extract the first word of "$ac_prog", so it can be a program name with args.
20496set dummy $ac_prog; ac_word=$2
20497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20498$as_echo_n "checking for $ac_word... " >&6; }
20499if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20500  $as_echo_n "(cached) " >&6
20501else
20502  case $CHECK_TOOLSDIR_MAKE in
20503  [\\/]* | ?:[\\/]*)
20504  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20505  ;;
20506  *)
20507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20508for as_dir in $PATH
20509do
20510  IFS=$as_save_IFS
20511  test -z "$as_dir" && as_dir=.
20512    for ac_exec_ext in '' $ac_executable_extensions; do
20513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20514    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20516    break 2
20517  fi
20518done
20519  done
20520IFS=$as_save_IFS
20521
20522  ;;
20523esac
20524fi
20525CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20526if test -n "$CHECK_TOOLSDIR_MAKE"; then
20527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20528$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20529else
20530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20531$as_echo "no" >&6; }
20532fi
20533
20534
20535  test -n "$CHECK_TOOLSDIR_MAKE" && break
20536done
20537
20538
20539  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20540  DESCRIPTION="make in tools-dir"
20541
20542  # On Cygwin, we require a newer version of make than on other platforms
20543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20544    MAKE_VERSION_EXPR="-e 4\."
20545    MAKE_REQUIRED_VERSION="4.0"
20546   else
20547    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20548    MAKE_REQUIRED_VERSION="3.81"
20549  fi
20550
20551  if test "x$MAKE_CANDIDATE" != x; then
20552    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20553$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20554    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20555    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20556    if test "x$IS_GNU_MAKE" = x; then
20557      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20558$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20559    else
20560      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20561      if test "x$IS_MODERN_MAKE" = x; then
20562        { $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
20563$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;}
20564      else
20565        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20566          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20567            MAKE_EXPECTED_ENV='cygwin'
20568          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20569            MAKE_EXPECTED_ENV='msys'
20570          else
20571            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20572          fi
20573          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20574          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20575        else
20576          # Not relevant for non-Windows
20577          IS_MAKE_CORRECT_ENV=true
20578        fi
20579        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20580          { $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
20581$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;}
20582        else
20583          FOUND_MAKE=$MAKE_CANDIDATE
20584
20585  # Only process if variable expands to non-empty
20586
20587  if test "x$FOUND_MAKE" != x; then
20588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20589
20590  # First separate the path from the arguments. This will split at the first
20591  # space.
20592  complete="$FOUND_MAKE"
20593  path="${complete%% *}"
20594  tmp="$complete EOL"
20595  arguments="${tmp#* }"
20596
20597  # Input might be given as Windows format, start by converting to
20598  # unix format.
20599  new_path=`$CYGPATH -u "$path"`
20600
20601  # Now try to locate executable using which
20602  new_path=`$WHICH "$new_path" 2> /dev/null`
20603  # bat and cmd files are not always considered executable in cygwin causing which
20604  # to not find them
20605  if test "x$new_path" = x \
20606      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20607      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20608    new_path=`$CYGPATH -u "$path"`
20609  fi
20610  if test "x$new_path" = x; then
20611    # Oops. Which didn't find the executable.
20612    # The splitting of arguments from the executable at a space might have been incorrect,
20613    # since paths with space are more likely in Windows. Give it another try with the whole
20614    # argument.
20615    path="$complete"
20616    arguments="EOL"
20617    new_path=`$CYGPATH -u "$path"`
20618    new_path=`$WHICH "$new_path" 2> /dev/null`
20619    # bat and cmd files are not always considered executable in cygwin causing which
20620    # to not find them
20621    if test "x$new_path" = x \
20622        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20623        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20624      new_path=`$CYGPATH -u "$path"`
20625    fi
20626    if test "x$new_path" = x; then
20627      # It's still not found. Now this is an unrecoverable error.
20628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20630      has_space=`$ECHO "$complete" | $GREP " "`
20631      if test "x$has_space" != x; then
20632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20634      fi
20635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20636    fi
20637  fi
20638
20639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20642  # "foo.exe" is OK but "foo" is an error.
20643  #
20644  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20645  # It is also a way to make sure we got the proper file name for the real test later on.
20646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20647  if test "x$test_shortpath" = x; then
20648    # Short path failed, file does not exist as specified.
20649    # Try adding .exe or .cmd
20650    if test -f "${new_path}.exe"; then
20651      input_to_shortpath="${new_path}.exe"
20652    elif test -f "${new_path}.cmd"; then
20653      input_to_shortpath="${new_path}.cmd"
20654    else
20655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20657      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20658$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20659      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20660    fi
20661  else
20662    input_to_shortpath="$new_path"
20663  fi
20664
20665  # Call helper function which possibly converts this using DOS-style short mode.
20666  # If so, the updated path is stored in $new_path.
20667  new_path="$input_to_shortpath"
20668
20669  input_path="$input_to_shortpath"
20670  # Check if we need to convert this using DOS-style short mode. If the path
20671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20672  # take no chances and rewrite it.
20673  # Note: m4 eats our [], so we need to use [ and ] instead.
20674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20675  if test "x$has_forbidden_chars" != x; then
20676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20680      # Going to short mode and back again did indeed matter. Since short mode is
20681      # case insensitive, let's make it lowercase to improve readability.
20682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20683      # Now convert it back to Unix-style (cygpath)
20684      input_path=`$CYGPATH -u "$shortmode_path"`
20685      new_path="$input_path"
20686    fi
20687  fi
20688
20689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20690  if test "x$test_cygdrive_prefix" = x; then
20691    # As a simple fix, exclude /usr/bin since it's not a real path.
20692    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20694      # a path prefixed by /cygdrive for fixpath to work.
20695      new_path="$CYGWIN_ROOT_PATH$input_path"
20696    fi
20697  fi
20698
20699  # remove trailing .exe if any
20700  new_path="${new_path/%.exe/}"
20701
20702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20703
20704  # First separate the path from the arguments. This will split at the first
20705  # space.
20706  complete="$FOUND_MAKE"
20707  path="${complete%% *}"
20708  tmp="$complete EOL"
20709  arguments="${tmp#* }"
20710
20711  # Input might be given as Windows format, start by converting to
20712  # unix format.
20713  new_path="$path"
20714
20715  windows_path="$new_path"
20716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20717    unix_path=`$CYGPATH -u "$windows_path"`
20718    new_path="$unix_path"
20719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20721    new_path="$unix_path"
20722  fi
20723
20724
20725  # Now try to locate executable using which
20726  new_path=`$WHICH "$new_path" 2> /dev/null`
20727
20728  if test "x$new_path" = x; then
20729    # Oops. Which didn't find the executable.
20730    # The splitting of arguments from the executable at a space might have been incorrect,
20731    # since paths with space are more likely in Windows. Give it another try with the whole
20732    # argument.
20733    path="$complete"
20734    arguments="EOL"
20735    new_path="$path"
20736
20737  windows_path="$new_path"
20738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739    unix_path=`$CYGPATH -u "$windows_path"`
20740    new_path="$unix_path"
20741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20743    new_path="$unix_path"
20744  fi
20745
20746
20747    new_path=`$WHICH "$new_path" 2> /dev/null`
20748    # bat and cmd files are not always considered executable in MSYS causing which
20749    # to not find them
20750    if test "x$new_path" = x \
20751        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20752        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20753      new_path="$path"
20754
20755  windows_path="$new_path"
20756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757    unix_path=`$CYGPATH -u "$windows_path"`
20758    new_path="$unix_path"
20759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20761    new_path="$unix_path"
20762  fi
20763
20764    fi
20765
20766    if test "x$new_path" = x; then
20767      # It's still not found. Now this is an unrecoverable error.
20768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20769$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20770      has_space=`$ECHO "$complete" | $GREP " "`
20771      if test "x$has_space" != x; then
20772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20774      fi
20775      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20776    fi
20777  fi
20778
20779  # Now new_path has a complete unix path to the binary
20780  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20781    # Keep paths in /bin as-is, but remove trailing .exe if any
20782    new_path="${new_path/%.exe/}"
20783    # Do not save /bin paths to all_fixpath_prefixes!
20784  else
20785    # Not in mixed or Windows style, start by that.
20786    new_path=`cmd //c echo $new_path`
20787
20788  input_path="$new_path"
20789  # Check if we need to convert this using DOS-style short mode. If the path
20790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20791  # take no chances and rewrite it.
20792  # Note: m4 eats our [], so we need to use [ and ] instead.
20793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20794  if test "x$has_forbidden_chars" != x; then
20795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20797  fi
20798
20799    # Output is in $new_path
20800
20801  windows_path="$new_path"
20802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20803    unix_path=`$CYGPATH -u "$windows_path"`
20804    new_path="$unix_path"
20805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20807    new_path="$unix_path"
20808  fi
20809
20810    # remove trailing .exe if any
20811    new_path="${new_path/%.exe/}"
20812
20813    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20814    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20815  fi
20816
20817    else
20818      # We're on a unix platform. Hooray! :)
20819      # First separate the path from the arguments. This will split at the first
20820      # space.
20821      complete="$FOUND_MAKE"
20822      path="${complete%% *}"
20823      tmp="$complete EOL"
20824      arguments="${tmp#* }"
20825
20826      # Cannot rely on the command "which" here since it doesn't always work.
20827      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20828      if test -z "$is_absolute_path"; then
20829        # Path to executable is not absolute. Find it.
20830        IFS_save="$IFS"
20831        IFS=:
20832        for p in $PATH; do
20833          if test -f "$p/$path" && test -x "$p/$path"; then
20834            new_path="$p/$path"
20835            break
20836          fi
20837        done
20838        IFS="$IFS_save"
20839      else
20840        # This is an absolute path, we can use it without further modifications.
20841        new_path="$path"
20842      fi
20843
20844      if test "x$new_path" = x; then
20845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20847        has_space=`$ECHO "$complete" | $GREP " "`
20848        if test "x$has_space" != x; then
20849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20851        fi
20852        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20853      fi
20854    fi
20855
20856    # Now join together the path and the arguments once again
20857    if test "x$arguments" != xEOL; then
20858      new_complete="$new_path ${arguments% *}"
20859    else
20860      new_complete="$new_path"
20861    fi
20862
20863    if test "x$complete" != "x$new_complete"; then
20864      FOUND_MAKE="$new_complete"
20865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20866$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20867    fi
20868  fi
20869
20870        fi
20871      fi
20872    fi
20873  fi
20874
20875        fi
20876        PATH=$OLD_PATH
20877      fi
20878    fi
20879
20880    if test "x$FOUND_MAKE" = x; then
20881      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
20882    fi
20883
20884    else
20885      # If it succeeded, then it was overridden by the user. We will use it
20886      # for the tool.
20887
20888      # First remove it from the list of overridden variables, so we can test
20889      # for unknown variables in the end.
20890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20891
20892      # Check if we try to supply an empty value
20893      if test "x$MAKE" = x; then
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20895$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20897$as_echo_n "checking for MAKE... " >&6; }
20898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20899$as_echo "disabled" >&6; }
20900      else
20901        # Check if the provided tool contains a complete path.
20902        tool_specified="$MAKE"
20903        tool_basename="${tool_specified##*/}"
20904        if test "x$tool_basename" = "x$tool_specified"; then
20905          # A command without a complete path is provided, search $PATH.
20906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20907$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20908          # Extract the first word of "$tool_basename", so it can be a program name with args.
20909set dummy $tool_basename; ac_word=$2
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20911$as_echo_n "checking for $ac_word... " >&6; }
20912if ${ac_cv_path_MAKE+:} false; then :
20913  $as_echo_n "(cached) " >&6
20914else
20915  case $MAKE in
20916  [\\/]* | ?:[\\/]*)
20917  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20918  ;;
20919  *)
20920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20921for as_dir in $PATH
20922do
20923  IFS=$as_save_IFS
20924  test -z "$as_dir" && as_dir=.
20925    for ac_exec_ext in '' $ac_executable_extensions; do
20926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20927    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20929    break 2
20930  fi
20931done
20932  done
20933IFS=$as_save_IFS
20934
20935  ;;
20936esac
20937fi
20938MAKE=$ac_cv_path_MAKE
20939if test -n "$MAKE"; then
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20941$as_echo "$MAKE" >&6; }
20942else
20943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20944$as_echo "no" >&6; }
20945fi
20946
20947
20948          if test "x$MAKE" = x; then
20949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20950          fi
20951        else
20952          # Otherwise we believe it is a complete path. Use it as it is.
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20954$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20956$as_echo_n "checking for MAKE... " >&6; }
20957          if test ! -x "$tool_specified"; then
20958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20959$as_echo "not found" >&6; }
20960            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20961          fi
20962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20963$as_echo "$tool_specified" >&6; }
20964        fi
20965      fi
20966    fi
20967
20968    # If MAKE was set by user, verify the version
20969
20970  MAKE_CANDIDATE=""$MAKE""
20971  DESCRIPTION="user supplied MAKE=$MAKE"
20972
20973  # On Cygwin, we require a newer version of make than on other platforms
20974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20975    MAKE_VERSION_EXPR="-e 4\."
20976    MAKE_REQUIRED_VERSION="4.0"
20977   else
20978    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20979    MAKE_REQUIRED_VERSION="3.81"
20980  fi
20981
20982  if test "x$MAKE_CANDIDATE" != x; then
20983    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20984$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20985    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20986    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20987    if test "x$IS_GNU_MAKE" = x; then
20988      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20989$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20990    else
20991      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20992      if test "x$IS_MODERN_MAKE" = x; then
20993        { $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
20994$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;}
20995      else
20996        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20997          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998            MAKE_EXPECTED_ENV='cygwin'
20999          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21000            MAKE_EXPECTED_ENV='msys'
21001          else
21002            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21003          fi
21004          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21005          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21006        else
21007          # Not relevant for non-Windows
21008          IS_MAKE_CORRECT_ENV=true
21009        fi
21010        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21011          { $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
21012$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;}
21013        else
21014          FOUND_MAKE=$MAKE_CANDIDATE
21015
21016  # Only process if variable expands to non-empty
21017
21018  if test "x$FOUND_MAKE" != x; then
21019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21020
21021  # First separate the path from the arguments. This will split at the first
21022  # space.
21023  complete="$FOUND_MAKE"
21024  path="${complete%% *}"
21025  tmp="$complete EOL"
21026  arguments="${tmp#* }"
21027
21028  # Input might be given as Windows format, start by converting to
21029  # unix format.
21030  new_path=`$CYGPATH -u "$path"`
21031
21032  # Now try to locate executable using which
21033  new_path=`$WHICH "$new_path" 2> /dev/null`
21034  # bat and cmd files are not always considered executable in cygwin causing which
21035  # to not find them
21036  if test "x$new_path" = x \
21037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21039    new_path=`$CYGPATH -u "$path"`
21040  fi
21041  if test "x$new_path" = x; then
21042    # Oops. Which didn't find the executable.
21043    # The splitting of arguments from the executable at a space might have been incorrect,
21044    # since paths with space are more likely in Windows. Give it another try with the whole
21045    # argument.
21046    path="$complete"
21047    arguments="EOL"
21048    new_path=`$CYGPATH -u "$path"`
21049    new_path=`$WHICH "$new_path" 2> /dev/null`
21050    # bat and cmd files are not always considered executable in cygwin causing which
21051    # to not find them
21052    if test "x$new_path" = x \
21053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21055      new_path=`$CYGPATH -u "$path"`
21056    fi
21057    if test "x$new_path" = x; then
21058      # It's still not found. Now this is an unrecoverable error.
21059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21061      has_space=`$ECHO "$complete" | $GREP " "`
21062      if test "x$has_space" != x; then
21063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21065      fi
21066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21067    fi
21068  fi
21069
21070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21073  # "foo.exe" is OK but "foo" is an error.
21074  #
21075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21076  # It is also a way to make sure we got the proper file name for the real test later on.
21077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21078  if test "x$test_shortpath" = x; then
21079    # Short path failed, file does not exist as specified.
21080    # Try adding .exe or .cmd
21081    if test -f "${new_path}.exe"; then
21082      input_to_shortpath="${new_path}.exe"
21083    elif test -f "${new_path}.cmd"; then
21084      input_to_shortpath="${new_path}.cmd"
21085    else
21086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21091    fi
21092  else
21093    input_to_shortpath="$new_path"
21094  fi
21095
21096  # Call helper function which possibly converts this using DOS-style short mode.
21097  # If so, the updated path is stored in $new_path.
21098  new_path="$input_to_shortpath"
21099
21100  input_path="$input_to_shortpath"
21101  # Check if we need to convert this using DOS-style short mode. If the path
21102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21103  # take no chances and rewrite it.
21104  # Note: m4 eats our [], so we need to use [ and ] instead.
21105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21106  if test "x$has_forbidden_chars" != x; then
21107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21111      # Going to short mode and back again did indeed matter. Since short mode is
21112      # case insensitive, let's make it lowercase to improve readability.
21113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21114      # Now convert it back to Unix-style (cygpath)
21115      input_path=`$CYGPATH -u "$shortmode_path"`
21116      new_path="$input_path"
21117    fi
21118  fi
21119
21120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21121  if test "x$test_cygdrive_prefix" = x; then
21122    # As a simple fix, exclude /usr/bin since it's not a real path.
21123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21125      # a path prefixed by /cygdrive for fixpath to work.
21126      new_path="$CYGWIN_ROOT_PATH$input_path"
21127    fi
21128  fi
21129
21130  # remove trailing .exe if any
21131  new_path="${new_path/%.exe/}"
21132
21133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21134
21135  # First separate the path from the arguments. This will split at the first
21136  # space.
21137  complete="$FOUND_MAKE"
21138  path="${complete%% *}"
21139  tmp="$complete EOL"
21140  arguments="${tmp#* }"
21141
21142  # Input might be given as Windows format, start by converting to
21143  # unix format.
21144  new_path="$path"
21145
21146  windows_path="$new_path"
21147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21148    unix_path=`$CYGPATH -u "$windows_path"`
21149    new_path="$unix_path"
21150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21152    new_path="$unix_path"
21153  fi
21154
21155
21156  # Now try to locate executable using which
21157  new_path=`$WHICH "$new_path" 2> /dev/null`
21158
21159  if test "x$new_path" = x; then
21160    # Oops. Which didn't find the executable.
21161    # The splitting of arguments from the executable at a space might have been incorrect,
21162    # since paths with space are more likely in Windows. Give it another try with the whole
21163    # argument.
21164    path="$complete"
21165    arguments="EOL"
21166    new_path="$path"
21167
21168  windows_path="$new_path"
21169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21170    unix_path=`$CYGPATH -u "$windows_path"`
21171    new_path="$unix_path"
21172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21174    new_path="$unix_path"
21175  fi
21176
21177
21178    new_path=`$WHICH "$new_path" 2> /dev/null`
21179    # bat and cmd files are not always considered executable in MSYS causing which
21180    # to not find them
21181    if test "x$new_path" = x \
21182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21184      new_path="$path"
21185
21186  windows_path="$new_path"
21187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21188    unix_path=`$CYGPATH -u "$windows_path"`
21189    new_path="$unix_path"
21190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21192    new_path="$unix_path"
21193  fi
21194
21195    fi
21196
21197    if test "x$new_path" = x; then
21198      # It's still not found. Now this is an unrecoverable error.
21199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21201      has_space=`$ECHO "$complete" | $GREP " "`
21202      if test "x$has_space" != x; then
21203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21205      fi
21206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21207    fi
21208  fi
21209
21210  # Now new_path has a complete unix path to the binary
21211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21212    # Keep paths in /bin as-is, but remove trailing .exe if any
21213    new_path="${new_path/%.exe/}"
21214    # Do not save /bin paths to all_fixpath_prefixes!
21215  else
21216    # Not in mixed or Windows style, start by that.
21217    new_path=`cmd //c echo $new_path`
21218
21219  input_path="$new_path"
21220  # Check if we need to convert this using DOS-style short mode. If the path
21221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21222  # take no chances and rewrite it.
21223  # Note: m4 eats our [], so we need to use [ and ] instead.
21224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21225  if test "x$has_forbidden_chars" != x; then
21226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21228  fi
21229
21230    # Output is in $new_path
21231
21232  windows_path="$new_path"
21233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21234    unix_path=`$CYGPATH -u "$windows_path"`
21235    new_path="$unix_path"
21236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21238    new_path="$unix_path"
21239  fi
21240
21241    # remove trailing .exe if any
21242    new_path="${new_path/%.exe/}"
21243
21244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21246  fi
21247
21248    else
21249      # We're on a unix platform. Hooray! :)
21250      # First separate the path from the arguments. This will split at the first
21251      # space.
21252      complete="$FOUND_MAKE"
21253      path="${complete%% *}"
21254      tmp="$complete EOL"
21255      arguments="${tmp#* }"
21256
21257      # Cannot rely on the command "which" here since it doesn't always work.
21258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21259      if test -z "$is_absolute_path"; then
21260        # Path to executable is not absolute. Find it.
21261        IFS_save="$IFS"
21262        IFS=:
21263        for p in $PATH; do
21264          if test -f "$p/$path" && test -x "$p/$path"; then
21265            new_path="$p/$path"
21266            break
21267          fi
21268        done
21269        IFS="$IFS_save"
21270      else
21271        # This is an absolute path, we can use it without further modifications.
21272        new_path="$path"
21273      fi
21274
21275      if test "x$new_path" = x; then
21276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21278        has_space=`$ECHO "$complete" | $GREP " "`
21279        if test "x$has_space" != x; then
21280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21282        fi
21283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21284      fi
21285    fi
21286
21287    # Now join together the path and the arguments once again
21288    if test "x$arguments" != xEOL; then
21289      new_complete="$new_path ${arguments% *}"
21290    else
21291      new_complete="$new_path"
21292    fi
21293
21294    if test "x$complete" != "x$new_complete"; then
21295      FOUND_MAKE="$new_complete"
21296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21298    fi
21299  fi
21300
21301        fi
21302      fi
21303    fi
21304  fi
21305
21306    if test "x$FOUND_MAKE" = x; then
21307      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21308    fi
21309
21310  fi
21311
21312
21313  MAKE=$FOUND_MAKE
21314
21315  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21316$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21317
21318
21319  # Check if make supports the output sync option and if so, setup using it.
21320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21321$as_echo_n "checking if make --output-sync is supported... " >&6; }
21322  if $MAKE --version -O > /dev/null 2>&1; then
21323    OUTPUT_SYNC_SUPPORTED=true
21324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21325$as_echo "yes" >&6; }
21326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21327$as_echo_n "checking for output-sync value... " >&6; }
21328
21329# Check whether --with-output-sync was given.
21330if test "${with_output_sync+set}" = set; then :
21331  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21332fi
21333
21334    if test "x$OUTPUT_SYNC" = "x"; then
21335      OUTPUT_SYNC=none
21336    fi
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21338$as_echo "$OUTPUT_SYNC" >&6; }
21339    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21340      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21341    fi
21342  else
21343    OUTPUT_SYNC_SUPPORTED=false
21344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346  fi
21347
21348
21349
21350
21351
21352
21353  # Test if find supports -delete
21354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21355$as_echo_n "checking if find supports -delete... " >&6; }
21356  FIND_DELETE="-delete"
21357
21358  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21359
21360  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21361
21362  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21363  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21364    # No, it does not.
21365    $RM $DELETEDIR/TestIfFindSupportsDelete
21366    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21367      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21368      FIND_DELETE="-print | $XARGS $RM"
21369    else
21370      FIND_DELETE="-exec $RM \{\} \+"
21371    fi
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21373$as_echo "no" >&6; }
21374  else
21375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21376$as_echo "yes" >&6; }
21377  fi
21378  $RMDIR $DELETEDIR
21379
21380
21381
21382  # Test which kind of tar was found
21383  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21384    TAR_TYPE="gnu"
21385  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21386    TAR_TYPE="bsd"
21387  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21388    TAR_TYPE="bsd"
21389  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21390    TAR_TYPE="solaris"
21391  fi
21392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21393$as_echo_n "checking what type of tar was found... " >&6; }
21394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21395$as_echo "$TAR_TYPE" >&6; }
21396
21397  TAR_CREATE_FILE_PARAM=""
21398
21399  if test "x$TAR_TYPE" = "xgnu"; then
21400    TAR_INCLUDE_PARAM="T"
21401    TAR_SUPPORTS_TRANSFORM="true"
21402    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21403      # When using gnu tar for Solaris targets, need to use compatibility mode
21404      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21405    fi
21406  else
21407    TAR_INCLUDE_PARAM="I"
21408    TAR_SUPPORTS_TRANSFORM="false"
21409  fi
21410
21411
21412
21413
21414
21415
21416  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21417  # This is a problem for the grep resident on AIX.
21418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21419$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21420  # Multiple subsequent spaces..
21421  STACK_SPACES='aaa   bbb   ccc'
21422  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21423  # patterns in it.
21424  STACK_LIST=${STACK_SPACES// /$'\n'}
21425  NEEDLE_SPACES='ccc bbb aaa'
21426  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21427  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21428  if test "x$RESULT" == "x"; then
21429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21430$as_echo "yes" >&6; }
21431  else
21432    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21433      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21434    fi
21435    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21436  fi
21437
21438
21439  # These tools might not be installed by default,
21440  # need hint on how to install them.
21441
21442
21443
21444  # Publish this variable in the help.
21445
21446
21447  if [ -z "${UNZIP+x}" ]; then
21448    # The variable is not set by user, try to locate tool using the code snippet
21449    for ac_prog in unzip
21450do
21451  # Extract the first word of "$ac_prog", so it can be a program name with args.
21452set dummy $ac_prog; ac_word=$2
21453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21454$as_echo_n "checking for $ac_word... " >&6; }
21455if ${ac_cv_path_UNZIP+:} false; then :
21456  $as_echo_n "(cached) " >&6
21457else
21458  case $UNZIP in
21459  [\\/]* | ?:[\\/]*)
21460  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21461  ;;
21462  *)
21463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21464for as_dir in $PATH
21465do
21466  IFS=$as_save_IFS
21467  test -z "$as_dir" && as_dir=.
21468    for ac_exec_ext in '' $ac_executable_extensions; do
21469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21470    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21472    break 2
21473  fi
21474done
21475  done
21476IFS=$as_save_IFS
21477
21478  ;;
21479esac
21480fi
21481UNZIP=$ac_cv_path_UNZIP
21482if test -n "$UNZIP"; then
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21484$as_echo "$UNZIP" >&6; }
21485else
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487$as_echo "no" >&6; }
21488fi
21489
21490
21491  test -n "$UNZIP" && break
21492done
21493
21494  else
21495    # The variable is set, but is it from the command line or the environment?
21496
21497    # Try to remove the string !UNZIP! from our list.
21498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21500      # If it failed, the variable was not from the command line. Ignore it,
21501      # but warn the user (except for BASH, which is always set by the calling BASH).
21502      if test "xUNZIP" != xBASH; then
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21504$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21505      fi
21506      # Try to locate tool using the code snippet
21507      for ac_prog in unzip
21508do
21509  # Extract the first word of "$ac_prog", so it can be a program name with args.
21510set dummy $ac_prog; ac_word=$2
21511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21512$as_echo_n "checking for $ac_word... " >&6; }
21513if ${ac_cv_path_UNZIP+:} false; then :
21514  $as_echo_n "(cached) " >&6
21515else
21516  case $UNZIP in
21517  [\\/]* | ?:[\\/]*)
21518  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21519  ;;
21520  *)
21521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21522for as_dir in $PATH
21523do
21524  IFS=$as_save_IFS
21525  test -z "$as_dir" && as_dir=.
21526    for ac_exec_ext in '' $ac_executable_extensions; do
21527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21528    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21530    break 2
21531  fi
21532done
21533  done
21534IFS=$as_save_IFS
21535
21536  ;;
21537esac
21538fi
21539UNZIP=$ac_cv_path_UNZIP
21540if test -n "$UNZIP"; then
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21542$as_echo "$UNZIP" >&6; }
21543else
21544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21545$as_echo "no" >&6; }
21546fi
21547
21548
21549  test -n "$UNZIP" && break
21550done
21551
21552    else
21553      # If it succeeded, then it was overridden by the user. We will use it
21554      # for the tool.
21555
21556      # First remove it from the list of overridden variables, so we can test
21557      # for unknown variables in the end.
21558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21559
21560      # Check if we try to supply an empty value
21561      if test "x$UNZIP" = x; then
21562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21563$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21565$as_echo_n "checking for UNZIP... " >&6; }
21566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21567$as_echo "disabled" >&6; }
21568      else
21569        # Check if the provided tool contains a complete path.
21570        tool_specified="$UNZIP"
21571        tool_basename="${tool_specified##*/}"
21572        if test "x$tool_basename" = "x$tool_specified"; then
21573          # A command without a complete path is provided, search $PATH.
21574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21575$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21576          # Extract the first word of "$tool_basename", so it can be a program name with args.
21577set dummy $tool_basename; ac_word=$2
21578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21579$as_echo_n "checking for $ac_word... " >&6; }
21580if ${ac_cv_path_UNZIP+:} false; then :
21581  $as_echo_n "(cached) " >&6
21582else
21583  case $UNZIP in
21584  [\\/]* | ?:[\\/]*)
21585  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21586  ;;
21587  *)
21588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21589for as_dir in $PATH
21590do
21591  IFS=$as_save_IFS
21592  test -z "$as_dir" && as_dir=.
21593    for ac_exec_ext in '' $ac_executable_extensions; do
21594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21595    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21597    break 2
21598  fi
21599done
21600  done
21601IFS=$as_save_IFS
21602
21603  ;;
21604esac
21605fi
21606UNZIP=$ac_cv_path_UNZIP
21607if test -n "$UNZIP"; then
21608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21609$as_echo "$UNZIP" >&6; }
21610else
21611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21612$as_echo "no" >&6; }
21613fi
21614
21615
21616          if test "x$UNZIP" = x; then
21617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21618          fi
21619        else
21620          # Otherwise we believe it is a complete path. Use it as it is.
21621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21622$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21624$as_echo_n "checking for UNZIP... " >&6; }
21625          if test ! -x "$tool_specified"; then
21626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21627$as_echo "not found" >&6; }
21628            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21629          fi
21630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21631$as_echo "$tool_specified" >&6; }
21632        fi
21633      fi
21634    fi
21635
21636  fi
21637
21638
21639
21640  if test "x$UNZIP" = x; then
21641    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21642  fi
21643
21644
21645  # Since zip uses "ZIP" as a environment variable for passing options, we need
21646  # to name our variable differently, hence ZIPEXE.
21647
21648
21649
21650  # Publish this variable in the help.
21651
21652
21653  if [ -z "${ZIPEXE+x}" ]; then
21654    # The variable is not set by user, try to locate tool using the code snippet
21655    for ac_prog in zip
21656do
21657  # Extract the first word of "$ac_prog", so it can be a program name with args.
21658set dummy $ac_prog; ac_word=$2
21659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21660$as_echo_n "checking for $ac_word... " >&6; }
21661if ${ac_cv_path_ZIPEXE+:} false; then :
21662  $as_echo_n "(cached) " >&6
21663else
21664  case $ZIPEXE in
21665  [\\/]* | ?:[\\/]*)
21666  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21667  ;;
21668  *)
21669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21670for as_dir in $PATH
21671do
21672  IFS=$as_save_IFS
21673  test -z "$as_dir" && as_dir=.
21674    for ac_exec_ext in '' $ac_executable_extensions; do
21675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21676    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21678    break 2
21679  fi
21680done
21681  done
21682IFS=$as_save_IFS
21683
21684  ;;
21685esac
21686fi
21687ZIPEXE=$ac_cv_path_ZIPEXE
21688if test -n "$ZIPEXE"; then
21689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21690$as_echo "$ZIPEXE" >&6; }
21691else
21692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21693$as_echo "no" >&6; }
21694fi
21695
21696
21697  test -n "$ZIPEXE" && break
21698done
21699
21700  else
21701    # The variable is set, but is it from the command line or the environment?
21702
21703    # Try to remove the string !ZIPEXE! from our list.
21704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21706      # If it failed, the variable was not from the command line. Ignore it,
21707      # but warn the user (except for BASH, which is always set by the calling BASH).
21708      if test "xZIPEXE" != xBASH; then
21709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21710$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21711      fi
21712      # Try to locate tool using the code snippet
21713      for ac_prog in zip
21714do
21715  # Extract the first word of "$ac_prog", so it can be a program name with args.
21716set dummy $ac_prog; ac_word=$2
21717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21718$as_echo_n "checking for $ac_word... " >&6; }
21719if ${ac_cv_path_ZIPEXE+:} false; then :
21720  $as_echo_n "(cached) " >&6
21721else
21722  case $ZIPEXE in
21723  [\\/]* | ?:[\\/]*)
21724  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21725  ;;
21726  *)
21727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21728for as_dir in $PATH
21729do
21730  IFS=$as_save_IFS
21731  test -z "$as_dir" && as_dir=.
21732    for ac_exec_ext in '' $ac_executable_extensions; do
21733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21734    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21736    break 2
21737  fi
21738done
21739  done
21740IFS=$as_save_IFS
21741
21742  ;;
21743esac
21744fi
21745ZIPEXE=$ac_cv_path_ZIPEXE
21746if test -n "$ZIPEXE"; then
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21748$as_echo "$ZIPEXE" >&6; }
21749else
21750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21751$as_echo "no" >&6; }
21752fi
21753
21754
21755  test -n "$ZIPEXE" && break
21756done
21757
21758    else
21759      # If it succeeded, then it was overridden by the user. We will use it
21760      # for the tool.
21761
21762      # First remove it from the list of overridden variables, so we can test
21763      # for unknown variables in the end.
21764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21765
21766      # Check if we try to supply an empty value
21767      if test "x$ZIPEXE" = x; then
21768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21769$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21771$as_echo_n "checking for ZIPEXE... " >&6; }
21772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21773$as_echo "disabled" >&6; }
21774      else
21775        # Check if the provided tool contains a complete path.
21776        tool_specified="$ZIPEXE"
21777        tool_basename="${tool_specified##*/}"
21778        if test "x$tool_basename" = "x$tool_specified"; then
21779          # A command without a complete path is provided, search $PATH.
21780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21781$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21782          # Extract the first word of "$tool_basename", so it can be a program name with args.
21783set dummy $tool_basename; ac_word=$2
21784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21785$as_echo_n "checking for $ac_word... " >&6; }
21786if ${ac_cv_path_ZIPEXE+:} false; then :
21787  $as_echo_n "(cached) " >&6
21788else
21789  case $ZIPEXE in
21790  [\\/]* | ?:[\\/]*)
21791  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21792  ;;
21793  *)
21794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21795for as_dir in $PATH
21796do
21797  IFS=$as_save_IFS
21798  test -z "$as_dir" && as_dir=.
21799    for ac_exec_ext in '' $ac_executable_extensions; do
21800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21801    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21803    break 2
21804  fi
21805done
21806  done
21807IFS=$as_save_IFS
21808
21809  ;;
21810esac
21811fi
21812ZIPEXE=$ac_cv_path_ZIPEXE
21813if test -n "$ZIPEXE"; then
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21815$as_echo "$ZIPEXE" >&6; }
21816else
21817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21818$as_echo "no" >&6; }
21819fi
21820
21821
21822          if test "x$ZIPEXE" = x; then
21823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21824          fi
21825        else
21826          # Otherwise we believe it is a complete path. Use it as it is.
21827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21828$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21830$as_echo_n "checking for ZIPEXE... " >&6; }
21831          if test ! -x "$tool_specified"; then
21832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21833$as_echo "not found" >&6; }
21834            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21835          fi
21836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21837$as_echo "$tool_specified" >&6; }
21838        fi
21839      fi
21840    fi
21841
21842  fi
21843
21844
21845
21846  if test "x$ZIPEXE" = x; then
21847    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21848  fi
21849
21850
21851
21852  # Non-required basic tools
21853
21854
21855
21856  # Publish this variable in the help.
21857
21858
21859  if [ -z "${LDD+x}" ]; then
21860    # The variable is not set by user, try to locate tool using the code snippet
21861    for ac_prog in ldd
21862do
21863  # Extract the first word of "$ac_prog", so it can be a program name with args.
21864set dummy $ac_prog; ac_word=$2
21865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866$as_echo_n "checking for $ac_word... " >&6; }
21867if ${ac_cv_path_LDD+:} false; then :
21868  $as_echo_n "(cached) " >&6
21869else
21870  case $LDD in
21871  [\\/]* | ?:[\\/]*)
21872  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21873  ;;
21874  *)
21875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21876for as_dir in $PATH
21877do
21878  IFS=$as_save_IFS
21879  test -z "$as_dir" && as_dir=.
21880    for ac_exec_ext in '' $ac_executable_extensions; do
21881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21882    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21884    break 2
21885  fi
21886done
21887  done
21888IFS=$as_save_IFS
21889
21890  ;;
21891esac
21892fi
21893LDD=$ac_cv_path_LDD
21894if test -n "$LDD"; then
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21896$as_echo "$LDD" >&6; }
21897else
21898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21899$as_echo "no" >&6; }
21900fi
21901
21902
21903  test -n "$LDD" && break
21904done
21905
21906  else
21907    # The variable is set, but is it from the command line or the environment?
21908
21909    # Try to remove the string !LDD! from our list.
21910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21912      # If it failed, the variable was not from the command line. Ignore it,
21913      # but warn the user (except for BASH, which is always set by the calling BASH).
21914      if test "xLDD" != xBASH; then
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21916$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21917      fi
21918      # Try to locate tool using the code snippet
21919      for ac_prog in ldd
21920do
21921  # Extract the first word of "$ac_prog", so it can be a program name with args.
21922set dummy $ac_prog; ac_word=$2
21923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21924$as_echo_n "checking for $ac_word... " >&6; }
21925if ${ac_cv_path_LDD+:} false; then :
21926  $as_echo_n "(cached) " >&6
21927else
21928  case $LDD in
21929  [\\/]* | ?:[\\/]*)
21930  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21931  ;;
21932  *)
21933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21934for as_dir in $PATH
21935do
21936  IFS=$as_save_IFS
21937  test -z "$as_dir" && as_dir=.
21938    for ac_exec_ext in '' $ac_executable_extensions; do
21939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21940    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21942    break 2
21943  fi
21944done
21945  done
21946IFS=$as_save_IFS
21947
21948  ;;
21949esac
21950fi
21951LDD=$ac_cv_path_LDD
21952if test -n "$LDD"; then
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21954$as_echo "$LDD" >&6; }
21955else
21956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21957$as_echo "no" >&6; }
21958fi
21959
21960
21961  test -n "$LDD" && break
21962done
21963
21964    else
21965      # If it succeeded, then it was overridden by the user. We will use it
21966      # for the tool.
21967
21968      # First remove it from the list of overridden variables, so we can test
21969      # for unknown variables in the end.
21970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21971
21972      # Check if we try to supply an empty value
21973      if test "x$LDD" = x; then
21974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21975$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21977$as_echo_n "checking for LDD... " >&6; }
21978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21979$as_echo "disabled" >&6; }
21980      else
21981        # Check if the provided tool contains a complete path.
21982        tool_specified="$LDD"
21983        tool_basename="${tool_specified##*/}"
21984        if test "x$tool_basename" = "x$tool_specified"; then
21985          # A command without a complete path is provided, search $PATH.
21986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21987$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21988          # Extract the first word of "$tool_basename", so it can be a program name with args.
21989set dummy $tool_basename; ac_word=$2
21990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21991$as_echo_n "checking for $ac_word... " >&6; }
21992if ${ac_cv_path_LDD+:} false; then :
21993  $as_echo_n "(cached) " >&6
21994else
21995  case $LDD in
21996  [\\/]* | ?:[\\/]*)
21997  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21998  ;;
21999  *)
22000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22001for as_dir in $PATH
22002do
22003  IFS=$as_save_IFS
22004  test -z "$as_dir" && as_dir=.
22005    for ac_exec_ext in '' $ac_executable_extensions; do
22006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22007    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22009    break 2
22010  fi
22011done
22012  done
22013IFS=$as_save_IFS
22014
22015  ;;
22016esac
22017fi
22018LDD=$ac_cv_path_LDD
22019if test -n "$LDD"; then
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22021$as_echo "$LDD" >&6; }
22022else
22023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22024$as_echo "no" >&6; }
22025fi
22026
22027
22028          if test "x$LDD" = x; then
22029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22030          fi
22031        else
22032          # Otherwise we believe it is a complete path. Use it as it is.
22033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22034$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22036$as_echo_n "checking for LDD... " >&6; }
22037          if test ! -x "$tool_specified"; then
22038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22039$as_echo "not found" >&6; }
22040            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22041          fi
22042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22043$as_echo "$tool_specified" >&6; }
22044        fi
22045      fi
22046    fi
22047
22048  fi
22049
22050
22051  if test "x$LDD" = "x"; then
22052    # List shared lib dependencies is used for
22053    # debug output and checking for forbidden dependencies.
22054    # We can build without it.
22055    LDD="true"
22056  fi
22057
22058
22059  # Publish this variable in the help.
22060
22061
22062  if [ -z "${OTOOL+x}" ]; then
22063    # The variable is not set by user, try to locate tool using the code snippet
22064    for ac_prog in otool
22065do
22066  # Extract the first word of "$ac_prog", so it can be a program name with args.
22067set dummy $ac_prog; ac_word=$2
22068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22069$as_echo_n "checking for $ac_word... " >&6; }
22070if ${ac_cv_path_OTOOL+:} false; then :
22071  $as_echo_n "(cached) " >&6
22072else
22073  case $OTOOL in
22074  [\\/]* | ?:[\\/]*)
22075  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22076  ;;
22077  *)
22078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22079for as_dir in $PATH
22080do
22081  IFS=$as_save_IFS
22082  test -z "$as_dir" && as_dir=.
22083    for ac_exec_ext in '' $ac_executable_extensions; do
22084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22085    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22087    break 2
22088  fi
22089done
22090  done
22091IFS=$as_save_IFS
22092
22093  ;;
22094esac
22095fi
22096OTOOL=$ac_cv_path_OTOOL
22097if test -n "$OTOOL"; then
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22099$as_echo "$OTOOL" >&6; }
22100else
22101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22102$as_echo "no" >&6; }
22103fi
22104
22105
22106  test -n "$OTOOL" && break
22107done
22108
22109  else
22110    # The variable is set, but is it from the command line or the environment?
22111
22112    # Try to remove the string !OTOOL! from our list.
22113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22115      # If it failed, the variable was not from the command line. Ignore it,
22116      # but warn the user (except for BASH, which is always set by the calling BASH).
22117      if test "xOTOOL" != xBASH; then
22118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22119$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22120      fi
22121      # Try to locate tool using the code snippet
22122      for ac_prog in otool
22123do
22124  # Extract the first word of "$ac_prog", so it can be a program name with args.
22125set dummy $ac_prog; ac_word=$2
22126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22127$as_echo_n "checking for $ac_word... " >&6; }
22128if ${ac_cv_path_OTOOL+:} false; then :
22129  $as_echo_n "(cached) " >&6
22130else
22131  case $OTOOL in
22132  [\\/]* | ?:[\\/]*)
22133  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22134  ;;
22135  *)
22136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22137for as_dir in $PATH
22138do
22139  IFS=$as_save_IFS
22140  test -z "$as_dir" && as_dir=.
22141    for ac_exec_ext in '' $ac_executable_extensions; do
22142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22143    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22145    break 2
22146  fi
22147done
22148  done
22149IFS=$as_save_IFS
22150
22151  ;;
22152esac
22153fi
22154OTOOL=$ac_cv_path_OTOOL
22155if test -n "$OTOOL"; then
22156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22157$as_echo "$OTOOL" >&6; }
22158else
22159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22160$as_echo "no" >&6; }
22161fi
22162
22163
22164  test -n "$OTOOL" && break
22165done
22166
22167    else
22168      # If it succeeded, then it was overridden by the user. We will use it
22169      # for the tool.
22170
22171      # First remove it from the list of overridden variables, so we can test
22172      # for unknown variables in the end.
22173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22174
22175      # Check if we try to supply an empty value
22176      if test "x$OTOOL" = x; then
22177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22178$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22180$as_echo_n "checking for OTOOL... " >&6; }
22181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22182$as_echo "disabled" >&6; }
22183      else
22184        # Check if the provided tool contains a complete path.
22185        tool_specified="$OTOOL"
22186        tool_basename="${tool_specified##*/}"
22187        if test "x$tool_basename" = "x$tool_specified"; then
22188          # A command without a complete path is provided, search $PATH.
22189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22190$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22191          # Extract the first word of "$tool_basename", so it can be a program name with args.
22192set dummy $tool_basename; ac_word=$2
22193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22194$as_echo_n "checking for $ac_word... " >&6; }
22195if ${ac_cv_path_OTOOL+:} false; then :
22196  $as_echo_n "(cached) " >&6
22197else
22198  case $OTOOL in
22199  [\\/]* | ?:[\\/]*)
22200  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22201  ;;
22202  *)
22203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22204for as_dir in $PATH
22205do
22206  IFS=$as_save_IFS
22207  test -z "$as_dir" && as_dir=.
22208    for ac_exec_ext in '' $ac_executable_extensions; do
22209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22210    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22212    break 2
22213  fi
22214done
22215  done
22216IFS=$as_save_IFS
22217
22218  ;;
22219esac
22220fi
22221OTOOL=$ac_cv_path_OTOOL
22222if test -n "$OTOOL"; then
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22224$as_echo "$OTOOL" >&6; }
22225else
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22227$as_echo "no" >&6; }
22228fi
22229
22230
22231          if test "x$OTOOL" = x; then
22232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22233          fi
22234        else
22235          # Otherwise we believe it is a complete path. Use it as it is.
22236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22237$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22239$as_echo_n "checking for OTOOL... " >&6; }
22240          if test ! -x "$tool_specified"; then
22241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22242$as_echo "not found" >&6; }
22243            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22244          fi
22245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22246$as_echo "$tool_specified" >&6; }
22247        fi
22248      fi
22249    fi
22250
22251  fi
22252
22253
22254  if test "x$OTOOL" = "x"; then
22255    OTOOL="true"
22256  fi
22257
22258
22259  # Publish this variable in the help.
22260
22261
22262  if [ -z "${READELF+x}" ]; then
22263    # The variable is not set by user, try to locate tool using the code snippet
22264    for ac_prog in greadelf readelf
22265do
22266  # Extract the first word of "$ac_prog", so it can be a program name with args.
22267set dummy $ac_prog; ac_word=$2
22268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22269$as_echo_n "checking for $ac_word... " >&6; }
22270if ${ac_cv_path_READELF+:} false; then :
22271  $as_echo_n "(cached) " >&6
22272else
22273  case $READELF in
22274  [\\/]* | ?:[\\/]*)
22275  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22276  ;;
22277  *)
22278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22279for as_dir in $PATH
22280do
22281  IFS=$as_save_IFS
22282  test -z "$as_dir" && as_dir=.
22283    for ac_exec_ext in '' $ac_executable_extensions; do
22284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22285    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22287    break 2
22288  fi
22289done
22290  done
22291IFS=$as_save_IFS
22292
22293  ;;
22294esac
22295fi
22296READELF=$ac_cv_path_READELF
22297if test -n "$READELF"; then
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22299$as_echo "$READELF" >&6; }
22300else
22301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22302$as_echo "no" >&6; }
22303fi
22304
22305
22306  test -n "$READELF" && break
22307done
22308
22309  else
22310    # The variable is set, but is it from the command line or the environment?
22311
22312    # Try to remove the string !READELF! from our list.
22313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22315      # If it failed, the variable was not from the command line. Ignore it,
22316      # but warn the user (except for BASH, which is always set by the calling BASH).
22317      if test "xREADELF" != xBASH; then
22318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22319$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22320      fi
22321      # Try to locate tool using the code snippet
22322      for ac_prog in greadelf readelf
22323do
22324  # Extract the first word of "$ac_prog", so it can be a program name with args.
22325set dummy $ac_prog; ac_word=$2
22326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22327$as_echo_n "checking for $ac_word... " >&6; }
22328if ${ac_cv_path_READELF+:} false; then :
22329  $as_echo_n "(cached) " >&6
22330else
22331  case $READELF in
22332  [\\/]* | ?:[\\/]*)
22333  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22334  ;;
22335  *)
22336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22337for as_dir in $PATH
22338do
22339  IFS=$as_save_IFS
22340  test -z "$as_dir" && as_dir=.
22341    for ac_exec_ext in '' $ac_executable_extensions; do
22342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22343    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22345    break 2
22346  fi
22347done
22348  done
22349IFS=$as_save_IFS
22350
22351  ;;
22352esac
22353fi
22354READELF=$ac_cv_path_READELF
22355if test -n "$READELF"; then
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22357$as_echo "$READELF" >&6; }
22358else
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22360$as_echo "no" >&6; }
22361fi
22362
22363
22364  test -n "$READELF" && break
22365done
22366
22367    else
22368      # If it succeeded, then it was overridden by the user. We will use it
22369      # for the tool.
22370
22371      # First remove it from the list of overridden variables, so we can test
22372      # for unknown variables in the end.
22373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22374
22375      # Check if we try to supply an empty value
22376      if test "x$READELF" = x; then
22377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22378$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22380$as_echo_n "checking for READELF... " >&6; }
22381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22382$as_echo "disabled" >&6; }
22383      else
22384        # Check if the provided tool contains a complete path.
22385        tool_specified="$READELF"
22386        tool_basename="${tool_specified##*/}"
22387        if test "x$tool_basename" = "x$tool_specified"; then
22388          # A command without a complete path is provided, search $PATH.
22389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22390$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22391          # Extract the first word of "$tool_basename", so it can be a program name with args.
22392set dummy $tool_basename; ac_word=$2
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22394$as_echo_n "checking for $ac_word... " >&6; }
22395if ${ac_cv_path_READELF+:} false; then :
22396  $as_echo_n "(cached) " >&6
22397else
22398  case $READELF in
22399  [\\/]* | ?:[\\/]*)
22400  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22401  ;;
22402  *)
22403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22404for as_dir in $PATH
22405do
22406  IFS=$as_save_IFS
22407  test -z "$as_dir" && as_dir=.
22408    for ac_exec_ext in '' $ac_executable_extensions; do
22409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22410    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22412    break 2
22413  fi
22414done
22415  done
22416IFS=$as_save_IFS
22417
22418  ;;
22419esac
22420fi
22421READELF=$ac_cv_path_READELF
22422if test -n "$READELF"; then
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22424$as_echo "$READELF" >&6; }
22425else
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22427$as_echo "no" >&6; }
22428fi
22429
22430
22431          if test "x$READELF" = x; then
22432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22433          fi
22434        else
22435          # Otherwise we believe it is a complete path. Use it as it is.
22436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22437$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22439$as_echo_n "checking for READELF... " >&6; }
22440          if test ! -x "$tool_specified"; then
22441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22442$as_echo "not found" >&6; }
22443            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22444          fi
22445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22446$as_echo "$tool_specified" >&6; }
22447        fi
22448      fi
22449    fi
22450
22451  fi
22452
22453
22454
22455
22456  # Publish this variable in the help.
22457
22458
22459  if [ -z "${DOT+x}" ]; then
22460    # The variable is not set by user, try to locate tool using the code snippet
22461    for ac_prog in dot
22462do
22463  # Extract the first word of "$ac_prog", so it can be a program name with args.
22464set dummy $ac_prog; ac_word=$2
22465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22466$as_echo_n "checking for $ac_word... " >&6; }
22467if ${ac_cv_path_DOT+:} false; then :
22468  $as_echo_n "(cached) " >&6
22469else
22470  case $DOT in
22471  [\\/]* | ?:[\\/]*)
22472  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22473  ;;
22474  *)
22475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22476for as_dir in $PATH
22477do
22478  IFS=$as_save_IFS
22479  test -z "$as_dir" && as_dir=.
22480    for ac_exec_ext in '' $ac_executable_extensions; do
22481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22482    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22484    break 2
22485  fi
22486done
22487  done
22488IFS=$as_save_IFS
22489
22490  ;;
22491esac
22492fi
22493DOT=$ac_cv_path_DOT
22494if test -n "$DOT"; then
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22496$as_echo "$DOT" >&6; }
22497else
22498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22499$as_echo "no" >&6; }
22500fi
22501
22502
22503  test -n "$DOT" && break
22504done
22505
22506  else
22507    # The variable is set, but is it from the command line or the environment?
22508
22509    # Try to remove the string !DOT! from our list.
22510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22512      # If it failed, the variable was not from the command line. Ignore it,
22513      # but warn the user (except for BASH, which is always set by the calling BASH).
22514      if test "xDOT" != xBASH; then
22515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22516$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22517      fi
22518      # Try to locate tool using the code snippet
22519      for ac_prog in dot
22520do
22521  # Extract the first word of "$ac_prog", so it can be a program name with args.
22522set dummy $ac_prog; ac_word=$2
22523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22524$as_echo_n "checking for $ac_word... " >&6; }
22525if ${ac_cv_path_DOT+:} false; then :
22526  $as_echo_n "(cached) " >&6
22527else
22528  case $DOT in
22529  [\\/]* | ?:[\\/]*)
22530  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22531  ;;
22532  *)
22533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22534for as_dir in $PATH
22535do
22536  IFS=$as_save_IFS
22537  test -z "$as_dir" && as_dir=.
22538    for ac_exec_ext in '' $ac_executable_extensions; do
22539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22540    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22542    break 2
22543  fi
22544done
22545  done
22546IFS=$as_save_IFS
22547
22548  ;;
22549esac
22550fi
22551DOT=$ac_cv_path_DOT
22552if test -n "$DOT"; then
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22554$as_echo "$DOT" >&6; }
22555else
22556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22557$as_echo "no" >&6; }
22558fi
22559
22560
22561  test -n "$DOT" && break
22562done
22563
22564    else
22565      # If it succeeded, then it was overridden by the user. We will use it
22566      # for the tool.
22567
22568      # First remove it from the list of overridden variables, so we can test
22569      # for unknown variables in the end.
22570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22571
22572      # Check if we try to supply an empty value
22573      if test "x$DOT" = x; then
22574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22575$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22577$as_echo_n "checking for DOT... " >&6; }
22578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22579$as_echo "disabled" >&6; }
22580      else
22581        # Check if the provided tool contains a complete path.
22582        tool_specified="$DOT"
22583        tool_basename="${tool_specified##*/}"
22584        if test "x$tool_basename" = "x$tool_specified"; then
22585          # A command without a complete path is provided, search $PATH.
22586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22587$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22588          # Extract the first word of "$tool_basename", so it can be a program name with args.
22589set dummy $tool_basename; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_path_DOT+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  case $DOT in
22596  [\\/]* | ?:[\\/]*)
22597  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22598  ;;
22599  *)
22600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22601for as_dir in $PATH
22602do
22603  IFS=$as_save_IFS
22604  test -z "$as_dir" && as_dir=.
22605    for ac_exec_ext in '' $ac_executable_extensions; do
22606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22607    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22609    break 2
22610  fi
22611done
22612  done
22613IFS=$as_save_IFS
22614
22615  ;;
22616esac
22617fi
22618DOT=$ac_cv_path_DOT
22619if test -n "$DOT"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22621$as_echo "$DOT" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627
22628          if test "x$DOT" = x; then
22629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22630          fi
22631        else
22632          # Otherwise we believe it is a complete path. Use it as it is.
22633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22634$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22636$as_echo_n "checking for DOT... " >&6; }
22637          if test ! -x "$tool_specified"; then
22638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22639$as_echo "not found" >&6; }
22640            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22641          fi
22642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22643$as_echo "$tool_specified" >&6; }
22644        fi
22645      fi
22646    fi
22647
22648  fi
22649
22650
22651
22652
22653  # Publish this variable in the help.
22654
22655
22656  if [ -z "${HG+x}" ]; then
22657    # The variable is not set by user, try to locate tool using the code snippet
22658    for ac_prog in hg
22659do
22660  # Extract the first word of "$ac_prog", so it can be a program name with args.
22661set dummy $ac_prog; ac_word=$2
22662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22663$as_echo_n "checking for $ac_word... " >&6; }
22664if ${ac_cv_path_HG+:} false; then :
22665  $as_echo_n "(cached) " >&6
22666else
22667  case $HG in
22668  [\\/]* | ?:[\\/]*)
22669  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22670  ;;
22671  *)
22672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22673for as_dir in $PATH
22674do
22675  IFS=$as_save_IFS
22676  test -z "$as_dir" && as_dir=.
22677    for ac_exec_ext in '' $ac_executable_extensions; do
22678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22679    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22681    break 2
22682  fi
22683done
22684  done
22685IFS=$as_save_IFS
22686
22687  ;;
22688esac
22689fi
22690HG=$ac_cv_path_HG
22691if test -n "$HG"; then
22692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22693$as_echo "$HG" >&6; }
22694else
22695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22696$as_echo "no" >&6; }
22697fi
22698
22699
22700  test -n "$HG" && break
22701done
22702
22703  else
22704    # The variable is set, but is it from the command line or the environment?
22705
22706    # Try to remove the string !HG! from our list.
22707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22709      # If it failed, the variable was not from the command line. Ignore it,
22710      # but warn the user (except for BASH, which is always set by the calling BASH).
22711      if test "xHG" != xBASH; then
22712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22713$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22714      fi
22715      # Try to locate tool using the code snippet
22716      for ac_prog in hg
22717do
22718  # Extract the first word of "$ac_prog", so it can be a program name with args.
22719set dummy $ac_prog; ac_word=$2
22720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22721$as_echo_n "checking for $ac_word... " >&6; }
22722if ${ac_cv_path_HG+:} false; then :
22723  $as_echo_n "(cached) " >&6
22724else
22725  case $HG in
22726  [\\/]* | ?:[\\/]*)
22727  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22728  ;;
22729  *)
22730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22731for as_dir in $PATH
22732do
22733  IFS=$as_save_IFS
22734  test -z "$as_dir" && as_dir=.
22735    for ac_exec_ext in '' $ac_executable_extensions; do
22736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22737    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22739    break 2
22740  fi
22741done
22742  done
22743IFS=$as_save_IFS
22744
22745  ;;
22746esac
22747fi
22748HG=$ac_cv_path_HG
22749if test -n "$HG"; then
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22751$as_echo "$HG" >&6; }
22752else
22753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22754$as_echo "no" >&6; }
22755fi
22756
22757
22758  test -n "$HG" && break
22759done
22760
22761    else
22762      # If it succeeded, then it was overridden by the user. We will use it
22763      # for the tool.
22764
22765      # First remove it from the list of overridden variables, so we can test
22766      # for unknown variables in the end.
22767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22768
22769      # Check if we try to supply an empty value
22770      if test "x$HG" = x; then
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22772$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22774$as_echo_n "checking for HG... " >&6; }
22775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22776$as_echo "disabled" >&6; }
22777      else
22778        # Check if the provided tool contains a complete path.
22779        tool_specified="$HG"
22780        tool_basename="${tool_specified##*/}"
22781        if test "x$tool_basename" = "x$tool_specified"; then
22782          # A command without a complete path is provided, search $PATH.
22783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22784$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22785          # Extract the first word of "$tool_basename", so it can be a program name with args.
22786set dummy $tool_basename; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_HG+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $HG in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798for as_dir in $PATH
22799do
22800  IFS=$as_save_IFS
22801  test -z "$as_dir" && as_dir=.
22802    for ac_exec_ext in '' $ac_executable_extensions; do
22803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22804    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22806    break 2
22807  fi
22808done
22809  done
22810IFS=$as_save_IFS
22811
22812  ;;
22813esac
22814fi
22815HG=$ac_cv_path_HG
22816if test -n "$HG"; then
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22818$as_echo "$HG" >&6; }
22819else
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22821$as_echo "no" >&6; }
22822fi
22823
22824
22825          if test "x$HG" = x; then
22826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22827          fi
22828        else
22829          # Otherwise we believe it is a complete path. Use it as it is.
22830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22831$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22833$as_echo_n "checking for HG... " >&6; }
22834          if test ! -x "$tool_specified"; then
22835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22836$as_echo "not found" >&6; }
22837            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22838          fi
22839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22840$as_echo "$tool_specified" >&6; }
22841        fi
22842      fi
22843    fi
22844
22845  fi
22846
22847
22848
22849
22850  # Publish this variable in the help.
22851
22852
22853  if [ -z "${STAT+x}" ]; then
22854    # The variable is not set by user, try to locate tool using the code snippet
22855    for ac_prog in stat
22856do
22857  # Extract the first word of "$ac_prog", so it can be a program name with args.
22858set dummy $ac_prog; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_path_STAT+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  case $STAT in
22865  [\\/]* | ?:[\\/]*)
22866  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22867  ;;
22868  *)
22869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887STAT=$ac_cv_path_STAT
22888if test -n "$STAT"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22890$as_echo "$STAT" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897  test -n "$STAT" && break
22898done
22899
22900  else
22901    # The variable is set, but is it from the command line or the environment?
22902
22903    # Try to remove the string !STAT! from our list.
22904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22906      # If it failed, the variable was not from the command line. Ignore it,
22907      # but warn the user (except for BASH, which is always set by the calling BASH).
22908      if test "xSTAT" != xBASH; then
22909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22910$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22911      fi
22912      # Try to locate tool using the code snippet
22913      for ac_prog in stat
22914do
22915  # Extract the first word of "$ac_prog", so it can be a program name with args.
22916set dummy $ac_prog; ac_word=$2
22917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22918$as_echo_n "checking for $ac_word... " >&6; }
22919if ${ac_cv_path_STAT+:} false; then :
22920  $as_echo_n "(cached) " >&6
22921else
22922  case $STAT in
22923  [\\/]* | ?:[\\/]*)
22924  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22925  ;;
22926  *)
22927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22928for as_dir in $PATH
22929do
22930  IFS=$as_save_IFS
22931  test -z "$as_dir" && as_dir=.
22932    for ac_exec_ext in '' $ac_executable_extensions; do
22933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22934    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22936    break 2
22937  fi
22938done
22939  done
22940IFS=$as_save_IFS
22941
22942  ;;
22943esac
22944fi
22945STAT=$ac_cv_path_STAT
22946if test -n "$STAT"; then
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22948$as_echo "$STAT" >&6; }
22949else
22950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22951$as_echo "no" >&6; }
22952fi
22953
22954
22955  test -n "$STAT" && break
22956done
22957
22958    else
22959      # If it succeeded, then it was overridden by the user. We will use it
22960      # for the tool.
22961
22962      # First remove it from the list of overridden variables, so we can test
22963      # for unknown variables in the end.
22964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22965
22966      # Check if we try to supply an empty value
22967      if test "x$STAT" = x; then
22968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22969$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22971$as_echo_n "checking for STAT... " >&6; }
22972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22973$as_echo "disabled" >&6; }
22974      else
22975        # Check if the provided tool contains a complete path.
22976        tool_specified="$STAT"
22977        tool_basename="${tool_specified##*/}"
22978        if test "x$tool_basename" = "x$tool_specified"; then
22979          # A command without a complete path is provided, search $PATH.
22980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22981$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22982          # Extract the first word of "$tool_basename", so it can be a program name with args.
22983set dummy $tool_basename; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_path_STAT+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  case $STAT in
22990  [\\/]* | ?:[\\/]*)
22991  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22992  ;;
22993  *)
22994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22995for as_dir in $PATH
22996do
22997  IFS=$as_save_IFS
22998  test -z "$as_dir" && as_dir=.
22999    for ac_exec_ext in '' $ac_executable_extensions; do
23000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23001    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23003    break 2
23004  fi
23005done
23006  done
23007IFS=$as_save_IFS
23008
23009  ;;
23010esac
23011fi
23012STAT=$ac_cv_path_STAT
23013if test -n "$STAT"; then
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23015$as_echo "$STAT" >&6; }
23016else
23017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019fi
23020
23021
23022          if test "x$STAT" = x; then
23023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23024          fi
23025        else
23026          # Otherwise we believe it is a complete path. Use it as it is.
23027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23028$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23030$as_echo_n "checking for STAT... " >&6; }
23031          if test ! -x "$tool_specified"; then
23032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23033$as_echo "not found" >&6; }
23034            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23035          fi
23036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23037$as_echo "$tool_specified" >&6; }
23038        fi
23039      fi
23040    fi
23041
23042  fi
23043
23044
23045
23046
23047  # Publish this variable in the help.
23048
23049
23050  if [ -z "${TIME+x}" ]; then
23051    # The variable is not set by user, try to locate tool using the code snippet
23052    for ac_prog in time
23053do
23054  # Extract the first word of "$ac_prog", so it can be a program name with args.
23055set dummy $ac_prog; ac_word=$2
23056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23057$as_echo_n "checking for $ac_word... " >&6; }
23058if ${ac_cv_path_TIME+:} false; then :
23059  $as_echo_n "(cached) " >&6
23060else
23061  case $TIME in
23062  [\\/]* | ?:[\\/]*)
23063  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23064  ;;
23065  *)
23066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23067for as_dir in $PATH
23068do
23069  IFS=$as_save_IFS
23070  test -z "$as_dir" && as_dir=.
23071    for ac_exec_ext in '' $ac_executable_extensions; do
23072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23073    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23075    break 2
23076  fi
23077done
23078  done
23079IFS=$as_save_IFS
23080
23081  ;;
23082esac
23083fi
23084TIME=$ac_cv_path_TIME
23085if test -n "$TIME"; then
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23087$as_echo "$TIME" >&6; }
23088else
23089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23090$as_echo "no" >&6; }
23091fi
23092
23093
23094  test -n "$TIME" && break
23095done
23096
23097  else
23098    # The variable is set, but is it from the command line or the environment?
23099
23100    # Try to remove the string !TIME! from our list.
23101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23103      # If it failed, the variable was not from the command line. Ignore it,
23104      # but warn the user (except for BASH, which is always set by the calling BASH).
23105      if test "xTIME" != xBASH; then
23106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23107$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23108      fi
23109      # Try to locate tool using the code snippet
23110      for ac_prog in time
23111do
23112  # Extract the first word of "$ac_prog", so it can be a program name with args.
23113set dummy $ac_prog; ac_word=$2
23114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23115$as_echo_n "checking for $ac_word... " >&6; }
23116if ${ac_cv_path_TIME+:} false; then :
23117  $as_echo_n "(cached) " >&6
23118else
23119  case $TIME in
23120  [\\/]* | ?:[\\/]*)
23121  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23122  ;;
23123  *)
23124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23125for as_dir in $PATH
23126do
23127  IFS=$as_save_IFS
23128  test -z "$as_dir" && as_dir=.
23129    for ac_exec_ext in '' $ac_executable_extensions; do
23130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23131    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23133    break 2
23134  fi
23135done
23136  done
23137IFS=$as_save_IFS
23138
23139  ;;
23140esac
23141fi
23142TIME=$ac_cv_path_TIME
23143if test -n "$TIME"; then
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23145$as_echo "$TIME" >&6; }
23146else
23147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23148$as_echo "no" >&6; }
23149fi
23150
23151
23152  test -n "$TIME" && break
23153done
23154
23155    else
23156      # If it succeeded, then it was overridden by the user. We will use it
23157      # for the tool.
23158
23159      # First remove it from the list of overridden variables, so we can test
23160      # for unknown variables in the end.
23161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23162
23163      # Check if we try to supply an empty value
23164      if test "x$TIME" = x; then
23165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23166$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23168$as_echo_n "checking for TIME... " >&6; }
23169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23170$as_echo "disabled" >&6; }
23171      else
23172        # Check if the provided tool contains a complete path.
23173        tool_specified="$TIME"
23174        tool_basename="${tool_specified##*/}"
23175        if test "x$tool_basename" = "x$tool_specified"; then
23176          # A command without a complete path is provided, search $PATH.
23177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23178$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23179          # Extract the first word of "$tool_basename", so it can be a program name with args.
23180set dummy $tool_basename; ac_word=$2
23181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23182$as_echo_n "checking for $ac_word... " >&6; }
23183if ${ac_cv_path_TIME+:} false; then :
23184  $as_echo_n "(cached) " >&6
23185else
23186  case $TIME in
23187  [\\/]* | ?:[\\/]*)
23188  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23189  ;;
23190  *)
23191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23192for as_dir in $PATH
23193do
23194  IFS=$as_save_IFS
23195  test -z "$as_dir" && as_dir=.
23196    for ac_exec_ext in '' $ac_executable_extensions; do
23197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23198    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23200    break 2
23201  fi
23202done
23203  done
23204IFS=$as_save_IFS
23205
23206  ;;
23207esac
23208fi
23209TIME=$ac_cv_path_TIME
23210if test -n "$TIME"; then
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23212$as_echo "$TIME" >&6; }
23213else
23214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23215$as_echo "no" >&6; }
23216fi
23217
23218
23219          if test "x$TIME" = x; then
23220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23221          fi
23222        else
23223          # Otherwise we believe it is a complete path. Use it as it is.
23224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23225$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23227$as_echo_n "checking for TIME... " >&6; }
23228          if test ! -x "$tool_specified"; then
23229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23230$as_echo "not found" >&6; }
23231            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23232          fi
23233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23234$as_echo "$tool_specified" >&6; }
23235        fi
23236      fi
23237    fi
23238
23239  fi
23240
23241
23242
23243
23244  # Publish this variable in the help.
23245
23246
23247  if [ -z "${FLOCK+x}" ]; then
23248    # The variable is not set by user, try to locate tool using the code snippet
23249    for ac_prog in flock
23250do
23251  # Extract the first word of "$ac_prog", so it can be a program name with args.
23252set dummy $ac_prog; ac_word=$2
23253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23254$as_echo_n "checking for $ac_word... " >&6; }
23255if ${ac_cv_path_FLOCK+:} false; then :
23256  $as_echo_n "(cached) " >&6
23257else
23258  case $FLOCK in
23259  [\\/]* | ?:[\\/]*)
23260  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23261  ;;
23262  *)
23263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23264for as_dir in $PATH
23265do
23266  IFS=$as_save_IFS
23267  test -z "$as_dir" && as_dir=.
23268    for ac_exec_ext in '' $ac_executable_extensions; do
23269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23270    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23272    break 2
23273  fi
23274done
23275  done
23276IFS=$as_save_IFS
23277
23278  ;;
23279esac
23280fi
23281FLOCK=$ac_cv_path_FLOCK
23282if test -n "$FLOCK"; then
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23284$as_echo "$FLOCK" >&6; }
23285else
23286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23287$as_echo "no" >&6; }
23288fi
23289
23290
23291  test -n "$FLOCK" && break
23292done
23293
23294  else
23295    # The variable is set, but is it from the command line or the environment?
23296
23297    # Try to remove the string !FLOCK! from our list.
23298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23300      # If it failed, the variable was not from the command line. Ignore it,
23301      # but warn the user (except for BASH, which is always set by the calling BASH).
23302      if test "xFLOCK" != xBASH; then
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23304$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23305      fi
23306      # Try to locate tool using the code snippet
23307      for ac_prog in flock
23308do
23309  # Extract the first word of "$ac_prog", so it can be a program name with args.
23310set dummy $ac_prog; ac_word=$2
23311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23312$as_echo_n "checking for $ac_word... " >&6; }
23313if ${ac_cv_path_FLOCK+:} false; then :
23314  $as_echo_n "(cached) " >&6
23315else
23316  case $FLOCK in
23317  [\\/]* | ?:[\\/]*)
23318  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23319  ;;
23320  *)
23321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23322for as_dir in $PATH
23323do
23324  IFS=$as_save_IFS
23325  test -z "$as_dir" && as_dir=.
23326    for ac_exec_ext in '' $ac_executable_extensions; do
23327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23328    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23330    break 2
23331  fi
23332done
23333  done
23334IFS=$as_save_IFS
23335
23336  ;;
23337esac
23338fi
23339FLOCK=$ac_cv_path_FLOCK
23340if test -n "$FLOCK"; then
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23342$as_echo "$FLOCK" >&6; }
23343else
23344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23345$as_echo "no" >&6; }
23346fi
23347
23348
23349  test -n "$FLOCK" && break
23350done
23351
23352    else
23353      # If it succeeded, then it was overridden by the user. We will use it
23354      # for the tool.
23355
23356      # First remove it from the list of overridden variables, so we can test
23357      # for unknown variables in the end.
23358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23359
23360      # Check if we try to supply an empty value
23361      if test "x$FLOCK" = x; then
23362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23363$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23365$as_echo_n "checking for FLOCK... " >&6; }
23366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23367$as_echo "disabled" >&6; }
23368      else
23369        # Check if the provided tool contains a complete path.
23370        tool_specified="$FLOCK"
23371        tool_basename="${tool_specified##*/}"
23372        if test "x$tool_basename" = "x$tool_specified"; then
23373          # A command without a complete path is provided, search $PATH.
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23375$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23376          # Extract the first word of "$tool_basename", so it can be a program name with args.
23377set dummy $tool_basename; ac_word=$2
23378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23379$as_echo_n "checking for $ac_word... " >&6; }
23380if ${ac_cv_path_FLOCK+:} false; then :
23381  $as_echo_n "(cached) " >&6
23382else
23383  case $FLOCK in
23384  [\\/]* | ?:[\\/]*)
23385  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23386  ;;
23387  *)
23388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23389for as_dir in $PATH
23390do
23391  IFS=$as_save_IFS
23392  test -z "$as_dir" && as_dir=.
23393    for ac_exec_ext in '' $ac_executable_extensions; do
23394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23395    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23397    break 2
23398  fi
23399done
23400  done
23401IFS=$as_save_IFS
23402
23403  ;;
23404esac
23405fi
23406FLOCK=$ac_cv_path_FLOCK
23407if test -n "$FLOCK"; then
23408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23409$as_echo "$FLOCK" >&6; }
23410else
23411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23412$as_echo "no" >&6; }
23413fi
23414
23415
23416          if test "x$FLOCK" = x; then
23417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23418          fi
23419        else
23420          # Otherwise we believe it is a complete path. Use it as it is.
23421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23422$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23424$as_echo_n "checking for FLOCK... " >&6; }
23425          if test ! -x "$tool_specified"; then
23426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23427$as_echo "not found" >&6; }
23428            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23429          fi
23430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23431$as_echo "$tool_specified" >&6; }
23432        fi
23433      fi
23434    fi
23435
23436  fi
23437
23438
23439  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23440  # be in the user path.
23441
23442
23443  # Publish this variable in the help.
23444
23445
23446  if [ -z "${DTRACE+x}" ]; then
23447    # The variable is not set by user, try to locate tool using the code snippet
23448    for ac_prog in dtrace
23449do
23450  # Extract the first word of "$ac_prog", so it can be a program name with args.
23451set dummy $ac_prog; ac_word=$2
23452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23453$as_echo_n "checking for $ac_word... " >&6; }
23454if ${ac_cv_path_DTRACE+:} false; then :
23455  $as_echo_n "(cached) " >&6
23456else
23457  case $DTRACE in
23458  [\\/]* | ?:[\\/]*)
23459  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23460  ;;
23461  *)
23462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23463as_dummy="$PATH:/usr/sbin"
23464for as_dir in $as_dummy
23465do
23466  IFS=$as_save_IFS
23467  test -z "$as_dir" && as_dir=.
23468    for ac_exec_ext in '' $ac_executable_extensions; do
23469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23470    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23472    break 2
23473  fi
23474done
23475  done
23476IFS=$as_save_IFS
23477
23478  ;;
23479esac
23480fi
23481DTRACE=$ac_cv_path_DTRACE
23482if test -n "$DTRACE"; then
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23484$as_echo "$DTRACE" >&6; }
23485else
23486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23487$as_echo "no" >&6; }
23488fi
23489
23490
23491  test -n "$DTRACE" && break
23492done
23493
23494  else
23495    # The variable is set, but is it from the command line or the environment?
23496
23497    # Try to remove the string !DTRACE! from our list.
23498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23500      # If it failed, the variable was not from the command line. Ignore it,
23501      # but warn the user (except for BASH, which is always set by the calling BASH).
23502      if test "xDTRACE" != xBASH; then
23503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23504$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23505      fi
23506      # Try to locate tool using the code snippet
23507      for ac_prog in dtrace
23508do
23509  # Extract the first word of "$ac_prog", so it can be a program name with args.
23510set dummy $ac_prog; ac_word=$2
23511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23512$as_echo_n "checking for $ac_word... " >&6; }
23513if ${ac_cv_path_DTRACE+:} false; then :
23514  $as_echo_n "(cached) " >&6
23515else
23516  case $DTRACE in
23517  [\\/]* | ?:[\\/]*)
23518  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23519  ;;
23520  *)
23521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23522as_dummy="$PATH:/usr/sbin"
23523for as_dir in $as_dummy
23524do
23525  IFS=$as_save_IFS
23526  test -z "$as_dir" && as_dir=.
23527    for ac_exec_ext in '' $ac_executable_extensions; do
23528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23529    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23531    break 2
23532  fi
23533done
23534  done
23535IFS=$as_save_IFS
23536
23537  ;;
23538esac
23539fi
23540DTRACE=$ac_cv_path_DTRACE
23541if test -n "$DTRACE"; then
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23543$as_echo "$DTRACE" >&6; }
23544else
23545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23546$as_echo "no" >&6; }
23547fi
23548
23549
23550  test -n "$DTRACE" && break
23551done
23552
23553    else
23554      # If it succeeded, then it was overridden by the user. We will use it
23555      # for the tool.
23556
23557      # First remove it from the list of overridden variables, so we can test
23558      # for unknown variables in the end.
23559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23560
23561      # Check if we try to supply an empty value
23562      if test "x$DTRACE" = x; then
23563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23564$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23566$as_echo_n "checking for DTRACE... " >&6; }
23567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23568$as_echo "disabled" >&6; }
23569      else
23570        # Check if the provided tool contains a complete path.
23571        tool_specified="$DTRACE"
23572        tool_basename="${tool_specified##*/}"
23573        if test "x$tool_basename" = "x$tool_specified"; then
23574          # A command without a complete path is provided, search $PATH.
23575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23576$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23577          # Extract the first word of "$tool_basename", so it can be a program name with args.
23578set dummy $tool_basename; ac_word=$2
23579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23580$as_echo_n "checking for $ac_word... " >&6; }
23581if ${ac_cv_path_DTRACE+:} false; then :
23582  $as_echo_n "(cached) " >&6
23583else
23584  case $DTRACE in
23585  [\\/]* | ?:[\\/]*)
23586  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23587  ;;
23588  *)
23589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23590for as_dir in $PATH
23591do
23592  IFS=$as_save_IFS
23593  test -z "$as_dir" && as_dir=.
23594    for ac_exec_ext in '' $ac_executable_extensions; do
23595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23596    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23598    break 2
23599  fi
23600done
23601  done
23602IFS=$as_save_IFS
23603
23604  ;;
23605esac
23606fi
23607DTRACE=$ac_cv_path_DTRACE
23608if test -n "$DTRACE"; then
23609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23610$as_echo "$DTRACE" >&6; }
23611else
23612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23613$as_echo "no" >&6; }
23614fi
23615
23616
23617          if test "x$DTRACE" = x; then
23618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23619          fi
23620        else
23621          # Otherwise we believe it is a complete path. Use it as it is.
23622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23623$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23625$as_echo_n "checking for DTRACE... " >&6; }
23626          if test ! -x "$tool_specified"; then
23627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23628$as_echo "not found" >&6; }
23629            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23630          fi
23631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23632$as_echo "$tool_specified" >&6; }
23633        fi
23634      fi
23635    fi
23636
23637  fi
23638
23639
23640
23641
23642  # Publish this variable in the help.
23643
23644
23645  if [ -z "${PATCH+x}" ]; then
23646    # The variable is not set by user, try to locate tool using the code snippet
23647    for ac_prog in gpatch patch
23648do
23649  # Extract the first word of "$ac_prog", so it can be a program name with args.
23650set dummy $ac_prog; ac_word=$2
23651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23652$as_echo_n "checking for $ac_word... " >&6; }
23653if ${ac_cv_path_PATCH+:} false; then :
23654  $as_echo_n "(cached) " >&6
23655else
23656  case $PATCH in
23657  [\\/]* | ?:[\\/]*)
23658  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23659  ;;
23660  *)
23661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23662for as_dir in $PATH
23663do
23664  IFS=$as_save_IFS
23665  test -z "$as_dir" && as_dir=.
23666    for ac_exec_ext in '' $ac_executable_extensions; do
23667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23668    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23670    break 2
23671  fi
23672done
23673  done
23674IFS=$as_save_IFS
23675
23676  ;;
23677esac
23678fi
23679PATCH=$ac_cv_path_PATCH
23680if test -n "$PATCH"; then
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23682$as_echo "$PATCH" >&6; }
23683else
23684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23685$as_echo "no" >&6; }
23686fi
23687
23688
23689  test -n "$PATCH" && break
23690done
23691
23692  else
23693    # The variable is set, but is it from the command line or the environment?
23694
23695    # Try to remove the string !PATCH! from our list.
23696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23698      # If it failed, the variable was not from the command line. Ignore it,
23699      # but warn the user (except for BASH, which is always set by the calling BASH).
23700      if test "xPATCH" != xBASH; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23702$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23703      fi
23704      # Try to locate tool using the code snippet
23705      for ac_prog in gpatch patch
23706do
23707  # Extract the first word of "$ac_prog", so it can be a program name with args.
23708set dummy $ac_prog; ac_word=$2
23709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23710$as_echo_n "checking for $ac_word... " >&6; }
23711if ${ac_cv_path_PATCH+:} false; then :
23712  $as_echo_n "(cached) " >&6
23713else
23714  case $PATCH in
23715  [\\/]* | ?:[\\/]*)
23716  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23717  ;;
23718  *)
23719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23720for as_dir in $PATH
23721do
23722  IFS=$as_save_IFS
23723  test -z "$as_dir" && as_dir=.
23724    for ac_exec_ext in '' $ac_executable_extensions; do
23725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23726    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23728    break 2
23729  fi
23730done
23731  done
23732IFS=$as_save_IFS
23733
23734  ;;
23735esac
23736fi
23737PATCH=$ac_cv_path_PATCH
23738if test -n "$PATCH"; then
23739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23740$as_echo "$PATCH" >&6; }
23741else
23742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23743$as_echo "no" >&6; }
23744fi
23745
23746
23747  test -n "$PATCH" && break
23748done
23749
23750    else
23751      # If it succeeded, then it was overridden by the user. We will use it
23752      # for the tool.
23753
23754      # First remove it from the list of overridden variables, so we can test
23755      # for unknown variables in the end.
23756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23757
23758      # Check if we try to supply an empty value
23759      if test "x$PATCH" = x; then
23760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23761$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23763$as_echo_n "checking for PATCH... " >&6; }
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23765$as_echo "disabled" >&6; }
23766      else
23767        # Check if the provided tool contains a complete path.
23768        tool_specified="$PATCH"
23769        tool_basename="${tool_specified##*/}"
23770        if test "x$tool_basename" = "x$tool_specified"; then
23771          # A command without a complete path is provided, search $PATH.
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23773$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23774          # Extract the first word of "$tool_basename", so it can be a program name with args.
23775set dummy $tool_basename; ac_word=$2
23776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23777$as_echo_n "checking for $ac_word... " >&6; }
23778if ${ac_cv_path_PATCH+:} false; then :
23779  $as_echo_n "(cached) " >&6
23780else
23781  case $PATCH in
23782  [\\/]* | ?:[\\/]*)
23783  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23784  ;;
23785  *)
23786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23787for as_dir in $PATH
23788do
23789  IFS=$as_save_IFS
23790  test -z "$as_dir" && as_dir=.
23791    for ac_exec_ext in '' $ac_executable_extensions; do
23792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23793    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23795    break 2
23796  fi
23797done
23798  done
23799IFS=$as_save_IFS
23800
23801  ;;
23802esac
23803fi
23804PATCH=$ac_cv_path_PATCH
23805if test -n "$PATCH"; then
23806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23807$as_echo "$PATCH" >&6; }
23808else
23809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23810$as_echo "no" >&6; }
23811fi
23812
23813
23814          if test "x$PATCH" = x; then
23815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23816          fi
23817        else
23818          # Otherwise we believe it is a complete path. Use it as it is.
23819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23820$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23822$as_echo_n "checking for PATCH... " >&6; }
23823          if test ! -x "$tool_specified"; then
23824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23825$as_echo "not found" >&6; }
23826            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23827          fi
23828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23829$as_echo "$tool_specified" >&6; }
23830        fi
23831      fi
23832    fi
23833
23834  fi
23835
23836
23837  # Check if it's GNU time
23838  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23839  if test "x$IS_GNU_TIME" != x; then
23840    IS_GNU_TIME=yes
23841  else
23842    IS_GNU_TIME=no
23843  fi
23844
23845
23846  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23847
23848
23849
23850  # Publish this variable in the help.
23851
23852
23853  if [ -z "${DSYMUTIL+x}" ]; then
23854    # The variable is not set by user, try to locate tool using the code snippet
23855    for ac_prog in dsymutil
23856do
23857  # Extract the first word of "$ac_prog", so it can be a program name with args.
23858set dummy $ac_prog; ac_word=$2
23859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23860$as_echo_n "checking for $ac_word... " >&6; }
23861if ${ac_cv_path_DSYMUTIL+:} false; then :
23862  $as_echo_n "(cached) " >&6
23863else
23864  case $DSYMUTIL in
23865  [\\/]* | ?:[\\/]*)
23866  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23867  ;;
23868  *)
23869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23870for as_dir in $PATH
23871do
23872  IFS=$as_save_IFS
23873  test -z "$as_dir" && as_dir=.
23874    for ac_exec_ext in '' $ac_executable_extensions; do
23875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23876    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23878    break 2
23879  fi
23880done
23881  done
23882IFS=$as_save_IFS
23883
23884  ;;
23885esac
23886fi
23887DSYMUTIL=$ac_cv_path_DSYMUTIL
23888if test -n "$DSYMUTIL"; then
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23890$as_echo "$DSYMUTIL" >&6; }
23891else
23892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23893$as_echo "no" >&6; }
23894fi
23895
23896
23897  test -n "$DSYMUTIL" && break
23898done
23899
23900  else
23901    # The variable is set, but is it from the command line or the environment?
23902
23903    # Try to remove the string !DSYMUTIL! from our list.
23904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23906      # If it failed, the variable was not from the command line. Ignore it,
23907      # but warn the user (except for BASH, which is always set by the calling BASH).
23908      if test "xDSYMUTIL" != xBASH; then
23909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23910$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23911      fi
23912      # Try to locate tool using the code snippet
23913      for ac_prog in dsymutil
23914do
23915  # Extract the first word of "$ac_prog", so it can be a program name with args.
23916set dummy $ac_prog; ac_word=$2
23917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23918$as_echo_n "checking for $ac_word... " >&6; }
23919if ${ac_cv_path_DSYMUTIL+:} false; then :
23920  $as_echo_n "(cached) " >&6
23921else
23922  case $DSYMUTIL in
23923  [\\/]* | ?:[\\/]*)
23924  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23925  ;;
23926  *)
23927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23928for as_dir in $PATH
23929do
23930  IFS=$as_save_IFS
23931  test -z "$as_dir" && as_dir=.
23932    for ac_exec_ext in '' $ac_executable_extensions; do
23933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23934    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23936    break 2
23937  fi
23938done
23939  done
23940IFS=$as_save_IFS
23941
23942  ;;
23943esac
23944fi
23945DSYMUTIL=$ac_cv_path_DSYMUTIL
23946if test -n "$DSYMUTIL"; then
23947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23948$as_echo "$DSYMUTIL" >&6; }
23949else
23950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23951$as_echo "no" >&6; }
23952fi
23953
23954
23955  test -n "$DSYMUTIL" && break
23956done
23957
23958    else
23959      # If it succeeded, then it was overridden by the user. We will use it
23960      # for the tool.
23961
23962      # First remove it from the list of overridden variables, so we can test
23963      # for unknown variables in the end.
23964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23965
23966      # Check if we try to supply an empty value
23967      if test "x$DSYMUTIL" = x; then
23968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23969$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23971$as_echo_n "checking for DSYMUTIL... " >&6; }
23972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23973$as_echo "disabled" >&6; }
23974      else
23975        # Check if the provided tool contains a complete path.
23976        tool_specified="$DSYMUTIL"
23977        tool_basename="${tool_specified##*/}"
23978        if test "x$tool_basename" = "x$tool_specified"; then
23979          # A command without a complete path is provided, search $PATH.
23980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23981$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23982          # Extract the first word of "$tool_basename", so it can be a program name with args.
23983set dummy $tool_basename; ac_word=$2
23984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23985$as_echo_n "checking for $ac_word... " >&6; }
23986if ${ac_cv_path_DSYMUTIL+:} false; then :
23987  $as_echo_n "(cached) " >&6
23988else
23989  case $DSYMUTIL in
23990  [\\/]* | ?:[\\/]*)
23991  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23992  ;;
23993  *)
23994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23995for as_dir in $PATH
23996do
23997  IFS=$as_save_IFS
23998  test -z "$as_dir" && as_dir=.
23999    for ac_exec_ext in '' $ac_executable_extensions; do
24000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24001    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24003    break 2
24004  fi
24005done
24006  done
24007IFS=$as_save_IFS
24008
24009  ;;
24010esac
24011fi
24012DSYMUTIL=$ac_cv_path_DSYMUTIL
24013if test -n "$DSYMUTIL"; then
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24015$as_echo "$DSYMUTIL" >&6; }
24016else
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24018$as_echo "no" >&6; }
24019fi
24020
24021
24022          if test "x$DSYMUTIL" = x; then
24023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24024          fi
24025        else
24026          # Otherwise we believe it is a complete path. Use it as it is.
24027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24028$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24030$as_echo_n "checking for DSYMUTIL... " >&6; }
24031          if test ! -x "$tool_specified"; then
24032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24033$as_echo "not found" >&6; }
24034            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24035          fi
24036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24037$as_echo "$tool_specified" >&6; }
24038        fi
24039      fi
24040    fi
24041
24042  fi
24043
24044
24045
24046  if test "x$DSYMUTIL" = x; then
24047    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24048  fi
24049
24050
24051
24052
24053
24054  # Publish this variable in the help.
24055
24056
24057  if [ -z "${XATTR+x}" ]; then
24058    # The variable is not set by user, try to locate tool using the code snippet
24059    for ac_prog in xattr
24060do
24061  # Extract the first word of "$ac_prog", so it can be a program name with args.
24062set dummy $ac_prog; ac_word=$2
24063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24064$as_echo_n "checking for $ac_word... " >&6; }
24065if ${ac_cv_path_XATTR+:} false; then :
24066  $as_echo_n "(cached) " >&6
24067else
24068  case $XATTR in
24069  [\\/]* | ?:[\\/]*)
24070  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24071  ;;
24072  *)
24073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24074for as_dir in $PATH
24075do
24076  IFS=$as_save_IFS
24077  test -z "$as_dir" && as_dir=.
24078    for ac_exec_ext in '' $ac_executable_extensions; do
24079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24080    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24082    break 2
24083  fi
24084done
24085  done
24086IFS=$as_save_IFS
24087
24088  ;;
24089esac
24090fi
24091XATTR=$ac_cv_path_XATTR
24092if test -n "$XATTR"; then
24093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24094$as_echo "$XATTR" >&6; }
24095else
24096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24097$as_echo "no" >&6; }
24098fi
24099
24100
24101  test -n "$XATTR" && break
24102done
24103
24104  else
24105    # The variable is set, but is it from the command line or the environment?
24106
24107    # Try to remove the string !XATTR! from our list.
24108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24110      # If it failed, the variable was not from the command line. Ignore it,
24111      # but warn the user (except for BASH, which is always set by the calling BASH).
24112      if test "xXATTR" != xBASH; then
24113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24114$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24115      fi
24116      # Try to locate tool using the code snippet
24117      for ac_prog in xattr
24118do
24119  # Extract the first word of "$ac_prog", so it can be a program name with args.
24120set dummy $ac_prog; ac_word=$2
24121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24122$as_echo_n "checking for $ac_word... " >&6; }
24123if ${ac_cv_path_XATTR+:} false; then :
24124  $as_echo_n "(cached) " >&6
24125else
24126  case $XATTR in
24127  [\\/]* | ?:[\\/]*)
24128  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24129  ;;
24130  *)
24131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24132for as_dir in $PATH
24133do
24134  IFS=$as_save_IFS
24135  test -z "$as_dir" && as_dir=.
24136    for ac_exec_ext in '' $ac_executable_extensions; do
24137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24138    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24140    break 2
24141  fi
24142done
24143  done
24144IFS=$as_save_IFS
24145
24146  ;;
24147esac
24148fi
24149XATTR=$ac_cv_path_XATTR
24150if test -n "$XATTR"; then
24151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24152$as_echo "$XATTR" >&6; }
24153else
24154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24155$as_echo "no" >&6; }
24156fi
24157
24158
24159  test -n "$XATTR" && break
24160done
24161
24162    else
24163      # If it succeeded, then it was overridden by the user. We will use it
24164      # for the tool.
24165
24166      # First remove it from the list of overridden variables, so we can test
24167      # for unknown variables in the end.
24168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24169
24170      # Check if we try to supply an empty value
24171      if test "x$XATTR" = x; then
24172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24173$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24175$as_echo_n "checking for XATTR... " >&6; }
24176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24177$as_echo "disabled" >&6; }
24178      else
24179        # Check if the provided tool contains a complete path.
24180        tool_specified="$XATTR"
24181        tool_basename="${tool_specified##*/}"
24182        if test "x$tool_basename" = "x$tool_specified"; then
24183          # A command without a complete path is provided, search $PATH.
24184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24185$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24186          # Extract the first word of "$tool_basename", so it can be a program name with args.
24187set dummy $tool_basename; ac_word=$2
24188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24189$as_echo_n "checking for $ac_word... " >&6; }
24190if ${ac_cv_path_XATTR+:} false; then :
24191  $as_echo_n "(cached) " >&6
24192else
24193  case $XATTR in
24194  [\\/]* | ?:[\\/]*)
24195  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24196  ;;
24197  *)
24198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24199for as_dir in $PATH
24200do
24201  IFS=$as_save_IFS
24202  test -z "$as_dir" && as_dir=.
24203    for ac_exec_ext in '' $ac_executable_extensions; do
24204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24205    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24207    break 2
24208  fi
24209done
24210  done
24211IFS=$as_save_IFS
24212
24213  ;;
24214esac
24215fi
24216XATTR=$ac_cv_path_XATTR
24217if test -n "$XATTR"; then
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24219$as_echo "$XATTR" >&6; }
24220else
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24222$as_echo "no" >&6; }
24223fi
24224
24225
24226          if test "x$XATTR" = x; then
24227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24228          fi
24229        else
24230          # Otherwise we believe it is a complete path. Use it as it is.
24231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24232$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24234$as_echo_n "checking for XATTR... " >&6; }
24235          if test ! -x "$tool_specified"; then
24236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24237$as_echo "not found" >&6; }
24238            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24239          fi
24240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24241$as_echo "$tool_specified" >&6; }
24242        fi
24243      fi
24244    fi
24245
24246  fi
24247
24248
24249
24250  if test "x$XATTR" = x; then
24251    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24252  fi
24253
24254
24255
24256
24257  # Publish this variable in the help.
24258
24259
24260  if [ -z "${CODESIGN+x}" ]; then
24261    # The variable is not set by user, try to locate tool using the code snippet
24262    for ac_prog in codesign
24263do
24264  # Extract the first word of "$ac_prog", so it can be a program name with args.
24265set dummy $ac_prog; ac_word=$2
24266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24267$as_echo_n "checking for $ac_word... " >&6; }
24268if ${ac_cv_path_CODESIGN+:} false; then :
24269  $as_echo_n "(cached) " >&6
24270else
24271  case $CODESIGN in
24272  [\\/]* | ?:[\\/]*)
24273  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24274  ;;
24275  *)
24276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24277for as_dir in $PATH
24278do
24279  IFS=$as_save_IFS
24280  test -z "$as_dir" && as_dir=.
24281    for ac_exec_ext in '' $ac_executable_extensions; do
24282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24283    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24285    break 2
24286  fi
24287done
24288  done
24289IFS=$as_save_IFS
24290
24291  ;;
24292esac
24293fi
24294CODESIGN=$ac_cv_path_CODESIGN
24295if test -n "$CODESIGN"; then
24296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24297$as_echo "$CODESIGN" >&6; }
24298else
24299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24300$as_echo "no" >&6; }
24301fi
24302
24303
24304  test -n "$CODESIGN" && break
24305done
24306
24307  else
24308    # The variable is set, but is it from the command line or the environment?
24309
24310    # Try to remove the string !CODESIGN! from our list.
24311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24313      # If it failed, the variable was not from the command line. Ignore it,
24314      # but warn the user (except for BASH, which is always set by the calling BASH).
24315      if test "xCODESIGN" != xBASH; then
24316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24317$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24318      fi
24319      # Try to locate tool using the code snippet
24320      for ac_prog in codesign
24321do
24322  # Extract the first word of "$ac_prog", so it can be a program name with args.
24323set dummy $ac_prog; ac_word=$2
24324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24325$as_echo_n "checking for $ac_word... " >&6; }
24326if ${ac_cv_path_CODESIGN+:} false; then :
24327  $as_echo_n "(cached) " >&6
24328else
24329  case $CODESIGN in
24330  [\\/]* | ?:[\\/]*)
24331  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24332  ;;
24333  *)
24334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24335for as_dir in $PATH
24336do
24337  IFS=$as_save_IFS
24338  test -z "$as_dir" && as_dir=.
24339    for ac_exec_ext in '' $ac_executable_extensions; do
24340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24341    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24343    break 2
24344  fi
24345done
24346  done
24347IFS=$as_save_IFS
24348
24349  ;;
24350esac
24351fi
24352CODESIGN=$ac_cv_path_CODESIGN
24353if test -n "$CODESIGN"; then
24354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24355$as_echo "$CODESIGN" >&6; }
24356else
24357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24358$as_echo "no" >&6; }
24359fi
24360
24361
24362  test -n "$CODESIGN" && break
24363done
24364
24365    else
24366      # If it succeeded, then it was overridden by the user. We will use it
24367      # for the tool.
24368
24369      # First remove it from the list of overridden variables, so we can test
24370      # for unknown variables in the end.
24371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24372
24373      # Check if we try to supply an empty value
24374      if test "x$CODESIGN" = x; then
24375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24376$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24378$as_echo_n "checking for CODESIGN... " >&6; }
24379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24380$as_echo "disabled" >&6; }
24381      else
24382        # Check if the provided tool contains a complete path.
24383        tool_specified="$CODESIGN"
24384        tool_basename="${tool_specified##*/}"
24385        if test "x$tool_basename" = "x$tool_specified"; then
24386          # A command without a complete path is provided, search $PATH.
24387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24388$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24389          # Extract the first word of "$tool_basename", so it can be a program name with args.
24390set dummy $tool_basename; ac_word=$2
24391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24392$as_echo_n "checking for $ac_word... " >&6; }
24393if ${ac_cv_path_CODESIGN+:} false; then :
24394  $as_echo_n "(cached) " >&6
24395else
24396  case $CODESIGN in
24397  [\\/]* | ?:[\\/]*)
24398  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24399  ;;
24400  *)
24401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24402for as_dir in $PATH
24403do
24404  IFS=$as_save_IFS
24405  test -z "$as_dir" && as_dir=.
24406    for ac_exec_ext in '' $ac_executable_extensions; do
24407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24408    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24410    break 2
24411  fi
24412done
24413  done
24414IFS=$as_save_IFS
24415
24416  ;;
24417esac
24418fi
24419CODESIGN=$ac_cv_path_CODESIGN
24420if test -n "$CODESIGN"; then
24421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24422$as_echo "$CODESIGN" >&6; }
24423else
24424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24425$as_echo "no" >&6; }
24426fi
24427
24428
24429          if test "x$CODESIGN" = x; then
24430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24431          fi
24432        else
24433          # Otherwise we believe it is a complete path. Use it as it is.
24434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24435$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24437$as_echo_n "checking for CODESIGN... " >&6; }
24438          if test ! -x "$tool_specified"; then
24439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24440$as_echo "not found" >&6; }
24441            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24442          fi
24443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24444$as_echo "$tool_specified" >&6; }
24445        fi
24446      fi
24447    fi
24448
24449  fi
24450
24451
24452    if test "x$CODESIGN" != "x"; then
24453      # Verify that the openjdk_codesign certificate is present
24454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24455$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24456      $RM codesign-testfile
24457      $TOUCH codesign-testfile
24458      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24459      $RM codesign-testfile
24460      if test "x$CODESIGN" = x; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24462$as_echo "no" >&6; }
24463      else
24464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24465$as_echo "yes" >&6; }
24466      fi
24467    fi
24468
24469
24470
24471  # Publish this variable in the help.
24472
24473
24474  if [ -z "${SETFILE+x}" ]; then
24475    # The variable is not set by user, try to locate tool using the code snippet
24476    for ac_prog in SetFile
24477do
24478  # Extract the first word of "$ac_prog", so it can be a program name with args.
24479set dummy $ac_prog; ac_word=$2
24480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24481$as_echo_n "checking for $ac_word... " >&6; }
24482if ${ac_cv_path_SETFILE+:} false; then :
24483  $as_echo_n "(cached) " >&6
24484else
24485  case $SETFILE in
24486  [\\/]* | ?:[\\/]*)
24487  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24488  ;;
24489  *)
24490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24491for as_dir in $PATH
24492do
24493  IFS=$as_save_IFS
24494  test -z "$as_dir" && as_dir=.
24495    for ac_exec_ext in '' $ac_executable_extensions; do
24496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24497    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24499    break 2
24500  fi
24501done
24502  done
24503IFS=$as_save_IFS
24504
24505  ;;
24506esac
24507fi
24508SETFILE=$ac_cv_path_SETFILE
24509if test -n "$SETFILE"; then
24510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24511$as_echo "$SETFILE" >&6; }
24512else
24513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24514$as_echo "no" >&6; }
24515fi
24516
24517
24518  test -n "$SETFILE" && break
24519done
24520
24521  else
24522    # The variable is set, but is it from the command line or the environment?
24523
24524    # Try to remove the string !SETFILE! from our list.
24525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24527      # If it failed, the variable was not from the command line. Ignore it,
24528      # but warn the user (except for BASH, which is always set by the calling BASH).
24529      if test "xSETFILE" != xBASH; then
24530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24531$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24532      fi
24533      # Try to locate tool using the code snippet
24534      for ac_prog in SetFile
24535do
24536  # Extract the first word of "$ac_prog", so it can be a program name with args.
24537set dummy $ac_prog; ac_word=$2
24538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24539$as_echo_n "checking for $ac_word... " >&6; }
24540if ${ac_cv_path_SETFILE+:} false; then :
24541  $as_echo_n "(cached) " >&6
24542else
24543  case $SETFILE in
24544  [\\/]* | ?:[\\/]*)
24545  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24546  ;;
24547  *)
24548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24549for as_dir in $PATH
24550do
24551  IFS=$as_save_IFS
24552  test -z "$as_dir" && as_dir=.
24553    for ac_exec_ext in '' $ac_executable_extensions; do
24554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24555    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24557    break 2
24558  fi
24559done
24560  done
24561IFS=$as_save_IFS
24562
24563  ;;
24564esac
24565fi
24566SETFILE=$ac_cv_path_SETFILE
24567if test -n "$SETFILE"; then
24568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24569$as_echo "$SETFILE" >&6; }
24570else
24571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24572$as_echo "no" >&6; }
24573fi
24574
24575
24576  test -n "$SETFILE" && break
24577done
24578
24579    else
24580      # If it succeeded, then it was overridden by the user. We will use it
24581      # for the tool.
24582
24583      # First remove it from the list of overridden variables, so we can test
24584      # for unknown variables in the end.
24585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24586
24587      # Check if we try to supply an empty value
24588      if test "x$SETFILE" = x; then
24589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24590$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24592$as_echo_n "checking for SETFILE... " >&6; }
24593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24594$as_echo "disabled" >&6; }
24595      else
24596        # Check if the provided tool contains a complete path.
24597        tool_specified="$SETFILE"
24598        tool_basename="${tool_specified##*/}"
24599        if test "x$tool_basename" = "x$tool_specified"; then
24600          # A command without a complete path is provided, search $PATH.
24601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24602$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24603          # Extract the first word of "$tool_basename", so it can be a program name with args.
24604set dummy $tool_basename; ac_word=$2
24605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24606$as_echo_n "checking for $ac_word... " >&6; }
24607if ${ac_cv_path_SETFILE+:} false; then :
24608  $as_echo_n "(cached) " >&6
24609else
24610  case $SETFILE in
24611  [\\/]* | ?:[\\/]*)
24612  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24613  ;;
24614  *)
24615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24616for as_dir in $PATH
24617do
24618  IFS=$as_save_IFS
24619  test -z "$as_dir" && as_dir=.
24620    for ac_exec_ext in '' $ac_executable_extensions; do
24621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24622    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24624    break 2
24625  fi
24626done
24627  done
24628IFS=$as_save_IFS
24629
24630  ;;
24631esac
24632fi
24633SETFILE=$ac_cv_path_SETFILE
24634if test -n "$SETFILE"; then
24635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24636$as_echo "$SETFILE" >&6; }
24637else
24638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24639$as_echo "no" >&6; }
24640fi
24641
24642
24643          if test "x$SETFILE" = x; then
24644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24645          fi
24646        else
24647          # Otherwise we believe it is a complete path. Use it as it is.
24648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24649$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24651$as_echo_n "checking for SETFILE... " >&6; }
24652          if test ! -x "$tool_specified"; then
24653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24654$as_echo "not found" >&6; }
24655            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24656          fi
24657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24658$as_echo "$tool_specified" >&6; }
24659        fi
24660      fi
24661    fi
24662
24663  fi
24664
24665
24666
24667  if test "x$SETFILE" = x; then
24668    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24669  fi
24670
24671
24672  fi
24673
24674
24675  # Check bash version
24676  # Extra [ ] to stop m4 mangling
24677   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24679$as_echo_n "checking bash version... " >&6; }
24680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24681$as_echo "$BASH_VER" >&6; }
24682
24683  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24684  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24685  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24686    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24687  fi
24688
24689  # Test if bash supports pipefail.
24690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24691$as_echo_n "checking if bash supports pipefail... " >&6; }
24692  if ${BASH} -c 'set -o pipefail'; then
24693    BASH_ARGS="$BASH_ARGS -o pipefail"
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24695$as_echo "yes" >&6; }
24696  else
24697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24698$as_echo "no" >&6; }
24699  fi
24700
24701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24702$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24703  if ${BASH} -e -c 'true'; then
24704    BASH_ARGS="$BASH_ARGS -e"
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24706$as_echo "yes" >&6; }
24707  else
24708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24709$as_echo "no" >&6; }
24710  fi
24711
24712
24713
24714
24715# Check if pkg-config is available.
24716
24717
24718if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24719	if test -n "$ac_tool_prefix"; then
24720  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24721set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24723$as_echo_n "checking for $ac_word... " >&6; }
24724if ${ac_cv_path_PKG_CONFIG+:} false; then :
24725  $as_echo_n "(cached) " >&6
24726else
24727  case $PKG_CONFIG in
24728  [\\/]* | ?:[\\/]*)
24729  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24730  ;;
24731  *)
24732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24733for as_dir in $PATH
24734do
24735  IFS=$as_save_IFS
24736  test -z "$as_dir" && as_dir=.
24737    for ac_exec_ext in '' $ac_executable_extensions; do
24738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24739    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24741    break 2
24742  fi
24743done
24744  done
24745IFS=$as_save_IFS
24746
24747  ;;
24748esac
24749fi
24750PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24751if test -n "$PKG_CONFIG"; then
24752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24753$as_echo "$PKG_CONFIG" >&6; }
24754else
24755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24756$as_echo "no" >&6; }
24757fi
24758
24759
24760fi
24761if test -z "$ac_cv_path_PKG_CONFIG"; then
24762  ac_pt_PKG_CONFIG=$PKG_CONFIG
24763  # Extract the first word of "pkg-config", so it can be a program name with args.
24764set dummy pkg-config; ac_word=$2
24765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24766$as_echo_n "checking for $ac_word... " >&6; }
24767if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24768  $as_echo_n "(cached) " >&6
24769else
24770  case $ac_pt_PKG_CONFIG in
24771  [\\/]* | ?:[\\/]*)
24772  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24773  ;;
24774  *)
24775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24776for as_dir in $PATH
24777do
24778  IFS=$as_save_IFS
24779  test -z "$as_dir" && as_dir=.
24780    for ac_exec_ext in '' $ac_executable_extensions; do
24781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24782    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24784    break 2
24785  fi
24786done
24787  done
24788IFS=$as_save_IFS
24789
24790  ;;
24791esac
24792fi
24793ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24794if test -n "$ac_pt_PKG_CONFIG"; then
24795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24796$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24797else
24798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24799$as_echo "no" >&6; }
24800fi
24801
24802  if test "x$ac_pt_PKG_CONFIG" = x; then
24803    PKG_CONFIG=""
24804  else
24805    case $cross_compiling:$ac_tool_warned in
24806yes:)
24807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24809ac_tool_warned=yes ;;
24810esac
24811    PKG_CONFIG=$ac_pt_PKG_CONFIG
24812  fi
24813else
24814  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24815fi
24816
24817fi
24818if test -n "$PKG_CONFIG"; then
24819	_pkg_min_version=0.9.0
24820	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24821$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24822	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24823		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24824$as_echo "yes" >&6; }
24825	else
24826		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24827$as_echo "no" >&6; }
24828		PKG_CONFIG=""
24829	fi
24830
24831fi
24832
24833# After basic tools have been setup, we can check build os specific details.
24834
24835  ###############################################################################
24836
24837  # Note that this is the build platform OS version!
24838
24839  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24840  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24841  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24842  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24843
24844
24845
24846
24847
24848# Misc basic settings
24849
24850
24851# Check whether --with-default-make-target was given.
24852if test "${with_default_make_target+set}" = set; then :
24853  withval=$with_default_make_target;
24854fi
24855
24856  if test "x$with_default_make_target" = "x" \
24857      || test "x$with_default_make_target" = "xyes"; then
24858    DEFAULT_MAKE_TARGET="exploded-image"
24859  elif test "x$with_default_make_target" = "xno"; then
24860    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24861  else
24862    DEFAULT_MAKE_TARGET="$with_default_make_target"
24863  fi
24864
24865
24866
24867
24868###############################################################################
24869#
24870# Determine OpenJDK variants, options and version numbers.
24871#
24872###############################################################################
24873
24874# We need build & target for this.
24875
24876  # Should we build a JDK without a graphical UI?
24877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24878$as_echo_n "checking headless only... " >&6; }
24879  # Check whether --enable-headless-only was given.
24880if test "${enable_headless_only+set}" = set; then :
24881  enableval=$enable_headless_only;
24882fi
24883
24884
24885  if test "x$enable_headless_only" = "xyes"; then
24886    ENABLE_HEADLESS_ONLY="true"
24887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24888$as_echo "yes" >&6; }
24889  elif test "x$enable_headless_only" = "xno"; then
24890    ENABLE_HEADLESS_ONLY="false"
24891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24892$as_echo "no" >&6; }
24893  elif test "x$enable_headless_only" = "x"; then
24894    ENABLE_HEADLESS_ONLY="false"
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24896$as_echo "no" >&6; }
24897  else
24898    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24899  fi
24900
24901
24902
24903  # Should we build the complete docs, or just a lightweight version?
24904  # Check whether --enable-full-docs was given.
24905if test "${enable_full_docs+set}" = set; then :
24906  enableval=$enable_full_docs;
24907fi
24908
24909
24910  # Verify dependencies
24911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24912$as_echo_n "checking for graphviz dot... " >&6; }
24913  if test "x$DOT" != "x"; then
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24915$as_echo "yes" >&6; }
24916  else
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24918$as_echo "no, cannot generate full docs" >&6; }
24919    FULL_DOCS_DEP_MISSING=true
24920  fi
24921
24922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24923$as_echo_n "checking for pandoc... " >&6; }
24924  if test "x$PANDOC" != "x"; then
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24926$as_echo "yes" >&6; }
24927  else
24928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24929$as_echo "no, cannot generate full docs" >&6; }
24930    FULL_DOCS_DEP_MISSING=true
24931  fi
24932
24933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24934$as_echo_n "checking full docs... " >&6; }
24935  if test "x$enable_full_docs" = xyes; then
24936    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24938$as_echo "no, missing dependencies" >&6; }
24939
24940  # Print a helpful message on how to acquire the necessary build dependency.
24941  # dot is the help tag: freetype, cups, alsa etc
24942  MISSING_DEPENDENCY=dot
24943
24944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24945    cygwin_help $MISSING_DEPENDENCY
24946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24947    msys_help $MISSING_DEPENDENCY
24948  else
24949    PKGHANDLER_COMMAND=
24950
24951    case $PKGHANDLER in
24952      apt-get)
24953        apt_help     $MISSING_DEPENDENCY ;;
24954      yum)
24955        yum_help     $MISSING_DEPENDENCY ;;
24956      brew)
24957        brew_help    $MISSING_DEPENDENCY ;;
24958      port)
24959        port_help    $MISSING_DEPENDENCY ;;
24960      pkgutil)
24961        pkgutil_help $MISSING_DEPENDENCY ;;
24962      pkgadd)
24963        pkgadd_help  $MISSING_DEPENDENCY ;;
24964    esac
24965
24966    if test "x$PKGHANDLER_COMMAND" != x; then
24967      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24968    fi
24969  fi
24970
24971      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24972    else
24973      ENABLE_FULL_DOCS=true
24974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24975$as_echo "yes, forced" >&6; }
24976    fi
24977  elif test "x$enable_full_docs" = xno; then
24978    ENABLE_FULL_DOCS=false
24979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24980$as_echo "no, forced" >&6; }
24981  elif test "x$enable_full_docs" = x; then
24982    # Check for prerequisites
24983    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24984      ENABLE_FULL_DOCS=false
24985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24986$as_echo "no, missing dependencies" >&6; }
24987    else
24988      ENABLE_FULL_DOCS=true
24989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24990$as_echo "yes, dependencies present" >&6; }
24991    fi
24992  else
24993    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24994  fi
24995
24996
24997
24998  # Choose cacerts source file
24999
25000# Check whether --with-cacerts-file was given.
25001if test "${with_cacerts_file+set}" = set; then :
25002  withval=$with_cacerts_file;
25003fi
25004
25005  if test "x$with_cacerts_file" != x; then
25006    CACERTS_FILE=$with_cacerts_file
25007  fi
25008
25009
25010  # Enable or disable unlimited crypto
25011  # Check whether --enable-unlimited-crypto was given.
25012if test "${enable_unlimited_crypto+set}" = set; then :
25013  enableval=$enable_unlimited_crypto;
25014else
25015  enable_unlimited_crypto=yes
25016fi
25017
25018  if test "x$enable_unlimited_crypto" = "xyes"; then
25019    UNLIMITED_CRYPTO=true
25020  else
25021    UNLIMITED_CRYPTO=false
25022  fi
25023
25024
25025  # Should we build the serviceability agent (SA)?
25026  INCLUDE_SA=true
25027  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25028    INCLUDE_SA=false
25029  fi
25030  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25031    INCLUDE_SA=false
25032  fi
25033
25034
25035  # Compress jars
25036  COMPRESS_JARS=false
25037
25038
25039
25040  # Setup default copyright year. Mostly overridden when building close to a new year.
25041
25042# Check whether --with-copyright-year was given.
25043if test "${with_copyright_year+set}" = set; then :
25044  withval=$with_copyright_year;
25045fi
25046
25047  if test "x$with_copyright_year" = xyes; then
25048    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25049  elif test "x$with_copyright_year" != x; then
25050    COPYRIGHT_YEAR="$with_copyright_year"
25051  else
25052    COPYRIGHT_YEAR=`$DATE +'%Y'`
25053  fi
25054
25055
25056
25057  # Check whether --enable-keep-packaged-modules was given.
25058if test "${enable_keep_packaged_modules+set}" = set; then :
25059  enableval=$enable_keep_packaged_modules;
25060fi
25061
25062
25063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25064$as_echo_n "checking if packaged modules are kept... " >&6; }
25065  if test "x$enable_keep_packaged_modules" = "xyes"; then
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25067$as_echo "yes" >&6; }
25068    JLINK_KEEP_PACKAGED_MODULES=true
25069  elif test "x$enable_keep_packaged_modules" = "xno"; then
25070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25071$as_echo "no" >&6; }
25072    JLINK_KEEP_PACKAGED_MODULES=false
25073  elif test "x$enable_keep_packaged_modules" = "x"; then
25074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25075$as_echo "yes (default)" >&6; }
25076    JLINK_KEEP_PACKAGED_MODULES=true
25077  else
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25079$as_echo "error" >&6; }
25080    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25081  fi
25082
25083
25084
25085
25086  # Warn user that old version arguments are deprecated.
25087
25088
25089# Check whether --with-milestone was given.
25090if test "${with_milestone+set}" = set; then :
25091  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25092$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25093fi
25094
25095
25096
25097
25098# Check whether --with-update-version was given.
25099if test "${with_update_version+set}" = set; then :
25100  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25101$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25102fi
25103
25104
25105
25106
25107# Check whether --with-user-release-suffix was given.
25108if test "${with_user_release_suffix+set}" = set; then :
25109  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
25110$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25111fi
25112
25113
25114
25115
25116# Check whether --with-build-number was given.
25117if test "${with_build_number+set}" = set; then :
25118  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25119$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25120fi
25121
25122
25123
25124  # Source the version numbers file
25125  . $AUTOCONF_DIR/version-numbers
25126
25127  # Some non-version number information is set in that file
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137  # Override version from arguments
25138
25139  # If --with-version-string is set, process it first. It is possible to
25140  # override parts with more specific flags, since these are processed later.
25141
25142# Check whether --with-version-string was given.
25143if test "${with_version_string+set}" = set; then :
25144  withval=$with_version_string;
25145fi
25146
25147  if test "x$with_version_string" = xyes; then
25148    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25149  elif test "x$with_version_string" != x; then
25150    # Additional [] needed to keep m4 from mangling shell constructs.
25151    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25152      VERSION_MAJOR=${BASH_REMATCH[1]}
25153      VERSION_MINOR=${BASH_REMATCH[3]}
25154      VERSION_SECURITY=${BASH_REMATCH[5]}
25155      VERSION_PATCH=${BASH_REMATCH[7]}
25156      VERSION_PRE=${BASH_REMATCH[9]}
25157      version_plus_separator=${BASH_REMATCH[11]}
25158      VERSION_BUILD=${BASH_REMATCH[12]}
25159      VERSION_OPT=${BASH_REMATCH[14]}
25160      # Unspecified numerical fields are interpreted as 0.
25161      if test "x$VERSION_MINOR" = x; then
25162        VERSION_MINOR=0
25163      fi
25164      if test "x$VERSION_SECURITY" = x; then
25165        VERSION_SECURITY=0
25166      fi
25167      if test "x$VERSION_PATCH" = x; then
25168        VERSION_PATCH=0
25169      fi
25170      if test "x$version_plus_separator" != x \
25171          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25172        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25173      fi
25174      # Stop the version part process from setting default values.
25175      # We still allow them to explicitly override though.
25176      NO_DEFAULT_VERSION_PARTS=true
25177    else
25178      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25179    fi
25180  fi
25181
25182
25183# Check whether --with-version-pre was given.
25184if test "${with_version_pre+set}" = set; then :
25185  withval=$with_version_pre; with_version_pre_present=true
25186else
25187  with_version_pre_present=false
25188fi
25189
25190
25191  if test "x$with_version_pre_present" = xtrue; then
25192    if test "x$with_version_pre" = xyes; then
25193      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25194    elif test "x$with_version_pre" = xno; then
25195      # Interpret --without-* as empty string instead of the literal "no"
25196      VERSION_PRE=
25197    else
25198      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25199       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25200      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25202$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25203      fi
25204    fi
25205  else
25206    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25207      # Default is to use "internal" as pre
25208      VERSION_PRE="internal"
25209    fi
25210  fi
25211
25212
25213# Check whether --with-version-opt was given.
25214if test "${with_version_opt+set}" = set; then :
25215  withval=$with_version_opt; with_version_opt_present=true
25216else
25217  with_version_opt_present=false
25218fi
25219
25220
25221  if test "x$with_version_opt_present" = xtrue; then
25222    if test "x$with_version_opt" = xyes; then
25223      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25224    elif test "x$with_version_opt" = xno; then
25225      # Interpret --without-* as empty string instead of the literal "no"
25226      VERSION_OPT=
25227    else
25228      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25229       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25230      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25232$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25233      fi
25234    fi
25235  else
25236    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25237      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25238      # Outer [ ] to quote m4.
25239       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25240      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25241    fi
25242  fi
25243
25244
25245# Check whether --with-version-build was given.
25246if test "${with_version_build+set}" = set; then :
25247  withval=$with_version_build; with_version_build_present=true
25248else
25249  with_version_build_present=false
25250fi
25251
25252
25253  if test "x$with_version_build_present" = xtrue; then
25254    if test "x$with_version_build" = xyes; then
25255      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25256    elif test "x$with_version_build" = xno; then
25257      # Interpret --without-* as empty string instead of the literal "no"
25258      VERSION_BUILD=
25259    elif test "x$with_version_build" = x; then
25260      VERSION_BUILD=
25261    else
25262
25263  # Additional [] needed to keep m4 from mangling shell constructs.
25264  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25265    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25266  fi
25267  # Extract the version number without leading zeros.
25268  cleaned_value=${BASH_REMATCH[1]}
25269  if test "x$cleaned_value" = x; then
25270    # Special case for zero
25271    cleaned_value=${BASH_REMATCH[2]}
25272  fi
25273
25274  if test $cleaned_value -gt 255; then
25275    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25276  fi
25277  if test "x$cleaned_value" != "x$with_version_build"; then
25278    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25279$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25280  fi
25281  VERSION_BUILD=$cleaned_value
25282
25283    fi
25284  else
25285    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25286      # Default is to not have a build number.
25287      VERSION_BUILD=""
25288      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25289      VERSION_BUILD=0
25290    fi
25291  fi
25292
25293
25294# Check whether --with-version-major was given.
25295if test "${with_version_major+set}" = set; then :
25296  withval=$with_version_major; with_version_major_present=true
25297else
25298  with_version_major_present=false
25299fi
25300
25301
25302  if test "x$with_version_major_present" = xtrue; then
25303    if test "x$with_version_major" = xyes; then
25304      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25305    else
25306
25307  # Additional [] needed to keep m4 from mangling shell constructs.
25308  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25309    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25310  fi
25311  # Extract the version number without leading zeros.
25312  cleaned_value=${BASH_REMATCH[1]}
25313  if test "x$cleaned_value" = x; then
25314    # Special case for zero
25315    cleaned_value=${BASH_REMATCH[2]}
25316  fi
25317
25318  if test $cleaned_value -gt 255; then
25319    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25320  fi
25321  if test "x$cleaned_value" != "x$with_version_major"; then
25322    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25323$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25324  fi
25325  VERSION_MAJOR=$cleaned_value
25326
25327    fi
25328  else
25329    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25330      # Default is to get value from version-numbers
25331      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25332    fi
25333  fi
25334
25335
25336# Check whether --with-version-minor was given.
25337if test "${with_version_minor+set}" = set; then :
25338  withval=$with_version_minor; with_version_minor_present=true
25339else
25340  with_version_minor_present=false
25341fi
25342
25343
25344  if test "x$with_version_minor_present" = xtrue; then
25345    if test "x$with_version_minor" = xyes; then
25346      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25347    elif test "x$with_version_minor" = xno; then
25348      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25349      VERSION_MINOR=0
25350    elif test "x$with_version_minor" = x; then
25351      VERSION_MINOR=0
25352    else
25353
25354  # Additional [] needed to keep m4 from mangling shell constructs.
25355  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25356    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25357  fi
25358  # Extract the version number without leading zeros.
25359  cleaned_value=${BASH_REMATCH[1]}
25360  if test "x$cleaned_value" = x; then
25361    # Special case for zero
25362    cleaned_value=${BASH_REMATCH[2]}
25363  fi
25364
25365  if test $cleaned_value -gt 255; then
25366    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25367  fi
25368  if test "x$cleaned_value" != "x$with_version_minor"; then
25369    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25370$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25371  fi
25372  VERSION_MINOR=$cleaned_value
25373
25374    fi
25375  else
25376    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25377      # Default is 0, if unspecified
25378      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25379    fi
25380  fi
25381
25382
25383# Check whether --with-version-security was given.
25384if test "${with_version_security+set}" = set; then :
25385  withval=$with_version_security; with_version_security_present=true
25386else
25387  with_version_security_present=false
25388fi
25389
25390
25391  if test "x$with_version_security_present" = xtrue; then
25392    if test "x$with_version_security" = xyes; then
25393      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25394    elif test "x$with_version_security" = xno; then
25395      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25396      VERSION_SECURITY=0
25397    elif test "x$with_version_security" = x; then
25398      VERSION_SECURITY=0
25399    else
25400
25401  # Additional [] needed to keep m4 from mangling shell constructs.
25402  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25403    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25404  fi
25405  # Extract the version number without leading zeros.
25406  cleaned_value=${BASH_REMATCH[1]}
25407  if test "x$cleaned_value" = x; then
25408    # Special case for zero
25409    cleaned_value=${BASH_REMATCH[2]}
25410  fi
25411
25412  if test $cleaned_value -gt 255; then
25413    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25414  fi
25415  if test "x$cleaned_value" != "x$with_version_security"; then
25416    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25417$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25418  fi
25419  VERSION_SECURITY=$cleaned_value
25420
25421    fi
25422  else
25423    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25424      # Default is 0, if unspecified
25425      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25426    fi
25427  fi
25428
25429
25430# Check whether --with-version-patch was given.
25431if test "${with_version_patch+set}" = set; then :
25432  withval=$with_version_patch; with_version_patch_present=true
25433else
25434  with_version_patch_present=false
25435fi
25436
25437
25438  if test "x$with_version_patch_present" = xtrue; then
25439    if test "x$with_version_patch" = xyes; then
25440      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25441    elif test "x$with_version_patch" = xno; then
25442      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25443      VERSION_PATCH=0
25444    elif test "x$with_version_patch" = x; then
25445      VERSION_PATCH=0
25446    else
25447
25448  # Additional [] needed to keep m4 from mangling shell constructs.
25449  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25450    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25451  fi
25452  # Extract the version number without leading zeros.
25453  cleaned_value=${BASH_REMATCH[1]}
25454  if test "x$cleaned_value" = x; then
25455    # Special case for zero
25456    cleaned_value=${BASH_REMATCH[2]}
25457  fi
25458
25459  if test $cleaned_value -gt 255; then
25460    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25461  fi
25462  if test "x$cleaned_value" != "x$with_version_patch"; then
25463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25464$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25465  fi
25466  VERSION_PATCH=$cleaned_value
25467
25468    fi
25469  else
25470    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25471      # Default is 0, if unspecified
25472      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25473    fi
25474  fi
25475
25476  # Calculate derived version properties
25477
25478  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25479  if test "x$VERSION_PRE" = x; then
25480    VERSION_IS_GA=true
25481  else
25482    VERSION_IS_GA=false
25483  fi
25484
25485  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25486  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25487
25488  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25489  # Strip trailing zeroes from stripped_version_number
25490  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25491  VERSION_NUMBER=$stripped_version_number
25492
25493  # The complete version string, with additional build information
25494  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25495    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25496  else
25497    # If either build or opt is set, we need a + separator
25498    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25499  fi
25500
25501  # The short version string, just VERSION_NUMBER and PRE, if present.
25502  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25503
25504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25505$as_echo_n "checking for version string... " >&6; }
25506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25507$as_echo "$VERSION_STRING" >&6; }
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523###############################################################################
25524#
25525# Setup BootJDK, used to bootstrap the build.
25526#
25527###############################################################################
25528
25529
25530  BOOT_JDK_FOUND=no
25531
25532# Check whether --with-boot-jdk was given.
25533if test "${with_boot_jdk+set}" = set; then :
25534  withval=$with_boot_jdk;
25535fi
25536
25537
25538  # We look for the Boot JDK through various means, going from more certain to
25539  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25540  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25541  # must check if this is indeed valid; otherwise we'll continue looking.
25542
25543  # Test: Is bootjdk explicitly set by command line arguments?
25544
25545  if test "x$BOOT_JDK_FOUND" = xno; then
25546    # Now execute the test
25547
25548  if test "x$with_boot_jdk" != x; then
25549    BOOT_JDK=$with_boot_jdk
25550    BOOT_JDK_FOUND=maybe
25551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25552$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25553  fi
25554
25555
25556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25558      # Do we have a bin/java?
25559      if test ! -x "$BOOT_JDK/bin/java"; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25562        BOOT_JDK_FOUND=no
25563      else
25564        # Do we have a bin/javac?
25565        if test ! -x "$BOOT_JDK/bin/javac"; then
25566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25570          BOOT_JDK_FOUND=no
25571        else
25572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25574
25575          # Extra M4 quote needed to protect [] in grep expression.
25576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25577          if test "x$FOUND_CORRECT_VERSION" = x; then
25578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25582            BOOT_JDK_FOUND=no
25583          else
25584            # We're done! :-)
25585            BOOT_JDK_FOUND=yes
25586
25587  # Only process if variable expands to non-empty
25588
25589  if test "x$BOOT_JDK" != x; then
25590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25591
25592  # Input might be given as Windows format, start by converting to
25593  # unix format.
25594  path="$BOOT_JDK"
25595  new_path=`$CYGPATH -u "$path"`
25596
25597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25600  # "foo.exe" is OK but "foo" is an error.
25601  #
25602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25603  # It is also a way to make sure we got the proper file name for the real test later on.
25604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25605  if test "x$test_shortpath" = x; then
25606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25609  fi
25610
25611  # Call helper function which possibly converts this using DOS-style short mode.
25612  # If so, the updated path is stored in $new_path.
25613
25614  input_path="$new_path"
25615  # Check if we need to convert this using DOS-style short mode. If the path
25616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25617  # take no chances and rewrite it.
25618  # Note: m4 eats our [], so we need to use [ and ] instead.
25619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25620  if test "x$has_forbidden_chars" != x; then
25621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25625      # Going to short mode and back again did indeed matter. Since short mode is
25626      # case insensitive, let's make it lowercase to improve readability.
25627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25628      # Now convert it back to Unix-style (cygpath)
25629      input_path=`$CYGPATH -u "$shortmode_path"`
25630      new_path="$input_path"
25631    fi
25632  fi
25633
25634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25635  if test "x$test_cygdrive_prefix" = x; then
25636    # As a simple fix, exclude /usr/bin since it's not a real path.
25637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25639      # a path prefixed by /cygdrive for fixpath to work.
25640      new_path="$CYGWIN_ROOT_PATH$input_path"
25641    fi
25642  fi
25643
25644
25645  if test "x$path" != "x$new_path"; then
25646    BOOT_JDK="$new_path"
25647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25649  fi
25650
25651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25652
25653  path="$BOOT_JDK"
25654  has_colon=`$ECHO $path | $GREP ^.:`
25655  new_path="$path"
25656  if test "x$has_colon" = x; then
25657    # Not in mixed or Windows style, start by that.
25658    new_path=`cmd //c echo $path`
25659  fi
25660
25661
25662  input_path="$new_path"
25663  # Check if we need to convert this using DOS-style short mode. If the path
25664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25665  # take no chances and rewrite it.
25666  # Note: m4 eats our [], so we need to use [ and ] instead.
25667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25668  if test "x$has_forbidden_chars" != x; then
25669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25671  fi
25672
25673
25674  windows_path="$new_path"
25675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25676    unix_path=`$CYGPATH -u "$windows_path"`
25677    new_path="$unix_path"
25678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25680    new_path="$unix_path"
25681  fi
25682
25683  if test "x$path" != "x$new_path"; then
25684    BOOT_JDK="$new_path"
25685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25687  fi
25688
25689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25691
25692    else
25693      # We're on a unix platform. Hooray! :)
25694      path="$BOOT_JDK"
25695      has_space=`$ECHO "$path" | $GREP " "`
25696      if test "x$has_space" != x; then
25697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25700      fi
25701
25702      # Use eval to expand a potential ~
25703      eval path="$path"
25704      if test ! -f "$path" && test ! -d "$path"; then
25705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25706      fi
25707
25708      if test -d "$path"; then
25709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25710      else
25711        dir="`$DIRNAME "$path"`"
25712        base="`$BASENAME "$path"`"
25713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25714      fi
25715    fi
25716  fi
25717
25718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25719$as_echo_n "checking for Boot JDK... " >&6; }
25720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25721$as_echo "$BOOT_JDK" >&6; }
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25723$as_echo_n "checking Boot JDK version... " >&6; }
25724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25726$as_echo "$BOOT_JDK_VERSION" >&6; }
25727          fi # end check jdk version
25728        fi # end check javac
25729      fi # end check java
25730    fi # end check boot jdk found
25731  fi
25732
25733  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25734    # Having specified an argument which is incorrect will produce an instant failure;
25735    # we should not go on looking
25736    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25737  fi
25738
25739  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25740
25741  if test "x$BOOT_JDK_FOUND" = xno; then
25742    # Now execute the test
25743
25744  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25745    # First check at user selected default
25746
25747  if test "x$BOOT_JDK_FOUND" = xno; then
25748    # Now execute the test
25749
25750  if test -x /usr/libexec/java_home; then
25751    BOOT_JDK=`/usr/libexec/java_home `
25752    BOOT_JDK_FOUND=maybe
25753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25754$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25755  fi
25756
25757
25758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25760      # Do we have a bin/java?
25761      if test ! -x "$BOOT_JDK/bin/java"; then
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25764        BOOT_JDK_FOUND=no
25765      else
25766        # Do we have a bin/javac?
25767        if test ! -x "$BOOT_JDK/bin/javac"; then
25768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25772          BOOT_JDK_FOUND=no
25773        else
25774          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25775          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25776
25777          # Extra M4 quote needed to protect [] in grep expression.
25778          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25779          if test "x$FOUND_CORRECT_VERSION" = x; then
25780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25782            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25783$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25784            BOOT_JDK_FOUND=no
25785          else
25786            # We're done! :-)
25787            BOOT_JDK_FOUND=yes
25788
25789  # Only process if variable expands to non-empty
25790
25791  if test "x$BOOT_JDK" != x; then
25792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25793
25794  # Input might be given as Windows format, start by converting to
25795  # unix format.
25796  path="$BOOT_JDK"
25797  new_path=`$CYGPATH -u "$path"`
25798
25799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25802  # "foo.exe" is OK but "foo" is an error.
25803  #
25804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25805  # It is also a way to make sure we got the proper file name for the real test later on.
25806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25807  if test "x$test_shortpath" = x; then
25808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25810    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25811  fi
25812
25813  # Call helper function which possibly converts this using DOS-style short mode.
25814  # If so, the updated path is stored in $new_path.
25815
25816  input_path="$new_path"
25817  # Check if we need to convert this using DOS-style short mode. If the path
25818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25819  # take no chances and rewrite it.
25820  # Note: m4 eats our [], so we need to use [ and ] instead.
25821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25822  if test "x$has_forbidden_chars" != x; then
25823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25827      # Going to short mode and back again did indeed matter. Since short mode is
25828      # case insensitive, let's make it lowercase to improve readability.
25829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25830      # Now convert it back to Unix-style (cygpath)
25831      input_path=`$CYGPATH -u "$shortmode_path"`
25832      new_path="$input_path"
25833    fi
25834  fi
25835
25836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25837  if test "x$test_cygdrive_prefix" = x; then
25838    # As a simple fix, exclude /usr/bin since it's not a real path.
25839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25841      # a path prefixed by /cygdrive for fixpath to work.
25842      new_path="$CYGWIN_ROOT_PATH$input_path"
25843    fi
25844  fi
25845
25846
25847  if test "x$path" != "x$new_path"; then
25848    BOOT_JDK="$new_path"
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25850$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25851  fi
25852
25853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25854
25855  path="$BOOT_JDK"
25856  has_colon=`$ECHO $path | $GREP ^.:`
25857  new_path="$path"
25858  if test "x$has_colon" = x; then
25859    # Not in mixed or Windows style, start by that.
25860    new_path=`cmd //c echo $path`
25861  fi
25862
25863
25864  input_path="$new_path"
25865  # Check if we need to convert this using DOS-style short mode. If the path
25866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25867  # take no chances and rewrite it.
25868  # Note: m4 eats our [], so we need to use [ and ] instead.
25869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25870  if test "x$has_forbidden_chars" != x; then
25871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25873  fi
25874
25875
25876  windows_path="$new_path"
25877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878    unix_path=`$CYGPATH -u "$windows_path"`
25879    new_path="$unix_path"
25880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25882    new_path="$unix_path"
25883  fi
25884
25885  if test "x$path" != "x$new_path"; then
25886    BOOT_JDK="$new_path"
25887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25889  fi
25890
25891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25893
25894    else
25895      # We're on a unix platform. Hooray! :)
25896      path="$BOOT_JDK"
25897      has_space=`$ECHO "$path" | $GREP " "`
25898      if test "x$has_space" != x; then
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25902      fi
25903
25904      # Use eval to expand a potential ~
25905      eval path="$path"
25906      if test ! -f "$path" && test ! -d "$path"; then
25907        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25908      fi
25909
25910      if test -d "$path"; then
25911        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25912      else
25913        dir="`$DIRNAME "$path"`"
25914        base="`$BASENAME "$path"`"
25915        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25916      fi
25917    fi
25918  fi
25919
25920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25921$as_echo_n "checking for Boot JDK... " >&6; }
25922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25923$as_echo "$BOOT_JDK" >&6; }
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25925$as_echo_n "checking Boot JDK version... " >&6; }
25926            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25928$as_echo "$BOOT_JDK_VERSION" >&6; }
25929          fi # end check jdk version
25930        fi # end check javac
25931      fi # end check java
25932    fi # end check boot jdk found
25933  fi
25934
25935    # If that did not work out (e.g. too old), try explicit versions instead
25936
25937  if test "x$BOOT_JDK_FOUND" = xno; then
25938    # Now execute the test
25939
25940  if test -x /usr/libexec/java_home; then
25941    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25942    BOOT_JDK_FOUND=maybe
25943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25944$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25945  fi
25946
25947
25948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25950      # Do we have a bin/java?
25951      if test ! -x "$BOOT_JDK/bin/java"; then
25952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25954        BOOT_JDK_FOUND=no
25955      else
25956        # Do we have a bin/javac?
25957        if test ! -x "$BOOT_JDK/bin/javac"; then
25958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25962          BOOT_JDK_FOUND=no
25963        else
25964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25966
25967          # Extra M4 quote needed to protect [] in grep expression.
25968          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25969          if test "x$FOUND_CORRECT_VERSION" = x; then
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25974            BOOT_JDK_FOUND=no
25975          else
25976            # We're done! :-)
25977            BOOT_JDK_FOUND=yes
25978
25979  # Only process if variable expands to non-empty
25980
25981  if test "x$BOOT_JDK" != x; then
25982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983
25984  # Input might be given as Windows format, start by converting to
25985  # unix format.
25986  path="$BOOT_JDK"
25987  new_path=`$CYGPATH -u "$path"`
25988
25989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25992  # "foo.exe" is OK but "foo" is an error.
25993  #
25994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25995  # It is also a way to make sure we got the proper file name for the real test later on.
25996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25997  if test "x$test_shortpath" = x; then
25998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26001  fi
26002
26003  # Call helper function which possibly converts this using DOS-style short mode.
26004  # If so, the updated path is stored in $new_path.
26005
26006  input_path="$new_path"
26007  # Check if we need to convert this using DOS-style short mode. If the path
26008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009  # take no chances and rewrite it.
26010  # Note: m4 eats our [], so we need to use [ and ] instead.
26011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26012  if test "x$has_forbidden_chars" != x; then
26013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26017      # Going to short mode and back again did indeed matter. Since short mode is
26018      # case insensitive, let's make it lowercase to improve readability.
26019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020      # Now convert it back to Unix-style (cygpath)
26021      input_path=`$CYGPATH -u "$shortmode_path"`
26022      new_path="$input_path"
26023    fi
26024  fi
26025
26026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26027  if test "x$test_cygdrive_prefix" = x; then
26028    # As a simple fix, exclude /usr/bin since it's not a real path.
26029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26031      # a path prefixed by /cygdrive for fixpath to work.
26032      new_path="$CYGWIN_ROOT_PATH$input_path"
26033    fi
26034  fi
26035
26036
26037  if test "x$path" != "x$new_path"; then
26038    BOOT_JDK="$new_path"
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26041  fi
26042
26043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044
26045  path="$BOOT_JDK"
26046  has_colon=`$ECHO $path | $GREP ^.:`
26047  new_path="$path"
26048  if test "x$has_colon" = x; then
26049    # Not in mixed or Windows style, start by that.
26050    new_path=`cmd //c echo $path`
26051  fi
26052
26053
26054  input_path="$new_path"
26055  # Check if we need to convert this using DOS-style short mode. If the path
26056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26057  # take no chances and rewrite it.
26058  # Note: m4 eats our [], so we need to use [ and ] instead.
26059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26060  if test "x$has_forbidden_chars" != x; then
26061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26063  fi
26064
26065
26066  windows_path="$new_path"
26067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068    unix_path=`$CYGPATH -u "$windows_path"`
26069    new_path="$unix_path"
26070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072    new_path="$unix_path"
26073  fi
26074
26075  if test "x$path" != "x$new_path"; then
26076    BOOT_JDK="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26079  fi
26080
26081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26083
26084    else
26085      # We're on a unix platform. Hooray! :)
26086      path="$BOOT_JDK"
26087      has_space=`$ECHO "$path" | $GREP " "`
26088      if test "x$has_space" != x; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26092      fi
26093
26094      # Use eval to expand a potential ~
26095      eval path="$path"
26096      if test ! -f "$path" && test ! -d "$path"; then
26097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26098      fi
26099
26100      if test -d "$path"; then
26101        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26102      else
26103        dir="`$DIRNAME "$path"`"
26104        base="`$BASENAME "$path"`"
26105        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26106      fi
26107    fi
26108  fi
26109
26110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26111$as_echo_n "checking for Boot JDK... " >&6; }
26112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26113$as_echo "$BOOT_JDK" >&6; }
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26115$as_echo_n "checking Boot JDK version... " >&6; }
26116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26118$as_echo "$BOOT_JDK_VERSION" >&6; }
26119          fi # end check jdk version
26120        fi # end check javac
26121      fi # end check java
26122    fi # end check boot jdk found
26123  fi
26124
26125
26126  if test "x$BOOT_JDK_FOUND" = xno; then
26127    # Now execute the test
26128
26129  if test -x /usr/libexec/java_home; then
26130    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26131    BOOT_JDK_FOUND=maybe
26132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26133$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26134  fi
26135
26136
26137    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26138    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26139      # Do we have a bin/java?
26140      if test ! -x "$BOOT_JDK/bin/java"; then
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26143        BOOT_JDK_FOUND=no
26144      else
26145        # Do we have a bin/javac?
26146        if test ! -x "$BOOT_JDK/bin/javac"; then
26147          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26149          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26150$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26151          BOOT_JDK_FOUND=no
26152        else
26153          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26154          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26155
26156          # Extra M4 quote needed to protect [] in grep expression.
26157          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26158          if test "x$FOUND_CORRECT_VERSION" = x; then
26159            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26161            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26162$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26163            BOOT_JDK_FOUND=no
26164          else
26165            # We're done! :-)
26166            BOOT_JDK_FOUND=yes
26167
26168  # Only process if variable expands to non-empty
26169
26170  if test "x$BOOT_JDK" != x; then
26171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26172
26173  # Input might be given as Windows format, start by converting to
26174  # unix format.
26175  path="$BOOT_JDK"
26176  new_path=`$CYGPATH -u "$path"`
26177
26178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26181  # "foo.exe" is OK but "foo" is an error.
26182  #
26183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26184  # It is also a way to make sure we got the proper file name for the real test later on.
26185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26186  if test "x$test_shortpath" = x; then
26187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26190  fi
26191
26192  # Call helper function which possibly converts this using DOS-style short mode.
26193  # If so, the updated path is stored in $new_path.
26194
26195  input_path="$new_path"
26196  # Check if we need to convert this using DOS-style short mode. If the path
26197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26198  # take no chances and rewrite it.
26199  # Note: m4 eats our [], so we need to use [ and ] instead.
26200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26201  if test "x$has_forbidden_chars" != x; then
26202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26206      # Going to short mode and back again did indeed matter. Since short mode is
26207      # case insensitive, let's make it lowercase to improve readability.
26208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26209      # Now convert it back to Unix-style (cygpath)
26210      input_path=`$CYGPATH -u "$shortmode_path"`
26211      new_path="$input_path"
26212    fi
26213  fi
26214
26215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26216  if test "x$test_cygdrive_prefix" = x; then
26217    # As a simple fix, exclude /usr/bin since it's not a real path.
26218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26220      # a path prefixed by /cygdrive for fixpath to work.
26221      new_path="$CYGWIN_ROOT_PATH$input_path"
26222    fi
26223  fi
26224
26225
26226  if test "x$path" != "x$new_path"; then
26227    BOOT_JDK="$new_path"
26228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26230  fi
26231
26232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26233
26234  path="$BOOT_JDK"
26235  has_colon=`$ECHO $path | $GREP ^.:`
26236  new_path="$path"
26237  if test "x$has_colon" = x; then
26238    # Not in mixed or Windows style, start by that.
26239    new_path=`cmd //c echo $path`
26240  fi
26241
26242
26243  input_path="$new_path"
26244  # Check if we need to convert this using DOS-style short mode. If the path
26245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26246  # take no chances and rewrite it.
26247  # Note: m4 eats our [], so we need to use [ and ] instead.
26248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26249  if test "x$has_forbidden_chars" != x; then
26250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26252  fi
26253
26254
26255  windows_path="$new_path"
26256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26257    unix_path=`$CYGPATH -u "$windows_path"`
26258    new_path="$unix_path"
26259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26261    new_path="$unix_path"
26262  fi
26263
26264  if test "x$path" != "x$new_path"; then
26265    BOOT_JDK="$new_path"
26266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26268  fi
26269
26270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26272
26273    else
26274      # We're on a unix platform. Hooray! :)
26275      path="$BOOT_JDK"
26276      has_space=`$ECHO "$path" | $GREP " "`
26277      if test "x$has_space" != x; then
26278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26281      fi
26282
26283      # Use eval to expand a potential ~
26284      eval path="$path"
26285      if test ! -f "$path" && test ! -d "$path"; then
26286        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26287      fi
26288
26289      if test -d "$path"; then
26290        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26291      else
26292        dir="`$DIRNAME "$path"`"
26293        base="`$BASENAME "$path"`"
26294        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26295      fi
26296    fi
26297  fi
26298
26299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26300$as_echo_n "checking for Boot JDK... " >&6; }
26301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26302$as_echo "$BOOT_JDK" >&6; }
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26304$as_echo_n "checking Boot JDK version... " >&6; }
26305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26307$as_echo "$BOOT_JDK_VERSION" >&6; }
26308          fi # end check jdk version
26309        fi # end check javac
26310      fi # end check java
26311    fi # end check boot jdk found
26312  fi
26313
26314
26315  if test "x$BOOT_JDK_FOUND" = xno; then
26316    # Now execute the test
26317
26318  if test -x /usr/libexec/java_home; then
26319    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26320    BOOT_JDK_FOUND=maybe
26321    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26322$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26323  fi
26324
26325
26326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26328      # Do we have a bin/java?
26329      if test ! -x "$BOOT_JDK/bin/java"; then
26330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26332        BOOT_JDK_FOUND=no
26333      else
26334        # Do we have a bin/javac?
26335        if test ! -x "$BOOT_JDK/bin/javac"; then
26336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26340          BOOT_JDK_FOUND=no
26341        else
26342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26344
26345          # Extra M4 quote needed to protect [] in grep expression.
26346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26347          if test "x$FOUND_CORRECT_VERSION" = x; then
26348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26352            BOOT_JDK_FOUND=no
26353          else
26354            # We're done! :-)
26355            BOOT_JDK_FOUND=yes
26356
26357  # Only process if variable expands to non-empty
26358
26359  if test "x$BOOT_JDK" != x; then
26360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26361
26362  # Input might be given as Windows format, start by converting to
26363  # unix format.
26364  path="$BOOT_JDK"
26365  new_path=`$CYGPATH -u "$path"`
26366
26367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26370  # "foo.exe" is OK but "foo" is an error.
26371  #
26372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26373  # It is also a way to make sure we got the proper file name for the real test later on.
26374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26375  if test "x$test_shortpath" = x; then
26376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26379  fi
26380
26381  # Call helper function which possibly converts this using DOS-style short mode.
26382  # If so, the updated path is stored in $new_path.
26383
26384  input_path="$new_path"
26385  # Check if we need to convert this using DOS-style short mode. If the path
26386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26387  # take no chances and rewrite it.
26388  # Note: m4 eats our [], so we need to use [ and ] instead.
26389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26390  if test "x$has_forbidden_chars" != x; then
26391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26395      # Going to short mode and back again did indeed matter. Since short mode is
26396      # case insensitive, let's make it lowercase to improve readability.
26397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26398      # Now convert it back to Unix-style (cygpath)
26399      input_path=`$CYGPATH -u "$shortmode_path"`
26400      new_path="$input_path"
26401    fi
26402  fi
26403
26404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26405  if test "x$test_cygdrive_prefix" = x; then
26406    # As a simple fix, exclude /usr/bin since it's not a real path.
26407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26409      # a path prefixed by /cygdrive for fixpath to work.
26410      new_path="$CYGWIN_ROOT_PATH$input_path"
26411    fi
26412  fi
26413
26414
26415  if test "x$path" != "x$new_path"; then
26416    BOOT_JDK="$new_path"
26417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26419  fi
26420
26421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26422
26423  path="$BOOT_JDK"
26424  has_colon=`$ECHO $path | $GREP ^.:`
26425  new_path="$path"
26426  if test "x$has_colon" = x; then
26427    # Not in mixed or Windows style, start by that.
26428    new_path=`cmd //c echo $path`
26429  fi
26430
26431
26432  input_path="$new_path"
26433  # Check if we need to convert this using DOS-style short mode. If the path
26434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26435  # take no chances and rewrite it.
26436  # Note: m4 eats our [], so we need to use [ and ] instead.
26437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26438  if test "x$has_forbidden_chars" != x; then
26439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26441  fi
26442
26443
26444  windows_path="$new_path"
26445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26446    unix_path=`$CYGPATH -u "$windows_path"`
26447    new_path="$unix_path"
26448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26450    new_path="$unix_path"
26451  fi
26452
26453  if test "x$path" != "x$new_path"; then
26454    BOOT_JDK="$new_path"
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26457  fi
26458
26459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26461
26462    else
26463      # We're on a unix platform. Hooray! :)
26464      path="$BOOT_JDK"
26465      has_space=`$ECHO "$path" | $GREP " "`
26466      if test "x$has_space" != x; then
26467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26470      fi
26471
26472      # Use eval to expand a potential ~
26473      eval path="$path"
26474      if test ! -f "$path" && test ! -d "$path"; then
26475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26476      fi
26477
26478      if test -d "$path"; then
26479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26480      else
26481        dir="`$DIRNAME "$path"`"
26482        base="`$BASENAME "$path"`"
26483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26484      fi
26485    fi
26486  fi
26487
26488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26489$as_echo_n "checking for Boot JDK... " >&6; }
26490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26491$as_echo "$BOOT_JDK" >&6; }
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26493$as_echo_n "checking Boot JDK version... " >&6; }
26494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26496$as_echo "$BOOT_JDK_VERSION" >&6; }
26497          fi # end check jdk version
26498        fi # end check javac
26499      fi # end check java
26500    fi # end check boot jdk found
26501  fi
26502
26503  fi
26504
26505
26506    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26507    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26508      # Do we have a bin/java?
26509      if test ! -x "$BOOT_JDK/bin/java"; then
26510        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26512        BOOT_JDK_FOUND=no
26513      else
26514        # Do we have a bin/javac?
26515        if test ! -x "$BOOT_JDK/bin/javac"; then
26516          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26518          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26519$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26520          BOOT_JDK_FOUND=no
26521        else
26522          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26523          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26524
26525          # Extra M4 quote needed to protect [] in grep expression.
26526          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26527          if test "x$FOUND_CORRECT_VERSION" = x; then
26528            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26530            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26531$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26532            BOOT_JDK_FOUND=no
26533          else
26534            # We're done! :-)
26535            BOOT_JDK_FOUND=yes
26536
26537  # Only process if variable expands to non-empty
26538
26539  if test "x$BOOT_JDK" != x; then
26540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26541
26542  # Input might be given as Windows format, start by converting to
26543  # unix format.
26544  path="$BOOT_JDK"
26545  new_path=`$CYGPATH -u "$path"`
26546
26547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26550  # "foo.exe" is OK but "foo" is an error.
26551  #
26552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26553  # It is also a way to make sure we got the proper file name for the real test later on.
26554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26555  if test "x$test_shortpath" = x; then
26556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26557$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26558    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26559  fi
26560
26561  # Call helper function which possibly converts this using DOS-style short mode.
26562  # If so, the updated path is stored in $new_path.
26563
26564  input_path="$new_path"
26565  # Check if we need to convert this using DOS-style short mode. If the path
26566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26567  # take no chances and rewrite it.
26568  # Note: m4 eats our [], so we need to use [ and ] instead.
26569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26570  if test "x$has_forbidden_chars" != x; then
26571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26575      # Going to short mode and back again did indeed matter. Since short mode is
26576      # case insensitive, let's make it lowercase to improve readability.
26577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26578      # Now convert it back to Unix-style (cygpath)
26579      input_path=`$CYGPATH -u "$shortmode_path"`
26580      new_path="$input_path"
26581    fi
26582  fi
26583
26584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26585  if test "x$test_cygdrive_prefix" = x; then
26586    # As a simple fix, exclude /usr/bin since it's not a real path.
26587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26589      # a path prefixed by /cygdrive for fixpath to work.
26590      new_path="$CYGWIN_ROOT_PATH$input_path"
26591    fi
26592  fi
26593
26594
26595  if test "x$path" != "x$new_path"; then
26596    BOOT_JDK="$new_path"
26597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26599  fi
26600
26601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26602
26603  path="$BOOT_JDK"
26604  has_colon=`$ECHO $path | $GREP ^.:`
26605  new_path="$path"
26606  if test "x$has_colon" = x; then
26607    # Not in mixed or Windows style, start by that.
26608    new_path=`cmd //c echo $path`
26609  fi
26610
26611
26612  input_path="$new_path"
26613  # Check if we need to convert this using DOS-style short mode. If the path
26614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26615  # take no chances and rewrite it.
26616  # Note: m4 eats our [], so we need to use [ and ] instead.
26617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26618  if test "x$has_forbidden_chars" != x; then
26619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26621  fi
26622
26623
26624  windows_path="$new_path"
26625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26626    unix_path=`$CYGPATH -u "$windows_path"`
26627    new_path="$unix_path"
26628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26630    new_path="$unix_path"
26631  fi
26632
26633  if test "x$path" != "x$new_path"; then
26634    BOOT_JDK="$new_path"
26635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26637  fi
26638
26639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26641
26642    else
26643      # We're on a unix platform. Hooray! :)
26644      path="$BOOT_JDK"
26645      has_space=`$ECHO "$path" | $GREP " "`
26646      if test "x$has_space" != x; then
26647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26648$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26650      fi
26651
26652      # Use eval to expand a potential ~
26653      eval path="$path"
26654      if test ! -f "$path" && test ! -d "$path"; then
26655        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26656      fi
26657
26658      if test -d "$path"; then
26659        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26660      else
26661        dir="`$DIRNAME "$path"`"
26662        base="`$BASENAME "$path"`"
26663        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26664      fi
26665    fi
26666  fi
26667
26668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26669$as_echo_n "checking for Boot JDK... " >&6; }
26670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26671$as_echo "$BOOT_JDK" >&6; }
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26673$as_echo_n "checking Boot JDK version... " >&6; }
26674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26676$as_echo "$BOOT_JDK_VERSION" >&6; }
26677          fi # end check jdk version
26678        fi # end check javac
26679      fi # end check java
26680    fi # end check boot jdk found
26681  fi
26682
26683
26684  # Test: Is $JAVA_HOME set?
26685
26686  if test "x$BOOT_JDK_FOUND" = xno; then
26687    # Now execute the test
26688
26689  if test "x$JAVA_HOME" != x; then
26690    JAVA_HOME_PROCESSED="$JAVA_HOME"
26691
26692  # Only process if variable expands to non-empty
26693
26694  if test "x$JAVA_HOME_PROCESSED" != x; then
26695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26696
26697  # Input might be given as Windows format, start by converting to
26698  # unix format.
26699  path="$JAVA_HOME_PROCESSED"
26700  new_path=`$CYGPATH -u "$path"`
26701
26702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26705  # "foo.exe" is OK but "foo" is an error.
26706  #
26707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26708  # It is also a way to make sure we got the proper file name for the real test later on.
26709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26710  if test "x$test_shortpath" = x; then
26711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26712$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26713    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26714  fi
26715
26716  # Call helper function which possibly converts this using DOS-style short mode.
26717  # If so, the updated path is stored in $new_path.
26718
26719  input_path="$new_path"
26720  # Check if we need to convert this using DOS-style short mode. If the path
26721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26722  # take no chances and rewrite it.
26723  # Note: m4 eats our [], so we need to use [ and ] instead.
26724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26725  if test "x$has_forbidden_chars" != x; then
26726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26730      # Going to short mode and back again did indeed matter. Since short mode is
26731      # case insensitive, let's make it lowercase to improve readability.
26732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26733      # Now convert it back to Unix-style (cygpath)
26734      input_path=`$CYGPATH -u "$shortmode_path"`
26735      new_path="$input_path"
26736    fi
26737  fi
26738
26739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26740  if test "x$test_cygdrive_prefix" = x; then
26741    # As a simple fix, exclude /usr/bin since it's not a real path.
26742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26744      # a path prefixed by /cygdrive for fixpath to work.
26745      new_path="$CYGWIN_ROOT_PATH$input_path"
26746    fi
26747  fi
26748
26749
26750  if test "x$path" != "x$new_path"; then
26751    JAVA_HOME_PROCESSED="$new_path"
26752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26753$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26754  fi
26755
26756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26757
26758  path="$JAVA_HOME_PROCESSED"
26759  has_colon=`$ECHO $path | $GREP ^.:`
26760  new_path="$path"
26761  if test "x$has_colon" = x; then
26762    # Not in mixed or Windows style, start by that.
26763    new_path=`cmd //c echo $path`
26764  fi
26765
26766
26767  input_path="$new_path"
26768  # Check if we need to convert this using DOS-style short mode. If the path
26769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26770  # take no chances and rewrite it.
26771  # Note: m4 eats our [], so we need to use [ and ] instead.
26772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26773  if test "x$has_forbidden_chars" != x; then
26774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26776  fi
26777
26778
26779  windows_path="$new_path"
26780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26781    unix_path=`$CYGPATH -u "$windows_path"`
26782    new_path="$unix_path"
26783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26785    new_path="$unix_path"
26786  fi
26787
26788  if test "x$path" != "x$new_path"; then
26789    JAVA_HOME_PROCESSED="$new_path"
26790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26791$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26792  fi
26793
26794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26796
26797    else
26798      # We're on a unix platform. Hooray! :)
26799      path="$JAVA_HOME_PROCESSED"
26800      has_space=`$ECHO "$path" | $GREP " "`
26801      if test "x$has_space" != x; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26803$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26805      fi
26806
26807      # Use eval to expand a potential ~
26808      eval path="$path"
26809      if test ! -f "$path" && test ! -d "$path"; then
26810        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26811      fi
26812
26813      if test -d "$path"; then
26814        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26815      else
26816        dir="`$DIRNAME "$path"`"
26817        base="`$BASENAME "$path"`"
26818        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26819      fi
26820    fi
26821  fi
26822
26823    if test ! -d "$JAVA_HOME_PROCESSED"; then
26824      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26825$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26826    else
26827      # Aha, the user has set a JAVA_HOME
26828      # let us use that as the Boot JDK.
26829      BOOT_JDK="$JAVA_HOME_PROCESSED"
26830      BOOT_JDK_FOUND=maybe
26831      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26832$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26833    fi
26834  fi
26835
26836
26837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26839      # Do we have a bin/java?
26840      if test ! -x "$BOOT_JDK/bin/java"; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26843        BOOT_JDK_FOUND=no
26844      else
26845        # Do we have a bin/javac?
26846        if test ! -x "$BOOT_JDK/bin/javac"; then
26847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26851          BOOT_JDK_FOUND=no
26852        else
26853          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26854          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26855
26856          # Extra M4 quote needed to protect [] in grep expression.
26857          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26858          if test "x$FOUND_CORRECT_VERSION" = x; then
26859            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26861            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26862$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26863            BOOT_JDK_FOUND=no
26864          else
26865            # We're done! :-)
26866            BOOT_JDK_FOUND=yes
26867
26868  # Only process if variable expands to non-empty
26869
26870  if test "x$BOOT_JDK" != x; then
26871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26872
26873  # Input might be given as Windows format, start by converting to
26874  # unix format.
26875  path="$BOOT_JDK"
26876  new_path=`$CYGPATH -u "$path"`
26877
26878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26881  # "foo.exe" is OK but "foo" is an error.
26882  #
26883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26884  # It is also a way to make sure we got the proper file name for the real test later on.
26885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26886  if test "x$test_shortpath" = x; then
26887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26889    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26890  fi
26891
26892  # Call helper function which possibly converts this using DOS-style short mode.
26893  # If so, the updated path is stored in $new_path.
26894
26895  input_path="$new_path"
26896  # Check if we need to convert this using DOS-style short mode. If the path
26897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26898  # take no chances and rewrite it.
26899  # Note: m4 eats our [], so we need to use [ and ] instead.
26900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26901  if test "x$has_forbidden_chars" != x; then
26902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26906      # Going to short mode and back again did indeed matter. Since short mode is
26907      # case insensitive, let's make it lowercase to improve readability.
26908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26909      # Now convert it back to Unix-style (cygpath)
26910      input_path=`$CYGPATH -u "$shortmode_path"`
26911      new_path="$input_path"
26912    fi
26913  fi
26914
26915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26916  if test "x$test_cygdrive_prefix" = x; then
26917    # As a simple fix, exclude /usr/bin since it's not a real path.
26918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26920      # a path prefixed by /cygdrive for fixpath to work.
26921      new_path="$CYGWIN_ROOT_PATH$input_path"
26922    fi
26923  fi
26924
26925
26926  if test "x$path" != "x$new_path"; then
26927    BOOT_JDK="$new_path"
26928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26930  fi
26931
26932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26933
26934  path="$BOOT_JDK"
26935  has_colon=`$ECHO $path | $GREP ^.:`
26936  new_path="$path"
26937  if test "x$has_colon" = x; then
26938    # Not in mixed or Windows style, start by that.
26939    new_path=`cmd //c echo $path`
26940  fi
26941
26942
26943  input_path="$new_path"
26944  # Check if we need to convert this using DOS-style short mode. If the path
26945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26946  # take no chances and rewrite it.
26947  # Note: m4 eats our [], so we need to use [ and ] instead.
26948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26949  if test "x$has_forbidden_chars" != x; then
26950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26952  fi
26953
26954
26955  windows_path="$new_path"
26956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26957    unix_path=`$CYGPATH -u "$windows_path"`
26958    new_path="$unix_path"
26959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26961    new_path="$unix_path"
26962  fi
26963
26964  if test "x$path" != "x$new_path"; then
26965    BOOT_JDK="$new_path"
26966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26968  fi
26969
26970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26972
26973    else
26974      # We're on a unix platform. Hooray! :)
26975      path="$BOOT_JDK"
26976      has_space=`$ECHO "$path" | $GREP " "`
26977      if test "x$has_space" != x; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26981      fi
26982
26983      # Use eval to expand a potential ~
26984      eval path="$path"
26985      if test ! -f "$path" && test ! -d "$path"; then
26986        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26987      fi
26988
26989      if test -d "$path"; then
26990        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26991      else
26992        dir="`$DIRNAME "$path"`"
26993        base="`$BASENAME "$path"`"
26994        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26995      fi
26996    fi
26997  fi
26998
26999            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27000$as_echo_n "checking for Boot JDK... " >&6; }
27001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27002$as_echo "$BOOT_JDK" >&6; }
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27004$as_echo_n "checking Boot JDK version... " >&6; }
27005            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27007$as_echo "$BOOT_JDK_VERSION" >&6; }
27008          fi # end check jdk version
27009        fi # end check javac
27010      fi # end check java
27011    fi # end check boot jdk found
27012  fi
27013
27014
27015  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27016
27017  if test "x$BOOT_JDK_FOUND" = xno; then
27018    # Now execute the test
27019
27020  # Extract the first word of "javac", so it can be a program name with args.
27021set dummy javac; ac_word=$2
27022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27023$as_echo_n "checking for $ac_word... " >&6; }
27024if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27025  $as_echo_n "(cached) " >&6
27026else
27027  case $JAVAC_CHECK in
27028  [\\/]* | ?:[\\/]*)
27029  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27030  ;;
27031  *)
27032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27033for as_dir in $PATH
27034do
27035  IFS=$as_save_IFS
27036  test -z "$as_dir" && as_dir=.
27037    for ac_exec_ext in '' $ac_executable_extensions; do
27038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27039    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27041    break 2
27042  fi
27043done
27044  done
27045IFS=$as_save_IFS
27046
27047  ;;
27048esac
27049fi
27050JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27051if test -n "$JAVAC_CHECK"; then
27052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27053$as_echo "$JAVAC_CHECK" >&6; }
27054else
27055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27056$as_echo "no" >&6; }
27057fi
27058
27059
27060  # Extract the first word of "java", so it can be a program name with args.
27061set dummy java; ac_word=$2
27062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27063$as_echo_n "checking for $ac_word... " >&6; }
27064if ${ac_cv_path_JAVA_CHECK+:} false; then :
27065  $as_echo_n "(cached) " >&6
27066else
27067  case $JAVA_CHECK in
27068  [\\/]* | ?:[\\/]*)
27069  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27070  ;;
27071  *)
27072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27073for as_dir in $PATH
27074do
27075  IFS=$as_save_IFS
27076  test -z "$as_dir" && as_dir=.
27077    for ac_exec_ext in '' $ac_executable_extensions; do
27078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27079    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27081    break 2
27082  fi
27083done
27084  done
27085IFS=$as_save_IFS
27086
27087  ;;
27088esac
27089fi
27090JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27091if test -n "$JAVA_CHECK"; then
27092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27093$as_echo "$JAVA_CHECK" >&6; }
27094else
27095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27096$as_echo "no" >&6; }
27097fi
27098
27099
27100  BINARY="$JAVAC_CHECK"
27101  if test "x$JAVAC_CHECK" = x; then
27102    BINARY="$JAVA_CHECK"
27103  fi
27104  if test "x$BINARY" != x; then
27105    # So there is a java(c) binary, it might be part of a JDK.
27106    # Lets find the JDK/JRE directory by following symbolic links.
27107    # Linux/GNU systems often have links from /usr/bin/java to
27108    # /etc/alternatives/java to the real JDK binary.
27109
27110  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27111    # Follow a chain of symbolic links. Use readlink
27112    # where it exists, else fall back to horribly
27113    # complicated shell code.
27114    if test "x$READLINK_TESTED" != yes; then
27115      # On MacOSX there is a readlink tool with a different
27116      # purpose than the GNU readlink tool. Check the found readlink.
27117      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27118      if test "x$ISGNU" = x; then
27119        # A readlink that we do not know how to use.
27120        # Are there other non-GNU readlinks out there?
27121        READLINK_TESTED=yes
27122        READLINK=
27123      fi
27124    fi
27125
27126    if test "x$READLINK" != x; then
27127      BINARY=`$READLINK -f $BINARY`
27128    else
27129      # Save the current directory for restoring afterwards
27130      STARTDIR=$PWD
27131      COUNTER=0
27132      sym_link_dir=`$DIRNAME $BINARY`
27133      sym_link_file=`$BASENAME $BINARY`
27134      cd $sym_link_dir
27135      # Use -P flag to resolve symlinks in directories.
27136      cd `$THEPWDCMD -P`
27137      sym_link_dir=`$THEPWDCMD -P`
27138      # Resolve file symlinks
27139      while test $COUNTER -lt 20; do
27140        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27141        if test "x$ISLINK" == x; then
27142          # This is not a symbolic link! We are done!
27143          break
27144        fi
27145        # Again resolve directory symlinks since the target of the just found
27146        # link could be in a different directory
27147        cd `$DIRNAME $ISLINK`
27148        sym_link_dir=`$THEPWDCMD -P`
27149        sym_link_file=`$BASENAME $ISLINK`
27150        let COUNTER=COUNTER+1
27151      done
27152      cd $STARTDIR
27153      BINARY=$sym_link_dir/$sym_link_file
27154    fi
27155  fi
27156
27157    BOOT_JDK=`dirname "$BINARY"`
27158    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27159    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27160      # Looks like we found ourselves an JDK
27161      BOOT_JDK_FOUND=maybe
27162      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27163$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27164    fi
27165  fi
27166
27167
27168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27170      # Do we have a bin/java?
27171      if test ! -x "$BOOT_JDK/bin/java"; then
27172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27174        BOOT_JDK_FOUND=no
27175      else
27176        # Do we have a bin/javac?
27177        if test ! -x "$BOOT_JDK/bin/javac"; then
27178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27182          BOOT_JDK_FOUND=no
27183        else
27184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27186
27187          # Extra M4 quote needed to protect [] in grep expression.
27188          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27189          if test "x$FOUND_CORRECT_VERSION" = x; then
27190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27194            BOOT_JDK_FOUND=no
27195          else
27196            # We're done! :-)
27197            BOOT_JDK_FOUND=yes
27198
27199  # Only process if variable expands to non-empty
27200
27201  if test "x$BOOT_JDK" != x; then
27202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27203
27204  # Input might be given as Windows format, start by converting to
27205  # unix format.
27206  path="$BOOT_JDK"
27207  new_path=`$CYGPATH -u "$path"`
27208
27209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27212  # "foo.exe" is OK but "foo" is an error.
27213  #
27214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27215  # It is also a way to make sure we got the proper file name for the real test later on.
27216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27217  if test "x$test_shortpath" = x; then
27218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27220    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27221  fi
27222
27223  # Call helper function which possibly converts this using DOS-style short mode.
27224  # If so, the updated path is stored in $new_path.
27225
27226  input_path="$new_path"
27227  # Check if we need to convert this using DOS-style short mode. If the path
27228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27229  # take no chances and rewrite it.
27230  # Note: m4 eats our [], so we need to use [ and ] instead.
27231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27232  if test "x$has_forbidden_chars" != x; then
27233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27237      # Going to short mode and back again did indeed matter. Since short mode is
27238      # case insensitive, let's make it lowercase to improve readability.
27239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27240      # Now convert it back to Unix-style (cygpath)
27241      input_path=`$CYGPATH -u "$shortmode_path"`
27242      new_path="$input_path"
27243    fi
27244  fi
27245
27246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27247  if test "x$test_cygdrive_prefix" = x; then
27248    # As a simple fix, exclude /usr/bin since it's not a real path.
27249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27251      # a path prefixed by /cygdrive for fixpath to work.
27252      new_path="$CYGWIN_ROOT_PATH$input_path"
27253    fi
27254  fi
27255
27256
27257  if test "x$path" != "x$new_path"; then
27258    BOOT_JDK="$new_path"
27259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27261  fi
27262
27263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27264
27265  path="$BOOT_JDK"
27266  has_colon=`$ECHO $path | $GREP ^.:`
27267  new_path="$path"
27268  if test "x$has_colon" = x; then
27269    # Not in mixed or Windows style, start by that.
27270    new_path=`cmd //c echo $path`
27271  fi
27272
27273
27274  input_path="$new_path"
27275  # Check if we need to convert this using DOS-style short mode. If the path
27276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27277  # take no chances and rewrite it.
27278  # Note: m4 eats our [], so we need to use [ and ] instead.
27279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27280  if test "x$has_forbidden_chars" != x; then
27281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27283  fi
27284
27285
27286  windows_path="$new_path"
27287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27288    unix_path=`$CYGPATH -u "$windows_path"`
27289    new_path="$unix_path"
27290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27292    new_path="$unix_path"
27293  fi
27294
27295  if test "x$path" != "x$new_path"; then
27296    BOOT_JDK="$new_path"
27297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27299  fi
27300
27301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27303
27304    else
27305      # We're on a unix platform. Hooray! :)
27306      path="$BOOT_JDK"
27307      has_space=`$ECHO "$path" | $GREP " "`
27308      if test "x$has_space" != x; then
27309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27312      fi
27313
27314      # Use eval to expand a potential ~
27315      eval path="$path"
27316      if test ! -f "$path" && test ! -d "$path"; then
27317        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27318      fi
27319
27320      if test -d "$path"; then
27321        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27322      else
27323        dir="`$DIRNAME "$path"`"
27324        base="`$BASENAME "$path"`"
27325        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27326      fi
27327    fi
27328  fi
27329
27330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27331$as_echo_n "checking for Boot JDK... " >&6; }
27332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27333$as_echo "$BOOT_JDK" >&6; }
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27335$as_echo_n "checking Boot JDK version... " >&6; }
27336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27338$as_echo "$BOOT_JDK_VERSION" >&6; }
27339          fi # end check jdk version
27340        fi # end check javac
27341      fi # end check java
27342    fi # end check boot jdk found
27343  fi
27344
27345
27346  # Test: Is there a JDK installed in default, well-known locations?
27347
27348  if test "x$BOOT_JDK_FOUND" = xno; then
27349    # Now execute the test
27350
27351  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27352
27353  if test "x$BOOT_JDK_FOUND" = xno; then
27354    # Now execute the test
27355
27356  if test "x$ProgramW6432" != x; then
27357    VIRTUAL_DIR="$ProgramW6432/Java"
27358
27359  windows_path="$VIRTUAL_DIR"
27360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27361    unix_path=`$CYGPATH -u "$windows_path"`
27362    VIRTUAL_DIR="$unix_path"
27363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27365    VIRTUAL_DIR="$unix_path"
27366  fi
27367
27368
27369  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27370  BOOT_JDK_SUFFIX=""
27371  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27372  if test "x$ALL_JDKS_FOUND" != x; then
27373    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27374
27375  if test "x$BOOT_JDK_FOUND" = xno; then
27376    # Now execute the test
27377
27378        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27379        if test -d "$BOOT_JDK"; then
27380          BOOT_JDK_FOUND=maybe
27381          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27382$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27383        fi
27384
27385
27386    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27387    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27388      # Do we have a bin/java?
27389      if test ! -x "$BOOT_JDK/bin/java"; then
27390        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27392        BOOT_JDK_FOUND=no
27393      else
27394        # Do we have a bin/javac?
27395        if test ! -x "$BOOT_JDK/bin/javac"; then
27396          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27398          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27399$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27400          BOOT_JDK_FOUND=no
27401        else
27402          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27403          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27404
27405          # Extra M4 quote needed to protect [] in grep expression.
27406          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27407          if test "x$FOUND_CORRECT_VERSION" = x; then
27408            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27410            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27411$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27412            BOOT_JDK_FOUND=no
27413          else
27414            # We're done! :-)
27415            BOOT_JDK_FOUND=yes
27416
27417  # Only process if variable expands to non-empty
27418
27419  if test "x$BOOT_JDK" != x; then
27420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27421
27422  # Input might be given as Windows format, start by converting to
27423  # unix format.
27424  path="$BOOT_JDK"
27425  new_path=`$CYGPATH -u "$path"`
27426
27427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27430  # "foo.exe" is OK but "foo" is an error.
27431  #
27432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27433  # It is also a way to make sure we got the proper file name for the real test later on.
27434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27435  if test "x$test_shortpath" = x; then
27436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27439  fi
27440
27441  # Call helper function which possibly converts this using DOS-style short mode.
27442  # If so, the updated path is stored in $new_path.
27443
27444  input_path="$new_path"
27445  # Check if we need to convert this using DOS-style short mode. If the path
27446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27447  # take no chances and rewrite it.
27448  # Note: m4 eats our [], so we need to use [ and ] instead.
27449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27450  if test "x$has_forbidden_chars" != x; then
27451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27455      # Going to short mode and back again did indeed matter. Since short mode is
27456      # case insensitive, let's make it lowercase to improve readability.
27457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27458      # Now convert it back to Unix-style (cygpath)
27459      input_path=`$CYGPATH -u "$shortmode_path"`
27460      new_path="$input_path"
27461    fi
27462  fi
27463
27464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27465  if test "x$test_cygdrive_prefix" = x; then
27466    # As a simple fix, exclude /usr/bin since it's not a real path.
27467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27469      # a path prefixed by /cygdrive for fixpath to work.
27470      new_path="$CYGWIN_ROOT_PATH$input_path"
27471    fi
27472  fi
27473
27474
27475  if test "x$path" != "x$new_path"; then
27476    BOOT_JDK="$new_path"
27477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27479  fi
27480
27481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27482
27483  path="$BOOT_JDK"
27484  has_colon=`$ECHO $path | $GREP ^.:`
27485  new_path="$path"
27486  if test "x$has_colon" = x; then
27487    # Not in mixed or Windows style, start by that.
27488    new_path=`cmd //c echo $path`
27489  fi
27490
27491
27492  input_path="$new_path"
27493  # Check if we need to convert this using DOS-style short mode. If the path
27494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27495  # take no chances and rewrite it.
27496  # Note: m4 eats our [], so we need to use [ and ] instead.
27497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27498  if test "x$has_forbidden_chars" != x; then
27499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27501  fi
27502
27503
27504  windows_path="$new_path"
27505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27506    unix_path=`$CYGPATH -u "$windows_path"`
27507    new_path="$unix_path"
27508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27510    new_path="$unix_path"
27511  fi
27512
27513  if test "x$path" != "x$new_path"; then
27514    BOOT_JDK="$new_path"
27515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27517  fi
27518
27519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27521
27522    else
27523      # We're on a unix platform. Hooray! :)
27524      path="$BOOT_JDK"
27525      has_space=`$ECHO "$path" | $GREP " "`
27526      if test "x$has_space" != x; then
27527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27530      fi
27531
27532      # Use eval to expand a potential ~
27533      eval path="$path"
27534      if test ! -f "$path" && test ! -d "$path"; then
27535        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27536      fi
27537
27538      if test -d "$path"; then
27539        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27540      else
27541        dir="`$DIRNAME "$path"`"
27542        base="`$BASENAME "$path"`"
27543        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27544      fi
27545    fi
27546  fi
27547
27548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27549$as_echo_n "checking for Boot JDK... " >&6; }
27550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27551$as_echo "$BOOT_JDK" >&6; }
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27553$as_echo_n "checking Boot JDK version... " >&6; }
27554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27556$as_echo "$BOOT_JDK_VERSION" >&6; }
27557          fi # end check jdk version
27558        fi # end check javac
27559      fi # end check java
27560    fi # end check boot jdk found
27561  fi
27562
27563    done
27564  fi
27565
27566  fi
27567
27568
27569    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27570    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27571      # Do we have a bin/java?
27572      if test ! -x "$BOOT_JDK/bin/java"; then
27573        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27575        BOOT_JDK_FOUND=no
27576      else
27577        # Do we have a bin/javac?
27578        if test ! -x "$BOOT_JDK/bin/javac"; then
27579          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27581          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27582$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27583          BOOT_JDK_FOUND=no
27584        else
27585          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27586          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27587
27588          # Extra M4 quote needed to protect [] in grep expression.
27589          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27590          if test "x$FOUND_CORRECT_VERSION" = x; then
27591            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27593            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27594$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27595            BOOT_JDK_FOUND=no
27596          else
27597            # We're done! :-)
27598            BOOT_JDK_FOUND=yes
27599
27600  # Only process if variable expands to non-empty
27601
27602  if test "x$BOOT_JDK" != x; then
27603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27604
27605  # Input might be given as Windows format, start by converting to
27606  # unix format.
27607  path="$BOOT_JDK"
27608  new_path=`$CYGPATH -u "$path"`
27609
27610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27613  # "foo.exe" is OK but "foo" is an error.
27614  #
27615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27616  # It is also a way to make sure we got the proper file name for the real test later on.
27617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27618  if test "x$test_shortpath" = x; then
27619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27622  fi
27623
27624  # Call helper function which possibly converts this using DOS-style short mode.
27625  # If so, the updated path is stored in $new_path.
27626
27627  input_path="$new_path"
27628  # Check if we need to convert this using DOS-style short mode. If the path
27629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27630  # take no chances and rewrite it.
27631  # Note: m4 eats our [], so we need to use [ and ] instead.
27632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27633  if test "x$has_forbidden_chars" != x; then
27634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27638      # Going to short mode and back again did indeed matter. Since short mode is
27639      # case insensitive, let's make it lowercase to improve readability.
27640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27641      # Now convert it back to Unix-style (cygpath)
27642      input_path=`$CYGPATH -u "$shortmode_path"`
27643      new_path="$input_path"
27644    fi
27645  fi
27646
27647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27648  if test "x$test_cygdrive_prefix" = x; then
27649    # As a simple fix, exclude /usr/bin since it's not a real path.
27650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27652      # a path prefixed by /cygdrive for fixpath to work.
27653      new_path="$CYGWIN_ROOT_PATH$input_path"
27654    fi
27655  fi
27656
27657
27658  if test "x$path" != "x$new_path"; then
27659    BOOT_JDK="$new_path"
27660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27662  fi
27663
27664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27665
27666  path="$BOOT_JDK"
27667  has_colon=`$ECHO $path | $GREP ^.:`
27668  new_path="$path"
27669  if test "x$has_colon" = x; then
27670    # Not in mixed or Windows style, start by that.
27671    new_path=`cmd //c echo $path`
27672  fi
27673
27674
27675  input_path="$new_path"
27676  # Check if we need to convert this using DOS-style short mode. If the path
27677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27678  # take no chances and rewrite it.
27679  # Note: m4 eats our [], so we need to use [ and ] instead.
27680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27681  if test "x$has_forbidden_chars" != x; then
27682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27684  fi
27685
27686
27687  windows_path="$new_path"
27688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27689    unix_path=`$CYGPATH -u "$windows_path"`
27690    new_path="$unix_path"
27691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27693    new_path="$unix_path"
27694  fi
27695
27696  if test "x$path" != "x$new_path"; then
27697    BOOT_JDK="$new_path"
27698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27700  fi
27701
27702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27704
27705    else
27706      # We're on a unix platform. Hooray! :)
27707      path="$BOOT_JDK"
27708      has_space=`$ECHO "$path" | $GREP " "`
27709      if test "x$has_space" != x; then
27710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27713      fi
27714
27715      # Use eval to expand a potential ~
27716      eval path="$path"
27717      if test ! -f "$path" && test ! -d "$path"; then
27718        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27719      fi
27720
27721      if test -d "$path"; then
27722        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27723      else
27724        dir="`$DIRNAME "$path"`"
27725        base="`$BASENAME "$path"`"
27726        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27727      fi
27728    fi
27729  fi
27730
27731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27732$as_echo_n "checking for Boot JDK... " >&6; }
27733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27734$as_echo "$BOOT_JDK" >&6; }
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27736$as_echo_n "checking Boot JDK version... " >&6; }
27737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27739$as_echo "$BOOT_JDK_VERSION" >&6; }
27740          fi # end check jdk version
27741        fi # end check javac
27742      fi # end check java
27743    fi # end check boot jdk found
27744  fi
27745
27746
27747  if test "x$BOOT_JDK_FOUND" = xno; then
27748    # Now execute the test
27749
27750  if test "x$PROGRAMW6432" != x; then
27751    VIRTUAL_DIR="$PROGRAMW6432/Java"
27752
27753  windows_path="$VIRTUAL_DIR"
27754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27755    unix_path=`$CYGPATH -u "$windows_path"`
27756    VIRTUAL_DIR="$unix_path"
27757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27759    VIRTUAL_DIR="$unix_path"
27760  fi
27761
27762
27763  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27764  BOOT_JDK_SUFFIX=""
27765  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27766  if test "x$ALL_JDKS_FOUND" != x; then
27767    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27768
27769  if test "x$BOOT_JDK_FOUND" = xno; then
27770    # Now execute the test
27771
27772        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27773        if test -d "$BOOT_JDK"; then
27774          BOOT_JDK_FOUND=maybe
27775          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27776$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27777        fi
27778
27779
27780    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27781    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27782      # Do we have a bin/java?
27783      if test ! -x "$BOOT_JDK/bin/java"; then
27784        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27786        BOOT_JDK_FOUND=no
27787      else
27788        # Do we have a bin/javac?
27789        if test ! -x "$BOOT_JDK/bin/javac"; then
27790          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27792          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27793$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27794          BOOT_JDK_FOUND=no
27795        else
27796          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27797          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27798
27799          # Extra M4 quote needed to protect [] in grep expression.
27800          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27801          if test "x$FOUND_CORRECT_VERSION" = x; then
27802            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27804            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27805$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27806            BOOT_JDK_FOUND=no
27807          else
27808            # We're done! :-)
27809            BOOT_JDK_FOUND=yes
27810
27811  # Only process if variable expands to non-empty
27812
27813  if test "x$BOOT_JDK" != x; then
27814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27815
27816  # Input might be given as Windows format, start by converting to
27817  # unix format.
27818  path="$BOOT_JDK"
27819  new_path=`$CYGPATH -u "$path"`
27820
27821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27824  # "foo.exe" is OK but "foo" is an error.
27825  #
27826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27827  # It is also a way to make sure we got the proper file name for the real test later on.
27828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27829  if test "x$test_shortpath" = x; then
27830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27832    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27833  fi
27834
27835  # Call helper function which possibly converts this using DOS-style short mode.
27836  # If so, the updated path is stored in $new_path.
27837
27838  input_path="$new_path"
27839  # Check if we need to convert this using DOS-style short mode. If the path
27840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27841  # take no chances and rewrite it.
27842  # Note: m4 eats our [], so we need to use [ and ] instead.
27843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27844  if test "x$has_forbidden_chars" != x; then
27845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27849      # Going to short mode and back again did indeed matter. Since short mode is
27850      # case insensitive, let's make it lowercase to improve readability.
27851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27852      # Now convert it back to Unix-style (cygpath)
27853      input_path=`$CYGPATH -u "$shortmode_path"`
27854      new_path="$input_path"
27855    fi
27856  fi
27857
27858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27859  if test "x$test_cygdrive_prefix" = x; then
27860    # As a simple fix, exclude /usr/bin since it's not a real path.
27861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27863      # a path prefixed by /cygdrive for fixpath to work.
27864      new_path="$CYGWIN_ROOT_PATH$input_path"
27865    fi
27866  fi
27867
27868
27869  if test "x$path" != "x$new_path"; then
27870    BOOT_JDK="$new_path"
27871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27873  fi
27874
27875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27876
27877  path="$BOOT_JDK"
27878  has_colon=`$ECHO $path | $GREP ^.:`
27879  new_path="$path"
27880  if test "x$has_colon" = x; then
27881    # Not in mixed or Windows style, start by that.
27882    new_path=`cmd //c echo $path`
27883  fi
27884
27885
27886  input_path="$new_path"
27887  # Check if we need to convert this using DOS-style short mode. If the path
27888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27889  # take no chances and rewrite it.
27890  # Note: m4 eats our [], so we need to use [ and ] instead.
27891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27892  if test "x$has_forbidden_chars" != x; then
27893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895  fi
27896
27897
27898  windows_path="$new_path"
27899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27900    unix_path=`$CYGPATH -u "$windows_path"`
27901    new_path="$unix_path"
27902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27904    new_path="$unix_path"
27905  fi
27906
27907  if test "x$path" != "x$new_path"; then
27908    BOOT_JDK="$new_path"
27909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27911  fi
27912
27913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27915
27916    else
27917      # We're on a unix platform. Hooray! :)
27918      path="$BOOT_JDK"
27919      has_space=`$ECHO "$path" | $GREP " "`
27920      if test "x$has_space" != x; then
27921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27924      fi
27925
27926      # Use eval to expand a potential ~
27927      eval path="$path"
27928      if test ! -f "$path" && test ! -d "$path"; then
27929        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27930      fi
27931
27932      if test -d "$path"; then
27933        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27934      else
27935        dir="`$DIRNAME "$path"`"
27936        base="`$BASENAME "$path"`"
27937        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27938      fi
27939    fi
27940  fi
27941
27942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27943$as_echo_n "checking for Boot JDK... " >&6; }
27944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27945$as_echo "$BOOT_JDK" >&6; }
27946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27947$as_echo_n "checking Boot JDK version... " >&6; }
27948            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27950$as_echo "$BOOT_JDK_VERSION" >&6; }
27951          fi # end check jdk version
27952        fi # end check javac
27953      fi # end check java
27954    fi # end check boot jdk found
27955  fi
27956
27957    done
27958  fi
27959
27960  fi
27961
27962
27963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27965      # Do we have a bin/java?
27966      if test ! -x "$BOOT_JDK/bin/java"; then
27967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27969        BOOT_JDK_FOUND=no
27970      else
27971        # Do we have a bin/javac?
27972        if test ! -x "$BOOT_JDK/bin/javac"; then
27973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27977          BOOT_JDK_FOUND=no
27978        else
27979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27981
27982          # Extra M4 quote needed to protect [] in grep expression.
27983          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27984          if test "x$FOUND_CORRECT_VERSION" = x; then
27985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27989            BOOT_JDK_FOUND=no
27990          else
27991            # We're done! :-)
27992            BOOT_JDK_FOUND=yes
27993
27994  # Only process if variable expands to non-empty
27995
27996  if test "x$BOOT_JDK" != x; then
27997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27998
27999  # Input might be given as Windows format, start by converting to
28000  # unix format.
28001  path="$BOOT_JDK"
28002  new_path=`$CYGPATH -u "$path"`
28003
28004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28007  # "foo.exe" is OK but "foo" is an error.
28008  #
28009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28010  # It is also a way to make sure we got the proper file name for the real test later on.
28011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28012  if test "x$test_shortpath" = x; then
28013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28016  fi
28017
28018  # Call helper function which possibly converts this using DOS-style short mode.
28019  # If so, the updated path is stored in $new_path.
28020
28021  input_path="$new_path"
28022  # Check if we need to convert this using DOS-style short mode. If the path
28023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28024  # take no chances and rewrite it.
28025  # Note: m4 eats our [], so we need to use [ and ] instead.
28026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28027  if test "x$has_forbidden_chars" != x; then
28028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28032      # Going to short mode and back again did indeed matter. Since short mode is
28033      # case insensitive, let's make it lowercase to improve readability.
28034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28035      # Now convert it back to Unix-style (cygpath)
28036      input_path=`$CYGPATH -u "$shortmode_path"`
28037      new_path="$input_path"
28038    fi
28039  fi
28040
28041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28042  if test "x$test_cygdrive_prefix" = x; then
28043    # As a simple fix, exclude /usr/bin since it's not a real path.
28044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28046      # a path prefixed by /cygdrive for fixpath to work.
28047      new_path="$CYGWIN_ROOT_PATH$input_path"
28048    fi
28049  fi
28050
28051
28052  if test "x$path" != "x$new_path"; then
28053    BOOT_JDK="$new_path"
28054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28056  fi
28057
28058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28059
28060  path="$BOOT_JDK"
28061  has_colon=`$ECHO $path | $GREP ^.:`
28062  new_path="$path"
28063  if test "x$has_colon" = x; then
28064    # Not in mixed or Windows style, start by that.
28065    new_path=`cmd //c echo $path`
28066  fi
28067
28068
28069  input_path="$new_path"
28070  # Check if we need to convert this using DOS-style short mode. If the path
28071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28072  # take no chances and rewrite it.
28073  # Note: m4 eats our [], so we need to use [ and ] instead.
28074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28075  if test "x$has_forbidden_chars" != x; then
28076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28078  fi
28079
28080
28081  windows_path="$new_path"
28082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28083    unix_path=`$CYGPATH -u "$windows_path"`
28084    new_path="$unix_path"
28085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28087    new_path="$unix_path"
28088  fi
28089
28090  if test "x$path" != "x$new_path"; then
28091    BOOT_JDK="$new_path"
28092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28094  fi
28095
28096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28098
28099    else
28100      # We're on a unix platform. Hooray! :)
28101      path="$BOOT_JDK"
28102      has_space=`$ECHO "$path" | $GREP " "`
28103      if test "x$has_space" != x; then
28104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28107      fi
28108
28109      # Use eval to expand a potential ~
28110      eval path="$path"
28111      if test ! -f "$path" && test ! -d "$path"; then
28112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28113      fi
28114
28115      if test -d "$path"; then
28116        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28117      else
28118        dir="`$DIRNAME "$path"`"
28119        base="`$BASENAME "$path"`"
28120        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28121      fi
28122    fi
28123  fi
28124
28125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28126$as_echo_n "checking for Boot JDK... " >&6; }
28127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28128$as_echo "$BOOT_JDK" >&6; }
28129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28130$as_echo_n "checking Boot JDK version... " >&6; }
28131            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28133$as_echo "$BOOT_JDK_VERSION" >&6; }
28134          fi # end check jdk version
28135        fi # end check javac
28136      fi # end check java
28137    fi # end check boot jdk found
28138  fi
28139
28140
28141  if test "x$BOOT_JDK_FOUND" = xno; then
28142    # Now execute the test
28143
28144  if test "x$PROGRAMFILES" != x; then
28145    VIRTUAL_DIR="$PROGRAMFILES/Java"
28146
28147  windows_path="$VIRTUAL_DIR"
28148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28149    unix_path=`$CYGPATH -u "$windows_path"`
28150    VIRTUAL_DIR="$unix_path"
28151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28153    VIRTUAL_DIR="$unix_path"
28154  fi
28155
28156
28157  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28158  BOOT_JDK_SUFFIX=""
28159  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28160  if test "x$ALL_JDKS_FOUND" != x; then
28161    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28162
28163  if test "x$BOOT_JDK_FOUND" = xno; then
28164    # Now execute the test
28165
28166        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28167        if test -d "$BOOT_JDK"; then
28168          BOOT_JDK_FOUND=maybe
28169          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28170$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28171        fi
28172
28173
28174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28176      # Do we have a bin/java?
28177      if test ! -x "$BOOT_JDK/bin/java"; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28180        BOOT_JDK_FOUND=no
28181      else
28182        # Do we have a bin/javac?
28183        if test ! -x "$BOOT_JDK/bin/javac"; then
28184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28188          BOOT_JDK_FOUND=no
28189        else
28190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28192
28193          # Extra M4 quote needed to protect [] in grep expression.
28194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28195          if test "x$FOUND_CORRECT_VERSION" = x; then
28196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28200            BOOT_JDK_FOUND=no
28201          else
28202            # We're done! :-)
28203            BOOT_JDK_FOUND=yes
28204
28205  # Only process if variable expands to non-empty
28206
28207  if test "x$BOOT_JDK" != x; then
28208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28209
28210  # Input might be given as Windows format, start by converting to
28211  # unix format.
28212  path="$BOOT_JDK"
28213  new_path=`$CYGPATH -u "$path"`
28214
28215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28218  # "foo.exe" is OK but "foo" is an error.
28219  #
28220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28221  # It is also a way to make sure we got the proper file name for the real test later on.
28222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28223  if test "x$test_shortpath" = x; then
28224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28227  fi
28228
28229  # Call helper function which possibly converts this using DOS-style short mode.
28230  # If so, the updated path is stored in $new_path.
28231
28232  input_path="$new_path"
28233  # Check if we need to convert this using DOS-style short mode. If the path
28234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28235  # take no chances and rewrite it.
28236  # Note: m4 eats our [], so we need to use [ and ] instead.
28237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28238  if test "x$has_forbidden_chars" != x; then
28239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28243      # Going to short mode and back again did indeed matter. Since short mode is
28244      # case insensitive, let's make it lowercase to improve readability.
28245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28246      # Now convert it back to Unix-style (cygpath)
28247      input_path=`$CYGPATH -u "$shortmode_path"`
28248      new_path="$input_path"
28249    fi
28250  fi
28251
28252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28253  if test "x$test_cygdrive_prefix" = x; then
28254    # As a simple fix, exclude /usr/bin since it's not a real path.
28255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28257      # a path prefixed by /cygdrive for fixpath to work.
28258      new_path="$CYGWIN_ROOT_PATH$input_path"
28259    fi
28260  fi
28261
28262
28263  if test "x$path" != "x$new_path"; then
28264    BOOT_JDK="$new_path"
28265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28267  fi
28268
28269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28270
28271  path="$BOOT_JDK"
28272  has_colon=`$ECHO $path | $GREP ^.:`
28273  new_path="$path"
28274  if test "x$has_colon" = x; then
28275    # Not in mixed or Windows style, start by that.
28276    new_path=`cmd //c echo $path`
28277  fi
28278
28279
28280  input_path="$new_path"
28281  # Check if we need to convert this using DOS-style short mode. If the path
28282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28283  # take no chances and rewrite it.
28284  # Note: m4 eats our [], so we need to use [ and ] instead.
28285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28286  if test "x$has_forbidden_chars" != x; then
28287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28289  fi
28290
28291
28292  windows_path="$new_path"
28293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28294    unix_path=`$CYGPATH -u "$windows_path"`
28295    new_path="$unix_path"
28296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28298    new_path="$unix_path"
28299  fi
28300
28301  if test "x$path" != "x$new_path"; then
28302    BOOT_JDK="$new_path"
28303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28305  fi
28306
28307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28309
28310    else
28311      # We're on a unix platform. Hooray! :)
28312      path="$BOOT_JDK"
28313      has_space=`$ECHO "$path" | $GREP " "`
28314      if test "x$has_space" != x; then
28315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28318      fi
28319
28320      # Use eval to expand a potential ~
28321      eval path="$path"
28322      if test ! -f "$path" && test ! -d "$path"; then
28323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28324      fi
28325
28326      if test -d "$path"; then
28327        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28328      else
28329        dir="`$DIRNAME "$path"`"
28330        base="`$BASENAME "$path"`"
28331        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28332      fi
28333    fi
28334  fi
28335
28336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28337$as_echo_n "checking for Boot JDK... " >&6; }
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28339$as_echo "$BOOT_JDK" >&6; }
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28341$as_echo_n "checking Boot JDK version... " >&6; }
28342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28344$as_echo "$BOOT_JDK_VERSION" >&6; }
28345          fi # end check jdk version
28346        fi # end check javac
28347      fi # end check java
28348    fi # end check boot jdk found
28349  fi
28350
28351    done
28352  fi
28353
28354  fi
28355
28356
28357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28359      # Do we have a bin/java?
28360      if test ! -x "$BOOT_JDK/bin/java"; then
28361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28363        BOOT_JDK_FOUND=no
28364      else
28365        # Do we have a bin/javac?
28366        if test ! -x "$BOOT_JDK/bin/javac"; then
28367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28371          BOOT_JDK_FOUND=no
28372        else
28373          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28374          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28375
28376          # Extra M4 quote needed to protect [] in grep expression.
28377          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28378          if test "x$FOUND_CORRECT_VERSION" = x; then
28379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28381            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28382$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28383            BOOT_JDK_FOUND=no
28384          else
28385            # We're done! :-)
28386            BOOT_JDK_FOUND=yes
28387
28388  # Only process if variable expands to non-empty
28389
28390  if test "x$BOOT_JDK" != x; then
28391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28392
28393  # Input might be given as Windows format, start by converting to
28394  # unix format.
28395  path="$BOOT_JDK"
28396  new_path=`$CYGPATH -u "$path"`
28397
28398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28401  # "foo.exe" is OK but "foo" is an error.
28402  #
28403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28404  # It is also a way to make sure we got the proper file name for the real test later on.
28405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28406  if test "x$test_shortpath" = x; then
28407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28410  fi
28411
28412  # Call helper function which possibly converts this using DOS-style short mode.
28413  # If so, the updated path is stored in $new_path.
28414
28415  input_path="$new_path"
28416  # Check if we need to convert this using DOS-style short mode. If the path
28417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418  # take no chances and rewrite it.
28419  # Note: m4 eats our [], so we need to use [ and ] instead.
28420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28421  if test "x$has_forbidden_chars" != x; then
28422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28426      # Going to short mode and back again did indeed matter. Since short mode is
28427      # case insensitive, let's make it lowercase to improve readability.
28428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28429      # Now convert it back to Unix-style (cygpath)
28430      input_path=`$CYGPATH -u "$shortmode_path"`
28431      new_path="$input_path"
28432    fi
28433  fi
28434
28435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28436  if test "x$test_cygdrive_prefix" = x; then
28437    # As a simple fix, exclude /usr/bin since it's not a real path.
28438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28440      # a path prefixed by /cygdrive for fixpath to work.
28441      new_path="$CYGWIN_ROOT_PATH$input_path"
28442    fi
28443  fi
28444
28445
28446  if test "x$path" != "x$new_path"; then
28447    BOOT_JDK="$new_path"
28448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28450  fi
28451
28452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28453
28454  path="$BOOT_JDK"
28455  has_colon=`$ECHO $path | $GREP ^.:`
28456  new_path="$path"
28457  if test "x$has_colon" = x; then
28458    # Not in mixed or Windows style, start by that.
28459    new_path=`cmd //c echo $path`
28460  fi
28461
28462
28463  input_path="$new_path"
28464  # Check if we need to convert this using DOS-style short mode. If the path
28465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28466  # take no chances and rewrite it.
28467  # Note: m4 eats our [], so we need to use [ and ] instead.
28468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28469  if test "x$has_forbidden_chars" != x; then
28470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28472  fi
28473
28474
28475  windows_path="$new_path"
28476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477    unix_path=`$CYGPATH -u "$windows_path"`
28478    new_path="$unix_path"
28479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28481    new_path="$unix_path"
28482  fi
28483
28484  if test "x$path" != "x$new_path"; then
28485    BOOT_JDK="$new_path"
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488  fi
28489
28490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28492
28493    else
28494      # We're on a unix platform. Hooray! :)
28495      path="$BOOT_JDK"
28496      has_space=`$ECHO "$path" | $GREP " "`
28497      if test "x$has_space" != x; then
28498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28501      fi
28502
28503      # Use eval to expand a potential ~
28504      eval path="$path"
28505      if test ! -f "$path" && test ! -d "$path"; then
28506        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28507      fi
28508
28509      if test -d "$path"; then
28510        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28511      else
28512        dir="`$DIRNAME "$path"`"
28513        base="`$BASENAME "$path"`"
28514        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28515      fi
28516    fi
28517  fi
28518
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28520$as_echo_n "checking for Boot JDK... " >&6; }
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28522$as_echo "$BOOT_JDK" >&6; }
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28524$as_echo_n "checking Boot JDK version... " >&6; }
28525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28527$as_echo "$BOOT_JDK_VERSION" >&6; }
28528          fi # end check jdk version
28529        fi # end check javac
28530      fi # end check java
28531    fi # end check boot jdk found
28532  fi
28533
28534
28535  if test "x$BOOT_JDK_FOUND" = xno; then
28536    # Now execute the test
28537
28538  if test "x$ProgramFiles" != x; then
28539    VIRTUAL_DIR="$ProgramFiles/Java"
28540
28541  windows_path="$VIRTUAL_DIR"
28542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28543    unix_path=`$CYGPATH -u "$windows_path"`
28544    VIRTUAL_DIR="$unix_path"
28545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28547    VIRTUAL_DIR="$unix_path"
28548  fi
28549
28550
28551  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28552  BOOT_JDK_SUFFIX=""
28553  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28554  if test "x$ALL_JDKS_FOUND" != x; then
28555    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28556
28557  if test "x$BOOT_JDK_FOUND" = xno; then
28558    # Now execute the test
28559
28560        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28561        if test -d "$BOOT_JDK"; then
28562          BOOT_JDK_FOUND=maybe
28563          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28564$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28565        fi
28566
28567
28568    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28569    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28570      # Do we have a bin/java?
28571      if test ! -x "$BOOT_JDK/bin/java"; then
28572        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28574        BOOT_JDK_FOUND=no
28575      else
28576        # Do we have a bin/javac?
28577        if test ! -x "$BOOT_JDK/bin/javac"; then
28578          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28580          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28581$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28582          BOOT_JDK_FOUND=no
28583        else
28584          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28585          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28586
28587          # Extra M4 quote needed to protect [] in grep expression.
28588          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28589          if test "x$FOUND_CORRECT_VERSION" = x; then
28590            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28592            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28593$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28594            BOOT_JDK_FOUND=no
28595          else
28596            # We're done! :-)
28597            BOOT_JDK_FOUND=yes
28598
28599  # Only process if variable expands to non-empty
28600
28601  if test "x$BOOT_JDK" != x; then
28602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28603
28604  # Input might be given as Windows format, start by converting to
28605  # unix format.
28606  path="$BOOT_JDK"
28607  new_path=`$CYGPATH -u "$path"`
28608
28609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28612  # "foo.exe" is OK but "foo" is an error.
28613  #
28614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28615  # It is also a way to make sure we got the proper file name for the real test later on.
28616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28617  if test "x$test_shortpath" = x; then
28618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28620    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28621  fi
28622
28623  # Call helper function which possibly converts this using DOS-style short mode.
28624  # If so, the updated path is stored in $new_path.
28625
28626  input_path="$new_path"
28627  # Check if we need to convert this using DOS-style short mode. If the path
28628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28629  # take no chances and rewrite it.
28630  # Note: m4 eats our [], so we need to use [ and ] instead.
28631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28632  if test "x$has_forbidden_chars" != x; then
28633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28637      # Going to short mode and back again did indeed matter. Since short mode is
28638      # case insensitive, let's make it lowercase to improve readability.
28639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28640      # Now convert it back to Unix-style (cygpath)
28641      input_path=`$CYGPATH -u "$shortmode_path"`
28642      new_path="$input_path"
28643    fi
28644  fi
28645
28646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28647  if test "x$test_cygdrive_prefix" = x; then
28648    # As a simple fix, exclude /usr/bin since it's not a real path.
28649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28651      # a path prefixed by /cygdrive for fixpath to work.
28652      new_path="$CYGWIN_ROOT_PATH$input_path"
28653    fi
28654  fi
28655
28656
28657  if test "x$path" != "x$new_path"; then
28658    BOOT_JDK="$new_path"
28659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28660$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28661  fi
28662
28663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28664
28665  path="$BOOT_JDK"
28666  has_colon=`$ECHO $path | $GREP ^.:`
28667  new_path="$path"
28668  if test "x$has_colon" = x; then
28669    # Not in mixed or Windows style, start by that.
28670    new_path=`cmd //c echo $path`
28671  fi
28672
28673
28674  input_path="$new_path"
28675  # Check if we need to convert this using DOS-style short mode. If the path
28676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28677  # take no chances and rewrite it.
28678  # Note: m4 eats our [], so we need to use [ and ] instead.
28679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28680  if test "x$has_forbidden_chars" != x; then
28681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28683  fi
28684
28685
28686  windows_path="$new_path"
28687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28688    unix_path=`$CYGPATH -u "$windows_path"`
28689    new_path="$unix_path"
28690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28692    new_path="$unix_path"
28693  fi
28694
28695  if test "x$path" != "x$new_path"; then
28696    BOOT_JDK="$new_path"
28697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28699  fi
28700
28701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28703
28704    else
28705      # We're on a unix platform. Hooray! :)
28706      path="$BOOT_JDK"
28707      has_space=`$ECHO "$path" | $GREP " "`
28708      if test "x$has_space" != x; then
28709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28712      fi
28713
28714      # Use eval to expand a potential ~
28715      eval path="$path"
28716      if test ! -f "$path" && test ! -d "$path"; then
28717        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28718      fi
28719
28720      if test -d "$path"; then
28721        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28722      else
28723        dir="`$DIRNAME "$path"`"
28724        base="`$BASENAME "$path"`"
28725        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28726      fi
28727    fi
28728  fi
28729
28730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28731$as_echo_n "checking for Boot JDK... " >&6; }
28732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28733$as_echo "$BOOT_JDK" >&6; }
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28735$as_echo_n "checking Boot JDK version... " >&6; }
28736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28738$as_echo "$BOOT_JDK_VERSION" >&6; }
28739          fi # end check jdk version
28740        fi # end check javac
28741      fi # end check java
28742    fi # end check boot jdk found
28743  fi
28744
28745    done
28746  fi
28747
28748  fi
28749
28750
28751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28753      # Do we have a bin/java?
28754      if test ! -x "$BOOT_JDK/bin/java"; then
28755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28757        BOOT_JDK_FOUND=no
28758      else
28759        # Do we have a bin/javac?
28760        if test ! -x "$BOOT_JDK/bin/javac"; then
28761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28765          BOOT_JDK_FOUND=no
28766        else
28767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28769
28770          # Extra M4 quote needed to protect [] in grep expression.
28771          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28772          if test "x$FOUND_CORRECT_VERSION" = x; then
28773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28777            BOOT_JDK_FOUND=no
28778          else
28779            # We're done! :-)
28780            BOOT_JDK_FOUND=yes
28781
28782  # Only process if variable expands to non-empty
28783
28784  if test "x$BOOT_JDK" != x; then
28785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28786
28787  # Input might be given as Windows format, start by converting to
28788  # unix format.
28789  path="$BOOT_JDK"
28790  new_path=`$CYGPATH -u "$path"`
28791
28792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28795  # "foo.exe" is OK but "foo" is an error.
28796  #
28797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28798  # It is also a way to make sure we got the proper file name for the real test later on.
28799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28800  if test "x$test_shortpath" = x; then
28801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28804  fi
28805
28806  # Call helper function which possibly converts this using DOS-style short mode.
28807  # If so, the updated path is stored in $new_path.
28808
28809  input_path="$new_path"
28810  # Check if we need to convert this using DOS-style short mode. If the path
28811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28812  # take no chances and rewrite it.
28813  # Note: m4 eats our [], so we need to use [ and ] instead.
28814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28815  if test "x$has_forbidden_chars" != x; then
28816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28820      # Going to short mode and back again did indeed matter. Since short mode is
28821      # case insensitive, let's make it lowercase to improve readability.
28822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28823      # Now convert it back to Unix-style (cygpath)
28824      input_path=`$CYGPATH -u "$shortmode_path"`
28825      new_path="$input_path"
28826    fi
28827  fi
28828
28829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28830  if test "x$test_cygdrive_prefix" = x; then
28831    # As a simple fix, exclude /usr/bin since it's not a real path.
28832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28834      # a path prefixed by /cygdrive for fixpath to work.
28835      new_path="$CYGWIN_ROOT_PATH$input_path"
28836    fi
28837  fi
28838
28839
28840  if test "x$path" != "x$new_path"; then
28841    BOOT_JDK="$new_path"
28842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28844  fi
28845
28846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28847
28848  path="$BOOT_JDK"
28849  has_colon=`$ECHO $path | $GREP ^.:`
28850  new_path="$path"
28851  if test "x$has_colon" = x; then
28852    # Not in mixed or Windows style, start by that.
28853    new_path=`cmd //c echo $path`
28854  fi
28855
28856
28857  input_path="$new_path"
28858  # Check if we need to convert this using DOS-style short mode. If the path
28859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28860  # take no chances and rewrite it.
28861  # Note: m4 eats our [], so we need to use [ and ] instead.
28862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28863  if test "x$has_forbidden_chars" != x; then
28864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28866  fi
28867
28868
28869  windows_path="$new_path"
28870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28871    unix_path=`$CYGPATH -u "$windows_path"`
28872    new_path="$unix_path"
28873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28875    new_path="$unix_path"
28876  fi
28877
28878  if test "x$path" != "x$new_path"; then
28879    BOOT_JDK="$new_path"
28880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28882  fi
28883
28884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28886
28887    else
28888      # We're on a unix platform. Hooray! :)
28889      path="$BOOT_JDK"
28890      has_space=`$ECHO "$path" | $GREP " "`
28891      if test "x$has_space" != x; then
28892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28895      fi
28896
28897      # Use eval to expand a potential ~
28898      eval path="$path"
28899      if test ! -f "$path" && test ! -d "$path"; then
28900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28901      fi
28902
28903      if test -d "$path"; then
28904        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28905      else
28906        dir="`$DIRNAME "$path"`"
28907        base="`$BASENAME "$path"`"
28908        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28909      fi
28910    fi
28911  fi
28912
28913            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28914$as_echo_n "checking for Boot JDK... " >&6; }
28915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28916$as_echo "$BOOT_JDK" >&6; }
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28918$as_echo_n "checking Boot JDK version... " >&6; }
28919            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28921$as_echo "$BOOT_JDK_VERSION" >&6; }
28922          fi # end check jdk version
28923        fi # end check javac
28924      fi # end check java
28925    fi # end check boot jdk found
28926  fi
28927
28928
28929  if test "x$BOOT_JDK_FOUND" = xno; then
28930    # Now execute the test
28931
28932  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28933  BOOT_JDK_SUFFIX=""
28934  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28935  if test "x$ALL_JDKS_FOUND" != x; then
28936    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28937
28938  if test "x$BOOT_JDK_FOUND" = xno; then
28939    # Now execute the test
28940
28941        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28942        if test -d "$BOOT_JDK"; then
28943          BOOT_JDK_FOUND=maybe
28944          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28945$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28946        fi
28947
28948
28949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28951      # Do we have a bin/java?
28952      if test ! -x "$BOOT_JDK/bin/java"; then
28953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28955        BOOT_JDK_FOUND=no
28956      else
28957        # Do we have a bin/javac?
28958        if test ! -x "$BOOT_JDK/bin/javac"; then
28959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28963          BOOT_JDK_FOUND=no
28964        else
28965          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28966          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28967
28968          # Extra M4 quote needed to protect [] in grep expression.
28969          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28970          if test "x$FOUND_CORRECT_VERSION" = x; then
28971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28973            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28974$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28975            BOOT_JDK_FOUND=no
28976          else
28977            # We're done! :-)
28978            BOOT_JDK_FOUND=yes
28979
28980  # Only process if variable expands to non-empty
28981
28982  if test "x$BOOT_JDK" != x; then
28983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28984
28985  # Input might be given as Windows format, start by converting to
28986  # unix format.
28987  path="$BOOT_JDK"
28988  new_path=`$CYGPATH -u "$path"`
28989
28990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28993  # "foo.exe" is OK but "foo" is an error.
28994  #
28995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28996  # It is also a way to make sure we got the proper file name for the real test later on.
28997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28998  if test "x$test_shortpath" = x; then
28999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29002  fi
29003
29004  # Call helper function which possibly converts this using DOS-style short mode.
29005  # If so, the updated path is stored in $new_path.
29006
29007  input_path="$new_path"
29008  # Check if we need to convert this using DOS-style short mode. If the path
29009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29010  # take no chances and rewrite it.
29011  # Note: m4 eats our [], so we need to use [ and ] instead.
29012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29013  if test "x$has_forbidden_chars" != x; then
29014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29018      # Going to short mode and back again did indeed matter. Since short mode is
29019      # case insensitive, let's make it lowercase to improve readability.
29020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29021      # Now convert it back to Unix-style (cygpath)
29022      input_path=`$CYGPATH -u "$shortmode_path"`
29023      new_path="$input_path"
29024    fi
29025  fi
29026
29027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29028  if test "x$test_cygdrive_prefix" = x; then
29029    # As a simple fix, exclude /usr/bin since it's not a real path.
29030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29032      # a path prefixed by /cygdrive for fixpath to work.
29033      new_path="$CYGWIN_ROOT_PATH$input_path"
29034    fi
29035  fi
29036
29037
29038  if test "x$path" != "x$new_path"; then
29039    BOOT_JDK="$new_path"
29040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29042  fi
29043
29044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29045
29046  path="$BOOT_JDK"
29047  has_colon=`$ECHO $path | $GREP ^.:`
29048  new_path="$path"
29049  if test "x$has_colon" = x; then
29050    # Not in mixed or Windows style, start by that.
29051    new_path=`cmd //c echo $path`
29052  fi
29053
29054
29055  input_path="$new_path"
29056  # Check if we need to convert this using DOS-style short mode. If the path
29057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29058  # take no chances and rewrite it.
29059  # Note: m4 eats our [], so we need to use [ and ] instead.
29060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29061  if test "x$has_forbidden_chars" != x; then
29062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29064  fi
29065
29066
29067  windows_path="$new_path"
29068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29069    unix_path=`$CYGPATH -u "$windows_path"`
29070    new_path="$unix_path"
29071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29073    new_path="$unix_path"
29074  fi
29075
29076  if test "x$path" != "x$new_path"; then
29077    BOOT_JDK="$new_path"
29078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29080  fi
29081
29082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29084
29085    else
29086      # We're on a unix platform. Hooray! :)
29087      path="$BOOT_JDK"
29088      has_space=`$ECHO "$path" | $GREP " "`
29089      if test "x$has_space" != x; then
29090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29093      fi
29094
29095      # Use eval to expand a potential ~
29096      eval path="$path"
29097      if test ! -f "$path" && test ! -d "$path"; then
29098        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29099      fi
29100
29101      if test -d "$path"; then
29102        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29103      else
29104        dir="`$DIRNAME "$path"`"
29105        base="`$BASENAME "$path"`"
29106        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29107      fi
29108    fi
29109  fi
29110
29111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29112$as_echo_n "checking for Boot JDK... " >&6; }
29113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29114$as_echo "$BOOT_JDK" >&6; }
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29116$as_echo_n "checking Boot JDK version... " >&6; }
29117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29119$as_echo "$BOOT_JDK_VERSION" >&6; }
29120          fi # end check jdk version
29121        fi # end check javac
29122      fi # end check java
29123    fi # end check boot jdk found
29124  fi
29125
29126    done
29127  fi
29128
29129
29130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29132      # Do we have a bin/java?
29133      if test ! -x "$BOOT_JDK/bin/java"; then
29134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29136        BOOT_JDK_FOUND=no
29137      else
29138        # Do we have a bin/javac?
29139        if test ! -x "$BOOT_JDK/bin/javac"; then
29140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29144          BOOT_JDK_FOUND=no
29145        else
29146          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29147          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29148
29149          # Extra M4 quote needed to protect [] in grep expression.
29150          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29151          if test "x$FOUND_CORRECT_VERSION" = x; then
29152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29154            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29155$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29156            BOOT_JDK_FOUND=no
29157          else
29158            # We're done! :-)
29159            BOOT_JDK_FOUND=yes
29160
29161  # Only process if variable expands to non-empty
29162
29163  if test "x$BOOT_JDK" != x; then
29164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29165
29166  # Input might be given as Windows format, start by converting to
29167  # unix format.
29168  path="$BOOT_JDK"
29169  new_path=`$CYGPATH -u "$path"`
29170
29171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29174  # "foo.exe" is OK but "foo" is an error.
29175  #
29176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29177  # It is also a way to make sure we got the proper file name for the real test later on.
29178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29179  if test "x$test_shortpath" = x; then
29180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29183  fi
29184
29185  # Call helper function which possibly converts this using DOS-style short mode.
29186  # If so, the updated path is stored in $new_path.
29187
29188  input_path="$new_path"
29189  # Check if we need to convert this using DOS-style short mode. If the path
29190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29191  # take no chances and rewrite it.
29192  # Note: m4 eats our [], so we need to use [ and ] instead.
29193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29194  if test "x$has_forbidden_chars" != x; then
29195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29199      # Going to short mode and back again did indeed matter. Since short mode is
29200      # case insensitive, let's make it lowercase to improve readability.
29201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29202      # Now convert it back to Unix-style (cygpath)
29203      input_path=`$CYGPATH -u "$shortmode_path"`
29204      new_path="$input_path"
29205    fi
29206  fi
29207
29208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29209  if test "x$test_cygdrive_prefix" = x; then
29210    # As a simple fix, exclude /usr/bin since it's not a real path.
29211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29213      # a path prefixed by /cygdrive for fixpath to work.
29214      new_path="$CYGWIN_ROOT_PATH$input_path"
29215    fi
29216  fi
29217
29218
29219  if test "x$path" != "x$new_path"; then
29220    BOOT_JDK="$new_path"
29221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29223  fi
29224
29225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29226
29227  path="$BOOT_JDK"
29228  has_colon=`$ECHO $path | $GREP ^.:`
29229  new_path="$path"
29230  if test "x$has_colon" = x; then
29231    # Not in mixed or Windows style, start by that.
29232    new_path=`cmd //c echo $path`
29233  fi
29234
29235
29236  input_path="$new_path"
29237  # Check if we need to convert this using DOS-style short mode. If the path
29238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29239  # take no chances and rewrite it.
29240  # Note: m4 eats our [], so we need to use [ and ] instead.
29241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29242  if test "x$has_forbidden_chars" != x; then
29243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29245  fi
29246
29247
29248  windows_path="$new_path"
29249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29250    unix_path=`$CYGPATH -u "$windows_path"`
29251    new_path="$unix_path"
29252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29254    new_path="$unix_path"
29255  fi
29256
29257  if test "x$path" != "x$new_path"; then
29258    BOOT_JDK="$new_path"
29259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29261  fi
29262
29263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29265
29266    else
29267      # We're on a unix platform. Hooray! :)
29268      path="$BOOT_JDK"
29269      has_space=`$ECHO "$path" | $GREP " "`
29270      if test "x$has_space" != x; then
29271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29274      fi
29275
29276      # Use eval to expand a potential ~
29277      eval path="$path"
29278      if test ! -f "$path" && test ! -d "$path"; then
29279        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29280      fi
29281
29282      if test -d "$path"; then
29283        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29284      else
29285        dir="`$DIRNAME "$path"`"
29286        base="`$BASENAME "$path"`"
29287        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29288      fi
29289    fi
29290  fi
29291
29292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29293$as_echo_n "checking for Boot JDK... " >&6; }
29294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29295$as_echo "$BOOT_JDK" >&6; }
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29297$as_echo_n "checking Boot JDK version... " >&6; }
29298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29300$as_echo "$BOOT_JDK_VERSION" >&6; }
29301          fi # end check jdk version
29302        fi # end check javac
29303      fi # end check java
29304    fi # end check boot jdk found
29305  fi
29306
29307  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29308
29309  if test "x$BOOT_JDK_FOUND" = xno; then
29310    # Now execute the test
29311
29312  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29313  BOOT_JDK_SUFFIX="/Contents/Home"
29314  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29315  if test "x$ALL_JDKS_FOUND" != x; then
29316    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29317
29318  if test "x$BOOT_JDK_FOUND" = xno; then
29319    # Now execute the test
29320
29321        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29322        if test -d "$BOOT_JDK"; then
29323          BOOT_JDK_FOUND=maybe
29324          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29325$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29326        fi
29327
29328
29329    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29330    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29331      # Do we have a bin/java?
29332      if test ! -x "$BOOT_JDK/bin/java"; then
29333        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29335        BOOT_JDK_FOUND=no
29336      else
29337        # Do we have a bin/javac?
29338        if test ! -x "$BOOT_JDK/bin/javac"; then
29339          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29341          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29342$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29343          BOOT_JDK_FOUND=no
29344        else
29345          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29346          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29347
29348          # Extra M4 quote needed to protect [] in grep expression.
29349          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29350          if test "x$FOUND_CORRECT_VERSION" = x; then
29351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29353            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29354$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29355            BOOT_JDK_FOUND=no
29356          else
29357            # We're done! :-)
29358            BOOT_JDK_FOUND=yes
29359
29360  # Only process if variable expands to non-empty
29361
29362  if test "x$BOOT_JDK" != x; then
29363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29364
29365  # Input might be given as Windows format, start by converting to
29366  # unix format.
29367  path="$BOOT_JDK"
29368  new_path=`$CYGPATH -u "$path"`
29369
29370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29373  # "foo.exe" is OK but "foo" is an error.
29374  #
29375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29376  # It is also a way to make sure we got the proper file name for the real test later on.
29377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29378  if test "x$test_shortpath" = x; then
29379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29381    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29382  fi
29383
29384  # Call helper function which possibly converts this using DOS-style short mode.
29385  # If so, the updated path is stored in $new_path.
29386
29387  input_path="$new_path"
29388  # Check if we need to convert this using DOS-style short mode. If the path
29389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29390  # take no chances and rewrite it.
29391  # Note: m4 eats our [], so we need to use [ and ] instead.
29392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29393  if test "x$has_forbidden_chars" != x; then
29394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29398      # Going to short mode and back again did indeed matter. Since short mode is
29399      # case insensitive, let's make it lowercase to improve readability.
29400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29401      # Now convert it back to Unix-style (cygpath)
29402      input_path=`$CYGPATH -u "$shortmode_path"`
29403      new_path="$input_path"
29404    fi
29405  fi
29406
29407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29408  if test "x$test_cygdrive_prefix" = x; then
29409    # As a simple fix, exclude /usr/bin since it's not a real path.
29410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29412      # a path prefixed by /cygdrive for fixpath to work.
29413      new_path="$CYGWIN_ROOT_PATH$input_path"
29414    fi
29415  fi
29416
29417
29418  if test "x$path" != "x$new_path"; then
29419    BOOT_JDK="$new_path"
29420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29421$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29422  fi
29423
29424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29425
29426  path="$BOOT_JDK"
29427  has_colon=`$ECHO $path | $GREP ^.:`
29428  new_path="$path"
29429  if test "x$has_colon" = x; then
29430    # Not in mixed or Windows style, start by that.
29431    new_path=`cmd //c echo $path`
29432  fi
29433
29434
29435  input_path="$new_path"
29436  # Check if we need to convert this using DOS-style short mode. If the path
29437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29438  # take no chances and rewrite it.
29439  # Note: m4 eats our [], so we need to use [ and ] instead.
29440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29441  if test "x$has_forbidden_chars" != x; then
29442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29444  fi
29445
29446
29447  windows_path="$new_path"
29448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29449    unix_path=`$CYGPATH -u "$windows_path"`
29450    new_path="$unix_path"
29451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29453    new_path="$unix_path"
29454  fi
29455
29456  if test "x$path" != "x$new_path"; then
29457    BOOT_JDK="$new_path"
29458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29460  fi
29461
29462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29464
29465    else
29466      # We're on a unix platform. Hooray! :)
29467      path="$BOOT_JDK"
29468      has_space=`$ECHO "$path" | $GREP " "`
29469      if test "x$has_space" != x; then
29470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29473      fi
29474
29475      # Use eval to expand a potential ~
29476      eval path="$path"
29477      if test ! -f "$path" && test ! -d "$path"; then
29478        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29479      fi
29480
29481      if test -d "$path"; then
29482        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29483      else
29484        dir="`$DIRNAME "$path"`"
29485        base="`$BASENAME "$path"`"
29486        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29487      fi
29488    fi
29489  fi
29490
29491            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29492$as_echo_n "checking for Boot JDK... " >&6; }
29493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29494$as_echo "$BOOT_JDK" >&6; }
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29496$as_echo_n "checking Boot JDK version... " >&6; }
29497            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29499$as_echo "$BOOT_JDK_VERSION" >&6; }
29500          fi # end check jdk version
29501        fi # end check javac
29502      fi # end check java
29503    fi # end check boot jdk found
29504  fi
29505
29506    done
29507  fi
29508
29509
29510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29512      # Do we have a bin/java?
29513      if test ! -x "$BOOT_JDK/bin/java"; then
29514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29516        BOOT_JDK_FOUND=no
29517      else
29518        # Do we have a bin/javac?
29519        if test ! -x "$BOOT_JDK/bin/javac"; then
29520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29524          BOOT_JDK_FOUND=no
29525        else
29526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29528
29529          # Extra M4 quote needed to protect [] in grep expression.
29530          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29531          if test "x$FOUND_CORRECT_VERSION" = x; then
29532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29536            BOOT_JDK_FOUND=no
29537          else
29538            # We're done! :-)
29539            BOOT_JDK_FOUND=yes
29540
29541  # Only process if variable expands to non-empty
29542
29543  if test "x$BOOT_JDK" != x; then
29544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29545
29546  # Input might be given as Windows format, start by converting to
29547  # unix format.
29548  path="$BOOT_JDK"
29549  new_path=`$CYGPATH -u "$path"`
29550
29551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29554  # "foo.exe" is OK but "foo" is an error.
29555  #
29556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29557  # It is also a way to make sure we got the proper file name for the real test later on.
29558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29559  if test "x$test_shortpath" = x; then
29560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29563  fi
29564
29565  # Call helper function which possibly converts this using DOS-style short mode.
29566  # If so, the updated path is stored in $new_path.
29567
29568  input_path="$new_path"
29569  # Check if we need to convert this using DOS-style short mode. If the path
29570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29571  # take no chances and rewrite it.
29572  # Note: m4 eats our [], so we need to use [ and ] instead.
29573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29574  if test "x$has_forbidden_chars" != x; then
29575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29579      # Going to short mode and back again did indeed matter. Since short mode is
29580      # case insensitive, let's make it lowercase to improve readability.
29581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29582      # Now convert it back to Unix-style (cygpath)
29583      input_path=`$CYGPATH -u "$shortmode_path"`
29584      new_path="$input_path"
29585    fi
29586  fi
29587
29588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29589  if test "x$test_cygdrive_prefix" = x; then
29590    # As a simple fix, exclude /usr/bin since it's not a real path.
29591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29593      # a path prefixed by /cygdrive for fixpath to work.
29594      new_path="$CYGWIN_ROOT_PATH$input_path"
29595    fi
29596  fi
29597
29598
29599  if test "x$path" != "x$new_path"; then
29600    BOOT_JDK="$new_path"
29601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29603  fi
29604
29605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29606
29607  path="$BOOT_JDK"
29608  has_colon=`$ECHO $path | $GREP ^.:`
29609  new_path="$path"
29610  if test "x$has_colon" = x; then
29611    # Not in mixed or Windows style, start by that.
29612    new_path=`cmd //c echo $path`
29613  fi
29614
29615
29616  input_path="$new_path"
29617  # Check if we need to convert this using DOS-style short mode. If the path
29618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29619  # take no chances and rewrite it.
29620  # Note: m4 eats our [], so we need to use [ and ] instead.
29621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29622  if test "x$has_forbidden_chars" != x; then
29623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29625  fi
29626
29627
29628  windows_path="$new_path"
29629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29630    unix_path=`$CYGPATH -u "$windows_path"`
29631    new_path="$unix_path"
29632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29634    new_path="$unix_path"
29635  fi
29636
29637  if test "x$path" != "x$new_path"; then
29638    BOOT_JDK="$new_path"
29639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29641  fi
29642
29643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29645
29646    else
29647      # We're on a unix platform. Hooray! :)
29648      path="$BOOT_JDK"
29649      has_space=`$ECHO "$path" | $GREP " "`
29650      if test "x$has_space" != x; then
29651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29654      fi
29655
29656      # Use eval to expand a potential ~
29657      eval path="$path"
29658      if test ! -f "$path" && test ! -d "$path"; then
29659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29660      fi
29661
29662      if test -d "$path"; then
29663        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29664      else
29665        dir="`$DIRNAME "$path"`"
29666        base="`$BASENAME "$path"`"
29667        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29668      fi
29669    fi
29670  fi
29671
29672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29673$as_echo_n "checking for Boot JDK... " >&6; }
29674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29675$as_echo "$BOOT_JDK" >&6; }
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29677$as_echo_n "checking Boot JDK version... " >&6; }
29678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29680$as_echo "$BOOT_JDK_VERSION" >&6; }
29681          fi # end check jdk version
29682        fi # end check javac
29683      fi # end check java
29684    fi # end check boot jdk found
29685  fi
29686
29687
29688  if test "x$BOOT_JDK_FOUND" = xno; then
29689    # Now execute the test
29690
29691  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29692  BOOT_JDK_SUFFIX="/Contents/Home"
29693  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29694  if test "x$ALL_JDKS_FOUND" != x; then
29695    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29696
29697  if test "x$BOOT_JDK_FOUND" = xno; then
29698    # Now execute the test
29699
29700        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29701        if test -d "$BOOT_JDK"; then
29702          BOOT_JDK_FOUND=maybe
29703          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29704$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29705        fi
29706
29707
29708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29710      # Do we have a bin/java?
29711      if test ! -x "$BOOT_JDK/bin/java"; then
29712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29714        BOOT_JDK_FOUND=no
29715      else
29716        # Do we have a bin/javac?
29717        if test ! -x "$BOOT_JDK/bin/javac"; then
29718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29722          BOOT_JDK_FOUND=no
29723        else
29724          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29725          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29726
29727          # Extra M4 quote needed to protect [] in grep expression.
29728          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29729          if test "x$FOUND_CORRECT_VERSION" = x; then
29730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29732            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29733$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29734            BOOT_JDK_FOUND=no
29735          else
29736            # We're done! :-)
29737            BOOT_JDK_FOUND=yes
29738
29739  # Only process if variable expands to non-empty
29740
29741  if test "x$BOOT_JDK" != x; then
29742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29743
29744  # Input might be given as Windows format, start by converting to
29745  # unix format.
29746  path="$BOOT_JDK"
29747  new_path=`$CYGPATH -u "$path"`
29748
29749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29752  # "foo.exe" is OK but "foo" is an error.
29753  #
29754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29755  # It is also a way to make sure we got the proper file name for the real test later on.
29756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29757  if test "x$test_shortpath" = x; then
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29760    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29761  fi
29762
29763  # Call helper function which possibly converts this using DOS-style short mode.
29764  # If so, the updated path is stored in $new_path.
29765
29766  input_path="$new_path"
29767  # Check if we need to convert this using DOS-style short mode. If the path
29768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29769  # take no chances and rewrite it.
29770  # Note: m4 eats our [], so we need to use [ and ] instead.
29771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29772  if test "x$has_forbidden_chars" != x; then
29773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29777      # Going to short mode and back again did indeed matter. Since short mode is
29778      # case insensitive, let's make it lowercase to improve readability.
29779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29780      # Now convert it back to Unix-style (cygpath)
29781      input_path=`$CYGPATH -u "$shortmode_path"`
29782      new_path="$input_path"
29783    fi
29784  fi
29785
29786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29787  if test "x$test_cygdrive_prefix" = x; then
29788    # As a simple fix, exclude /usr/bin since it's not a real path.
29789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29791      # a path prefixed by /cygdrive for fixpath to work.
29792      new_path="$CYGWIN_ROOT_PATH$input_path"
29793    fi
29794  fi
29795
29796
29797  if test "x$path" != "x$new_path"; then
29798    BOOT_JDK="$new_path"
29799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29801  fi
29802
29803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29804
29805  path="$BOOT_JDK"
29806  has_colon=`$ECHO $path | $GREP ^.:`
29807  new_path="$path"
29808  if test "x$has_colon" = x; then
29809    # Not in mixed or Windows style, start by that.
29810    new_path=`cmd //c echo $path`
29811  fi
29812
29813
29814  input_path="$new_path"
29815  # Check if we need to convert this using DOS-style short mode. If the path
29816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29817  # take no chances and rewrite it.
29818  # Note: m4 eats our [], so we need to use [ and ] instead.
29819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29820  if test "x$has_forbidden_chars" != x; then
29821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29823  fi
29824
29825
29826  windows_path="$new_path"
29827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29828    unix_path=`$CYGPATH -u "$windows_path"`
29829    new_path="$unix_path"
29830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29832    new_path="$unix_path"
29833  fi
29834
29835  if test "x$path" != "x$new_path"; then
29836    BOOT_JDK="$new_path"
29837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29839  fi
29840
29841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29843
29844    else
29845      # We're on a unix platform. Hooray! :)
29846      path="$BOOT_JDK"
29847      has_space=`$ECHO "$path" | $GREP " "`
29848      if test "x$has_space" != x; then
29849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29852      fi
29853
29854      # Use eval to expand a potential ~
29855      eval path="$path"
29856      if test ! -f "$path" && test ! -d "$path"; then
29857        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29858      fi
29859
29860      if test -d "$path"; then
29861        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29862      else
29863        dir="`$DIRNAME "$path"`"
29864        base="`$BASENAME "$path"`"
29865        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29866      fi
29867    fi
29868  fi
29869
29870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29871$as_echo_n "checking for Boot JDK... " >&6; }
29872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29873$as_echo "$BOOT_JDK" >&6; }
29874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29875$as_echo_n "checking Boot JDK version... " >&6; }
29876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29878$as_echo "$BOOT_JDK_VERSION" >&6; }
29879          fi # end check jdk version
29880        fi # end check javac
29881      fi # end check java
29882    fi # end check boot jdk found
29883  fi
29884
29885    done
29886  fi
29887
29888
29889    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29890    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29891      # Do we have a bin/java?
29892      if test ! -x "$BOOT_JDK/bin/java"; then
29893        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29895        BOOT_JDK_FOUND=no
29896      else
29897        # Do we have a bin/javac?
29898        if test ! -x "$BOOT_JDK/bin/javac"; then
29899          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29901          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29902$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29903          BOOT_JDK_FOUND=no
29904        else
29905          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29906          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29907
29908          # Extra M4 quote needed to protect [] in grep expression.
29909          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29910          if test "x$FOUND_CORRECT_VERSION" = x; then
29911            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29913            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29914$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29915            BOOT_JDK_FOUND=no
29916          else
29917            # We're done! :-)
29918            BOOT_JDK_FOUND=yes
29919
29920  # Only process if variable expands to non-empty
29921
29922  if test "x$BOOT_JDK" != x; then
29923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29924
29925  # Input might be given as Windows format, start by converting to
29926  # unix format.
29927  path="$BOOT_JDK"
29928  new_path=`$CYGPATH -u "$path"`
29929
29930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29933  # "foo.exe" is OK but "foo" is an error.
29934  #
29935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29936  # It is also a way to make sure we got the proper file name for the real test later on.
29937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29938  if test "x$test_shortpath" = x; then
29939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29941    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29942  fi
29943
29944  # Call helper function which possibly converts this using DOS-style short mode.
29945  # If so, the updated path is stored in $new_path.
29946
29947  input_path="$new_path"
29948  # Check if we need to convert this using DOS-style short mode. If the path
29949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29950  # take no chances and rewrite it.
29951  # Note: m4 eats our [], so we need to use [ and ] instead.
29952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29953  if test "x$has_forbidden_chars" != x; then
29954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29958      # Going to short mode and back again did indeed matter. Since short mode is
29959      # case insensitive, let's make it lowercase to improve readability.
29960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29961      # Now convert it back to Unix-style (cygpath)
29962      input_path=`$CYGPATH -u "$shortmode_path"`
29963      new_path="$input_path"
29964    fi
29965  fi
29966
29967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29968  if test "x$test_cygdrive_prefix" = x; then
29969    # As a simple fix, exclude /usr/bin since it's not a real path.
29970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29972      # a path prefixed by /cygdrive for fixpath to work.
29973      new_path="$CYGWIN_ROOT_PATH$input_path"
29974    fi
29975  fi
29976
29977
29978  if test "x$path" != "x$new_path"; then
29979    BOOT_JDK="$new_path"
29980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29981$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29982  fi
29983
29984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29985
29986  path="$BOOT_JDK"
29987  has_colon=`$ECHO $path | $GREP ^.:`
29988  new_path="$path"
29989  if test "x$has_colon" = x; then
29990    # Not in mixed or Windows style, start by that.
29991    new_path=`cmd //c echo $path`
29992  fi
29993
29994
29995  input_path="$new_path"
29996  # Check if we need to convert this using DOS-style short mode. If the path
29997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29998  # take no chances and rewrite it.
29999  # Note: m4 eats our [], so we need to use [ and ] instead.
30000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30001  if test "x$has_forbidden_chars" != x; then
30002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30004  fi
30005
30006
30007  windows_path="$new_path"
30008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30009    unix_path=`$CYGPATH -u "$windows_path"`
30010    new_path="$unix_path"
30011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30013    new_path="$unix_path"
30014  fi
30015
30016  if test "x$path" != "x$new_path"; then
30017    BOOT_JDK="$new_path"
30018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30020  fi
30021
30022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30024
30025    else
30026      # We're on a unix platform. Hooray! :)
30027      path="$BOOT_JDK"
30028      has_space=`$ECHO "$path" | $GREP " "`
30029      if test "x$has_space" != x; then
30030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30033      fi
30034
30035      # Use eval to expand a potential ~
30036      eval path="$path"
30037      if test ! -f "$path" && test ! -d "$path"; then
30038        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30039      fi
30040
30041      if test -d "$path"; then
30042        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30043      else
30044        dir="`$DIRNAME "$path"`"
30045        base="`$BASENAME "$path"`"
30046        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30047      fi
30048    fi
30049  fi
30050
30051            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30052$as_echo_n "checking for Boot JDK... " >&6; }
30053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30054$as_echo "$BOOT_JDK" >&6; }
30055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30056$as_echo_n "checking Boot JDK version... " >&6; }
30057            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30059$as_echo "$BOOT_JDK_VERSION" >&6; }
30060          fi # end check jdk version
30061        fi # end check javac
30062      fi # end check java
30063    fi # end check boot jdk found
30064  fi
30065
30066  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30067
30068  if test "x$BOOT_JDK_FOUND" = xno; then
30069    # Now execute the test
30070
30071  BOOT_JDK_PREFIX="/usr/lib/jvm"
30072  BOOT_JDK_SUFFIX=""
30073  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30074  if test "x$ALL_JDKS_FOUND" != x; then
30075    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30076
30077  if test "x$BOOT_JDK_FOUND" = xno; then
30078    # Now execute the test
30079
30080        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30081        if test -d "$BOOT_JDK"; then
30082          BOOT_JDK_FOUND=maybe
30083          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30084$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30085        fi
30086
30087
30088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30090      # Do we have a bin/java?
30091      if test ! -x "$BOOT_JDK/bin/java"; then
30092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30094        BOOT_JDK_FOUND=no
30095      else
30096        # Do we have a bin/javac?
30097        if test ! -x "$BOOT_JDK/bin/javac"; then
30098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30102          BOOT_JDK_FOUND=no
30103        else
30104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30106
30107          # Extra M4 quote needed to protect [] in grep expression.
30108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30109          if test "x$FOUND_CORRECT_VERSION" = x; then
30110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30114            BOOT_JDK_FOUND=no
30115          else
30116            # We're done! :-)
30117            BOOT_JDK_FOUND=yes
30118
30119  # Only process if variable expands to non-empty
30120
30121  if test "x$BOOT_JDK" != x; then
30122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30123
30124  # Input might be given as Windows format, start by converting to
30125  # unix format.
30126  path="$BOOT_JDK"
30127  new_path=`$CYGPATH -u "$path"`
30128
30129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30132  # "foo.exe" is OK but "foo" is an error.
30133  #
30134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30135  # It is also a way to make sure we got the proper file name for the real test later on.
30136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30137  if test "x$test_shortpath" = x; then
30138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30141  fi
30142
30143  # Call helper function which possibly converts this using DOS-style short mode.
30144  # If so, the updated path is stored in $new_path.
30145
30146  input_path="$new_path"
30147  # Check if we need to convert this using DOS-style short mode. If the path
30148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30149  # take no chances and rewrite it.
30150  # Note: m4 eats our [], so we need to use [ and ] instead.
30151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30152  if test "x$has_forbidden_chars" != x; then
30153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30157      # Going to short mode and back again did indeed matter. Since short mode is
30158      # case insensitive, let's make it lowercase to improve readability.
30159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30160      # Now convert it back to Unix-style (cygpath)
30161      input_path=`$CYGPATH -u "$shortmode_path"`
30162      new_path="$input_path"
30163    fi
30164  fi
30165
30166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30167  if test "x$test_cygdrive_prefix" = x; then
30168    # As a simple fix, exclude /usr/bin since it's not a real path.
30169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30171      # a path prefixed by /cygdrive for fixpath to work.
30172      new_path="$CYGWIN_ROOT_PATH$input_path"
30173    fi
30174  fi
30175
30176
30177  if test "x$path" != "x$new_path"; then
30178    BOOT_JDK="$new_path"
30179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30181  fi
30182
30183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30184
30185  path="$BOOT_JDK"
30186  has_colon=`$ECHO $path | $GREP ^.:`
30187  new_path="$path"
30188  if test "x$has_colon" = x; then
30189    # Not in mixed or Windows style, start by that.
30190    new_path=`cmd //c echo $path`
30191  fi
30192
30193
30194  input_path="$new_path"
30195  # Check if we need to convert this using DOS-style short mode. If the path
30196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30197  # take no chances and rewrite it.
30198  # Note: m4 eats our [], so we need to use [ and ] instead.
30199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30200  if test "x$has_forbidden_chars" != x; then
30201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30203  fi
30204
30205
30206  windows_path="$new_path"
30207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30208    unix_path=`$CYGPATH -u "$windows_path"`
30209    new_path="$unix_path"
30210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30212    new_path="$unix_path"
30213  fi
30214
30215  if test "x$path" != "x$new_path"; then
30216    BOOT_JDK="$new_path"
30217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30219  fi
30220
30221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30223
30224    else
30225      # We're on a unix platform. Hooray! :)
30226      path="$BOOT_JDK"
30227      has_space=`$ECHO "$path" | $GREP " "`
30228      if test "x$has_space" != x; then
30229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30232      fi
30233
30234      # Use eval to expand a potential ~
30235      eval path="$path"
30236      if test ! -f "$path" && test ! -d "$path"; then
30237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30238      fi
30239
30240      if test -d "$path"; then
30241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30242      else
30243        dir="`$DIRNAME "$path"`"
30244        base="`$BASENAME "$path"`"
30245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30246      fi
30247    fi
30248  fi
30249
30250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30251$as_echo_n "checking for Boot JDK... " >&6; }
30252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30253$as_echo "$BOOT_JDK" >&6; }
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30255$as_echo_n "checking Boot JDK version... " >&6; }
30256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30258$as_echo "$BOOT_JDK_VERSION" >&6; }
30259          fi # end check jdk version
30260        fi # end check javac
30261      fi # end check java
30262    fi # end check boot jdk found
30263  fi
30264
30265    done
30266  fi
30267
30268
30269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30271      # Do we have a bin/java?
30272      if test ! -x "$BOOT_JDK/bin/java"; then
30273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30275        BOOT_JDK_FOUND=no
30276      else
30277        # Do we have a bin/javac?
30278        if test ! -x "$BOOT_JDK/bin/javac"; then
30279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30283          BOOT_JDK_FOUND=no
30284        else
30285          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30286          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30287
30288          # Extra M4 quote needed to protect [] in grep expression.
30289          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30290          if test "x$FOUND_CORRECT_VERSION" = x; then
30291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30293            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30295            BOOT_JDK_FOUND=no
30296          else
30297            # We're done! :-)
30298            BOOT_JDK_FOUND=yes
30299
30300  # Only process if variable expands to non-empty
30301
30302  if test "x$BOOT_JDK" != x; then
30303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304
30305  # Input might be given as Windows format, start by converting to
30306  # unix format.
30307  path="$BOOT_JDK"
30308  new_path=`$CYGPATH -u "$path"`
30309
30310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30313  # "foo.exe" is OK but "foo" is an error.
30314  #
30315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30316  # It is also a way to make sure we got the proper file name for the real test later on.
30317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30318  if test "x$test_shortpath" = x; then
30319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30322  fi
30323
30324  # Call helper function which possibly converts this using DOS-style short mode.
30325  # If so, the updated path is stored in $new_path.
30326
30327  input_path="$new_path"
30328  # Check if we need to convert this using DOS-style short mode. If the path
30329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30330  # take no chances and rewrite it.
30331  # Note: m4 eats our [], so we need to use [ and ] instead.
30332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30333  if test "x$has_forbidden_chars" != x; then
30334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30338      # Going to short mode and back again did indeed matter. Since short mode is
30339      # case insensitive, let's make it lowercase to improve readability.
30340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30341      # Now convert it back to Unix-style (cygpath)
30342      input_path=`$CYGPATH -u "$shortmode_path"`
30343      new_path="$input_path"
30344    fi
30345  fi
30346
30347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30348  if test "x$test_cygdrive_prefix" = x; then
30349    # As a simple fix, exclude /usr/bin since it's not a real path.
30350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30352      # a path prefixed by /cygdrive for fixpath to work.
30353      new_path="$CYGWIN_ROOT_PATH$input_path"
30354    fi
30355  fi
30356
30357
30358  if test "x$path" != "x$new_path"; then
30359    BOOT_JDK="$new_path"
30360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30362  fi
30363
30364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30365
30366  path="$BOOT_JDK"
30367  has_colon=`$ECHO $path | $GREP ^.:`
30368  new_path="$path"
30369  if test "x$has_colon" = x; then
30370    # Not in mixed or Windows style, start by that.
30371    new_path=`cmd //c echo $path`
30372  fi
30373
30374
30375  input_path="$new_path"
30376  # Check if we need to convert this using DOS-style short mode. If the path
30377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30378  # take no chances and rewrite it.
30379  # Note: m4 eats our [], so we need to use [ and ] instead.
30380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30381  if test "x$has_forbidden_chars" != x; then
30382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30384  fi
30385
30386
30387  windows_path="$new_path"
30388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30389    unix_path=`$CYGPATH -u "$windows_path"`
30390    new_path="$unix_path"
30391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30393    new_path="$unix_path"
30394  fi
30395
30396  if test "x$path" != "x$new_path"; then
30397    BOOT_JDK="$new_path"
30398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30400  fi
30401
30402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30404
30405    else
30406      # We're on a unix platform. Hooray! :)
30407      path="$BOOT_JDK"
30408      has_space=`$ECHO "$path" | $GREP " "`
30409      if test "x$has_space" != x; then
30410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30413      fi
30414
30415      # Use eval to expand a potential ~
30416      eval path="$path"
30417      if test ! -f "$path" && test ! -d "$path"; then
30418        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30419      fi
30420
30421      if test -d "$path"; then
30422        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30423      else
30424        dir="`$DIRNAME "$path"`"
30425        base="`$BASENAME "$path"`"
30426        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30427      fi
30428    fi
30429  fi
30430
30431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30432$as_echo_n "checking for Boot JDK... " >&6; }
30433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30434$as_echo "$BOOT_JDK" >&6; }
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30436$as_echo_n "checking Boot JDK version... " >&6; }
30437            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30439$as_echo "$BOOT_JDK_VERSION" >&6; }
30440          fi # end check jdk version
30441        fi # end check javac
30442      fi # end check java
30443    fi # end check boot jdk found
30444  fi
30445
30446  fi
30447
30448
30449    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30450    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30451      # Do we have a bin/java?
30452      if test ! -x "$BOOT_JDK/bin/java"; then
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30455        BOOT_JDK_FOUND=no
30456      else
30457        # Do we have a bin/javac?
30458        if test ! -x "$BOOT_JDK/bin/javac"; then
30459          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30461          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30462$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30463          BOOT_JDK_FOUND=no
30464        else
30465          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30466          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30467
30468          # Extra M4 quote needed to protect [] in grep expression.
30469          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30470          if test "x$FOUND_CORRECT_VERSION" = x; then
30471            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30473            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30474$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30475            BOOT_JDK_FOUND=no
30476          else
30477            # We're done! :-)
30478            BOOT_JDK_FOUND=yes
30479
30480  # Only process if variable expands to non-empty
30481
30482  if test "x$BOOT_JDK" != x; then
30483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30484
30485  # Input might be given as Windows format, start by converting to
30486  # unix format.
30487  path="$BOOT_JDK"
30488  new_path=`$CYGPATH -u "$path"`
30489
30490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30493  # "foo.exe" is OK but "foo" is an error.
30494  #
30495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30496  # It is also a way to make sure we got the proper file name for the real test later on.
30497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30498  if test "x$test_shortpath" = x; then
30499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30501    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30502  fi
30503
30504  # Call helper function which possibly converts this using DOS-style short mode.
30505  # If so, the updated path is stored in $new_path.
30506
30507  input_path="$new_path"
30508  # Check if we need to convert this using DOS-style short mode. If the path
30509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30510  # take no chances and rewrite it.
30511  # Note: m4 eats our [], so we need to use [ and ] instead.
30512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30513  if test "x$has_forbidden_chars" != x; then
30514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30518      # Going to short mode and back again did indeed matter. Since short mode is
30519      # case insensitive, let's make it lowercase to improve readability.
30520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30521      # Now convert it back to Unix-style (cygpath)
30522      input_path=`$CYGPATH -u "$shortmode_path"`
30523      new_path="$input_path"
30524    fi
30525  fi
30526
30527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30528  if test "x$test_cygdrive_prefix" = x; then
30529    # As a simple fix, exclude /usr/bin since it's not a real path.
30530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30532      # a path prefixed by /cygdrive for fixpath to work.
30533      new_path="$CYGWIN_ROOT_PATH$input_path"
30534    fi
30535  fi
30536
30537
30538  if test "x$path" != "x$new_path"; then
30539    BOOT_JDK="$new_path"
30540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30542  fi
30543
30544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30545
30546  path="$BOOT_JDK"
30547  has_colon=`$ECHO $path | $GREP ^.:`
30548  new_path="$path"
30549  if test "x$has_colon" = x; then
30550    # Not in mixed or Windows style, start by that.
30551    new_path=`cmd //c echo $path`
30552  fi
30553
30554
30555  input_path="$new_path"
30556  # Check if we need to convert this using DOS-style short mode. If the path
30557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30558  # take no chances and rewrite it.
30559  # Note: m4 eats our [], so we need to use [ and ] instead.
30560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30561  if test "x$has_forbidden_chars" != x; then
30562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30564  fi
30565
30566
30567  windows_path="$new_path"
30568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30569    unix_path=`$CYGPATH -u "$windows_path"`
30570    new_path="$unix_path"
30571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30573    new_path="$unix_path"
30574  fi
30575
30576  if test "x$path" != "x$new_path"; then
30577    BOOT_JDK="$new_path"
30578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30580  fi
30581
30582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30584
30585    else
30586      # We're on a unix platform. Hooray! :)
30587      path="$BOOT_JDK"
30588      has_space=`$ECHO "$path" | $GREP " "`
30589      if test "x$has_space" != x; then
30590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30593      fi
30594
30595      # Use eval to expand a potential ~
30596      eval path="$path"
30597      if test ! -f "$path" && test ! -d "$path"; then
30598        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30599      fi
30600
30601      if test -d "$path"; then
30602        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30603      else
30604        dir="`$DIRNAME "$path"`"
30605        base="`$BASENAME "$path"`"
30606        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30607      fi
30608    fi
30609  fi
30610
30611            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30612$as_echo_n "checking for Boot JDK... " >&6; }
30613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30614$as_echo "$BOOT_JDK" >&6; }
30615            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30616$as_echo_n "checking Boot JDK version... " >&6; }
30617            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30619$as_echo "$BOOT_JDK_VERSION" >&6; }
30620          fi # end check jdk version
30621        fi # end check javac
30622      fi # end check java
30623    fi # end check boot jdk found
30624  fi
30625
30626
30627  # If we haven't found anything yet, we've truly lost. Give up.
30628  if test "x$BOOT_JDK_FOUND" = xno; then
30629
30630  # Print a helpful message on how to acquire the necessary build dependency.
30631  # openjdk is the help tag: freetype, cups, alsa etc
30632  MISSING_DEPENDENCY=openjdk
30633
30634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30635    cygwin_help $MISSING_DEPENDENCY
30636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30637    msys_help $MISSING_DEPENDENCY
30638  else
30639    PKGHANDLER_COMMAND=
30640
30641    case $PKGHANDLER in
30642      apt-get)
30643        apt_help     $MISSING_DEPENDENCY ;;
30644      yum)
30645        yum_help     $MISSING_DEPENDENCY ;;
30646      brew)
30647        brew_help    $MISSING_DEPENDENCY ;;
30648      port)
30649        port_help    $MISSING_DEPENDENCY ;;
30650      pkgutil)
30651        pkgutil_help $MISSING_DEPENDENCY ;;
30652      pkgadd)
30653        pkgadd_help  $MISSING_DEPENDENCY ;;
30654    esac
30655
30656    if test "x$PKGHANDLER_COMMAND" != x; then
30657      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30658    fi
30659  fi
30660
30661    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30662$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30663    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30664$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30665    as_fn_error $? "Cannot continue" "$LINENO" 5
30666  fi
30667
30668
30669
30670  # Setup tools from the Boot JDK.
30671
30672  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30673
30674  # Publish this variable in the help.
30675
30676
30677  if [ -z "${JAVA+x}" ]; then
30678    # The variable is not set by user, try to locate tool using the code snippet
30679
30680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30681$as_echo_n "checking for java in Boot JDK... " >&6; }
30682      JAVA=$BOOT_JDK/bin/java
30683      if test ! -x $JAVA; then
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30685$as_echo "not found" >&6; }
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30687$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30688        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30689      fi
30690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30691$as_echo "ok" >&6; }
30692
30693
30694  else
30695    # The variable is set, but is it from the command line or the environment?
30696
30697    # Try to remove the string !JAVA! from our list.
30698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30700      # If it failed, the variable was not from the command line. Ignore it,
30701      # but warn the user (except for BASH, which is always set by the calling BASH).
30702      if test "xJAVA" != xBASH; then
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30704$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30705      fi
30706      # Try to locate tool using the code snippet
30707
30708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30709$as_echo_n "checking for java in Boot JDK... " >&6; }
30710      JAVA=$BOOT_JDK/bin/java
30711      if test ! -x $JAVA; then
30712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30713$as_echo "not found" >&6; }
30714        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30715$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30716        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30717      fi
30718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30719$as_echo "ok" >&6; }
30720
30721
30722    else
30723      # If it succeeded, then it was overridden by the user. We will use it
30724      # for the tool.
30725
30726      # First remove it from the list of overridden variables, so we can test
30727      # for unknown variables in the end.
30728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30729
30730      # Check if we try to supply an empty value
30731      if test "x$JAVA" = x; then
30732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30733$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30735$as_echo_n "checking for JAVA... " >&6; }
30736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30737$as_echo "disabled" >&6; }
30738      else
30739        # Check if the provided tool contains a complete path.
30740        tool_specified="$JAVA"
30741        tool_basename="${tool_specified##*/}"
30742        if test "x$tool_basename" = "x$tool_specified"; then
30743          # A command without a complete path is provided, search $PATH.
30744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30745$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30746          # Extract the first word of "$tool_basename", so it can be a program name with args.
30747set dummy $tool_basename; ac_word=$2
30748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30749$as_echo_n "checking for $ac_word... " >&6; }
30750if ${ac_cv_path_JAVA+:} false; then :
30751  $as_echo_n "(cached) " >&6
30752else
30753  case $JAVA in
30754  [\\/]* | ?:[\\/]*)
30755  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30756  ;;
30757  *)
30758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30759for as_dir in $PATH
30760do
30761  IFS=$as_save_IFS
30762  test -z "$as_dir" && as_dir=.
30763    for ac_exec_ext in '' $ac_executable_extensions; do
30764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30765    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30767    break 2
30768  fi
30769done
30770  done
30771IFS=$as_save_IFS
30772
30773  ;;
30774esac
30775fi
30776JAVA=$ac_cv_path_JAVA
30777if test -n "$JAVA"; then
30778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30779$as_echo "$JAVA" >&6; }
30780else
30781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30782$as_echo "no" >&6; }
30783fi
30784
30785
30786          if test "x$JAVA" = x; then
30787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30788          fi
30789        else
30790          # Otherwise we believe it is a complete path. Use it as it is.
30791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30792$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30794$as_echo_n "checking for JAVA... " >&6; }
30795          if test ! -x "$tool_specified"; then
30796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30797$as_echo "not found" >&6; }
30798            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30799          fi
30800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30801$as_echo "$tool_specified" >&6; }
30802        fi
30803      fi
30804    fi
30805
30806  fi
30807
30808
30809
30810  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30811
30812  # Publish this variable in the help.
30813
30814
30815  if [ -z "${JAVAC+x}" ]; then
30816    # The variable is not set by user, try to locate tool using the code snippet
30817
30818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30819$as_echo_n "checking for javac in Boot JDK... " >&6; }
30820      JAVAC=$BOOT_JDK/bin/javac
30821      if test ! -x $JAVAC; then
30822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30823$as_echo "not found" >&6; }
30824        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30825$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30826        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30827      fi
30828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30829$as_echo "ok" >&6; }
30830
30831
30832  else
30833    # The variable is set, but is it from the command line or the environment?
30834
30835    # Try to remove the string !JAVAC! from our list.
30836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30838      # If it failed, the variable was not from the command line. Ignore it,
30839      # but warn the user (except for BASH, which is always set by the calling BASH).
30840      if test "xJAVAC" != xBASH; then
30841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30842$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30843      fi
30844      # Try to locate tool using the code snippet
30845
30846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30847$as_echo_n "checking for javac in Boot JDK... " >&6; }
30848      JAVAC=$BOOT_JDK/bin/javac
30849      if test ! -x $JAVAC; then
30850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30851$as_echo "not found" >&6; }
30852        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30853$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30854        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30855      fi
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30857$as_echo "ok" >&6; }
30858
30859
30860    else
30861      # If it succeeded, then it was overridden by the user. We will use it
30862      # for the tool.
30863
30864      # First remove it from the list of overridden variables, so we can test
30865      # for unknown variables in the end.
30866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30867
30868      # Check if we try to supply an empty value
30869      if test "x$JAVAC" = x; then
30870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30871$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30873$as_echo_n "checking for JAVAC... " >&6; }
30874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30875$as_echo "disabled" >&6; }
30876      else
30877        # Check if the provided tool contains a complete path.
30878        tool_specified="$JAVAC"
30879        tool_basename="${tool_specified##*/}"
30880        if test "x$tool_basename" = "x$tool_specified"; then
30881          # A command without a complete path is provided, search $PATH.
30882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30883$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30884          # Extract the first word of "$tool_basename", so it can be a program name with args.
30885set dummy $tool_basename; ac_word=$2
30886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30887$as_echo_n "checking for $ac_word... " >&6; }
30888if ${ac_cv_path_JAVAC+:} false; then :
30889  $as_echo_n "(cached) " >&6
30890else
30891  case $JAVAC in
30892  [\\/]* | ?:[\\/]*)
30893  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30894  ;;
30895  *)
30896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30897for as_dir in $PATH
30898do
30899  IFS=$as_save_IFS
30900  test -z "$as_dir" && as_dir=.
30901    for ac_exec_ext in '' $ac_executable_extensions; do
30902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30903    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30905    break 2
30906  fi
30907done
30908  done
30909IFS=$as_save_IFS
30910
30911  ;;
30912esac
30913fi
30914JAVAC=$ac_cv_path_JAVAC
30915if test -n "$JAVAC"; then
30916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30917$as_echo "$JAVAC" >&6; }
30918else
30919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30920$as_echo "no" >&6; }
30921fi
30922
30923
30924          if test "x$JAVAC" = x; then
30925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30926          fi
30927        else
30928          # Otherwise we believe it is a complete path. Use it as it is.
30929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30930$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30932$as_echo_n "checking for JAVAC... " >&6; }
30933          if test ! -x "$tool_specified"; then
30934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30935$as_echo "not found" >&6; }
30936            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30937          fi
30938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30939$as_echo "$tool_specified" >&6; }
30940        fi
30941      fi
30942    fi
30943
30944  fi
30945
30946
30947
30948  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30949
30950  # Publish this variable in the help.
30951
30952
30953  if [ -z "${JAVAH+x}" ]; then
30954    # The variable is not set by user, try to locate tool using the code snippet
30955
30956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30957$as_echo_n "checking for javah in Boot JDK... " >&6; }
30958      JAVAH=$BOOT_JDK/bin/javah
30959      if test ! -x $JAVAH; then
30960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30961$as_echo "not found" >&6; }
30962        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30963$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30964        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30965      fi
30966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30967$as_echo "ok" >&6; }
30968
30969
30970  else
30971    # The variable is set, but is it from the command line or the environment?
30972
30973    # Try to remove the string !JAVAH! from our list.
30974    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30975    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30976      # If it failed, the variable was not from the command line. Ignore it,
30977      # but warn the user (except for BASH, which is always set by the calling BASH).
30978      if test "xJAVAH" != xBASH; then
30979        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30980$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30981      fi
30982      # Try to locate tool using the code snippet
30983
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30985$as_echo_n "checking for javah in Boot JDK... " >&6; }
30986      JAVAH=$BOOT_JDK/bin/javah
30987      if test ! -x $JAVAH; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30989$as_echo "not found" >&6; }
30990        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30991$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30992        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30993      fi
30994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30995$as_echo "ok" >&6; }
30996
30997
30998    else
30999      # If it succeeded, then it was overridden by the user. We will use it
31000      # for the tool.
31001
31002      # First remove it from the list of overridden variables, so we can test
31003      # for unknown variables in the end.
31004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31005
31006      # Check if we try to supply an empty value
31007      if test "x$JAVAH" = x; then
31008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31009$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31011$as_echo_n "checking for JAVAH... " >&6; }
31012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31013$as_echo "disabled" >&6; }
31014      else
31015        # Check if the provided tool contains a complete path.
31016        tool_specified="$JAVAH"
31017        tool_basename="${tool_specified##*/}"
31018        if test "x$tool_basename" = "x$tool_specified"; then
31019          # A command without a complete path is provided, search $PATH.
31020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31021$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31022          # Extract the first word of "$tool_basename", so it can be a program name with args.
31023set dummy $tool_basename; ac_word=$2
31024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31025$as_echo_n "checking for $ac_word... " >&6; }
31026if ${ac_cv_path_JAVAH+:} false; then :
31027  $as_echo_n "(cached) " >&6
31028else
31029  case $JAVAH in
31030  [\\/]* | ?:[\\/]*)
31031  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31032  ;;
31033  *)
31034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31035for as_dir in $PATH
31036do
31037  IFS=$as_save_IFS
31038  test -z "$as_dir" && as_dir=.
31039    for ac_exec_ext in '' $ac_executable_extensions; do
31040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31041    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31043    break 2
31044  fi
31045done
31046  done
31047IFS=$as_save_IFS
31048
31049  ;;
31050esac
31051fi
31052JAVAH=$ac_cv_path_JAVAH
31053if test -n "$JAVAH"; then
31054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31055$as_echo "$JAVAH" >&6; }
31056else
31057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31058$as_echo "no" >&6; }
31059fi
31060
31061
31062          if test "x$JAVAH" = x; then
31063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31064          fi
31065        else
31066          # Otherwise we believe it is a complete path. Use it as it is.
31067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31068$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31070$as_echo_n "checking for JAVAH... " >&6; }
31071          if test ! -x "$tool_specified"; then
31072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31073$as_echo "not found" >&6; }
31074            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31075          fi
31076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31077$as_echo "$tool_specified" >&6; }
31078        fi
31079      fi
31080    fi
31081
31082  fi
31083
31084
31085
31086  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31087
31088  # Publish this variable in the help.
31089
31090
31091  if [ -z "${JAR+x}" ]; then
31092    # The variable is not set by user, try to locate tool using the code snippet
31093
31094      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31095$as_echo_n "checking for jar in Boot JDK... " >&6; }
31096      JAR=$BOOT_JDK/bin/jar
31097      if test ! -x $JAR; then
31098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31099$as_echo "not found" >&6; }
31100        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31101$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31102        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31103      fi
31104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31105$as_echo "ok" >&6; }
31106
31107
31108  else
31109    # The variable is set, but is it from the command line or the environment?
31110
31111    # Try to remove the string !JAR! from our list.
31112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31114      # If it failed, the variable was not from the command line. Ignore it,
31115      # but warn the user (except for BASH, which is always set by the calling BASH).
31116      if test "xJAR" != xBASH; then
31117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31118$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31119      fi
31120      # Try to locate tool using the code snippet
31121
31122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31123$as_echo_n "checking for jar in Boot JDK... " >&6; }
31124      JAR=$BOOT_JDK/bin/jar
31125      if test ! -x $JAR; then
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31127$as_echo "not found" >&6; }
31128        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31129$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31130        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31131      fi
31132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31133$as_echo "ok" >&6; }
31134
31135
31136    else
31137      # If it succeeded, then it was overridden by the user. We will use it
31138      # for the tool.
31139
31140      # First remove it from the list of overridden variables, so we can test
31141      # for unknown variables in the end.
31142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31143
31144      # Check if we try to supply an empty value
31145      if test "x$JAR" = x; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31147$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31149$as_echo_n "checking for JAR... " >&6; }
31150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31151$as_echo "disabled" >&6; }
31152      else
31153        # Check if the provided tool contains a complete path.
31154        tool_specified="$JAR"
31155        tool_basename="${tool_specified##*/}"
31156        if test "x$tool_basename" = "x$tool_specified"; then
31157          # A command without a complete path is provided, search $PATH.
31158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31159$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31160          # Extract the first word of "$tool_basename", so it can be a program name with args.
31161set dummy $tool_basename; ac_word=$2
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31163$as_echo_n "checking for $ac_word... " >&6; }
31164if ${ac_cv_path_JAR+:} false; then :
31165  $as_echo_n "(cached) " >&6
31166else
31167  case $JAR in
31168  [\\/]* | ?:[\\/]*)
31169  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31170  ;;
31171  *)
31172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31173for as_dir in $PATH
31174do
31175  IFS=$as_save_IFS
31176  test -z "$as_dir" && as_dir=.
31177    for ac_exec_ext in '' $ac_executable_extensions; do
31178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31179    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31181    break 2
31182  fi
31183done
31184  done
31185IFS=$as_save_IFS
31186
31187  ;;
31188esac
31189fi
31190JAR=$ac_cv_path_JAR
31191if test -n "$JAR"; then
31192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31193$as_echo "$JAR" >&6; }
31194else
31195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31196$as_echo "no" >&6; }
31197fi
31198
31199
31200          if test "x$JAR" = x; then
31201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31202          fi
31203        else
31204          # Otherwise we believe it is a complete path. Use it as it is.
31205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31206$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31208$as_echo_n "checking for JAR... " >&6; }
31209          if test ! -x "$tool_specified"; then
31210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31211$as_echo "not found" >&6; }
31212            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31213          fi
31214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31215$as_echo "$tool_specified" >&6; }
31216        fi
31217      fi
31218    fi
31219
31220  fi
31221
31222
31223
31224  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31225
31226  # Publish this variable in the help.
31227
31228
31229  if [ -z "${JARSIGNER+x}" ]; then
31230    # The variable is not set by user, try to locate tool using the code snippet
31231
31232      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31233$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31234      JARSIGNER=$BOOT_JDK/bin/jarsigner
31235      if test ! -x $JARSIGNER; then
31236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31237$as_echo "not found" >&6; }
31238        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31239$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31240        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31241      fi
31242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31243$as_echo "ok" >&6; }
31244
31245
31246  else
31247    # The variable is set, but is it from the command line or the environment?
31248
31249    # Try to remove the string !JARSIGNER! from our list.
31250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31252      # If it failed, the variable was not from the command line. Ignore it,
31253      # but warn the user (except for BASH, which is always set by the calling BASH).
31254      if test "xJARSIGNER" != xBASH; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31256$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31257      fi
31258      # Try to locate tool using the code snippet
31259
31260      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31261$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31262      JARSIGNER=$BOOT_JDK/bin/jarsigner
31263      if test ! -x $JARSIGNER; then
31264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31265$as_echo "not found" >&6; }
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31267$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31268        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31269      fi
31270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31271$as_echo "ok" >&6; }
31272
31273
31274    else
31275      # If it succeeded, then it was overridden by the user. We will use it
31276      # for the tool.
31277
31278      # First remove it from the list of overridden variables, so we can test
31279      # for unknown variables in the end.
31280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31281
31282      # Check if we try to supply an empty value
31283      if test "x$JARSIGNER" = x; then
31284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31285$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31287$as_echo_n "checking for JARSIGNER... " >&6; }
31288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31289$as_echo "disabled" >&6; }
31290      else
31291        # Check if the provided tool contains a complete path.
31292        tool_specified="$JARSIGNER"
31293        tool_basename="${tool_specified##*/}"
31294        if test "x$tool_basename" = "x$tool_specified"; then
31295          # A command without a complete path is provided, search $PATH.
31296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31297$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31298          # Extract the first word of "$tool_basename", so it can be a program name with args.
31299set dummy $tool_basename; ac_word=$2
31300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31301$as_echo_n "checking for $ac_word... " >&6; }
31302if ${ac_cv_path_JARSIGNER+:} false; then :
31303  $as_echo_n "(cached) " >&6
31304else
31305  case $JARSIGNER in
31306  [\\/]* | ?:[\\/]*)
31307  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31308  ;;
31309  *)
31310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31311for as_dir in $PATH
31312do
31313  IFS=$as_save_IFS
31314  test -z "$as_dir" && as_dir=.
31315    for ac_exec_ext in '' $ac_executable_extensions; do
31316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31317    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31319    break 2
31320  fi
31321done
31322  done
31323IFS=$as_save_IFS
31324
31325  ;;
31326esac
31327fi
31328JARSIGNER=$ac_cv_path_JARSIGNER
31329if test -n "$JARSIGNER"; then
31330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31331$as_echo "$JARSIGNER" >&6; }
31332else
31333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31334$as_echo "no" >&6; }
31335fi
31336
31337
31338          if test "x$JARSIGNER" = x; then
31339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31340          fi
31341        else
31342          # Otherwise we believe it is a complete path. Use it as it is.
31343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31344$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31346$as_echo_n "checking for JARSIGNER... " >&6; }
31347          if test ! -x "$tool_specified"; then
31348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31349$as_echo "not found" >&6; }
31350            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31351          fi
31352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31353$as_echo "$tool_specified" >&6; }
31354        fi
31355      fi
31356    fi
31357
31358  fi
31359
31360
31361
31362  # Finally, set some other options...
31363
31364  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31365  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31366
31367
31368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31369$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31370  if "$JAVA" --list-modules > /dev/null 2>&1; then
31371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31372$as_echo "yes" >&6; }
31373    BOOT_JDK_MODULAR="true"
31374  else
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31376$as_echo "no" >&6; }
31377    BOOT_JDK_MODULAR="false"
31378  fi
31379
31380
31381
31382
31383  # Check if the boot jdk is 32 or 64 bit
31384  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31385    BOOT_JDK_BITS="64"
31386  else
31387    BOOT_JDK_BITS="32"
31388  fi
31389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31390$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31392$as_echo "$BOOT_JDK_BITS" >&6; }
31393
31394
31395
31396# Check whether --with-build-jdk was given.
31397if test "${with_build_jdk+set}" = set; then :
31398  withval=$with_build_jdk;
31399fi
31400
31401
31402  CREATE_BUILDJDK=false
31403  EXTERNAL_BUILDJDK=false
31404  BUILD_JDK_FOUND="no"
31405  if test "x$with_build_jdk" != "x"; then
31406
31407  if test "x$BUILD_JDK_FOUND" = xno; then
31408    # Execute the test
31409
31410       if test "x$with_build_jdk" != x; then
31411         BUILD_JDK=$with_build_jdk
31412         BUILD_JDK_FOUND=maybe
31413         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31414$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31415       fi
31416
31417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31418    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31419      # Do we have a bin/java?
31420      if test ! -x "$BUILD_JDK/bin/java"; then
31421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31422$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31423        BUILD_JDK_FOUND=no
31424      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31426$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31427        BUILD_JDK_FOUND=no
31428      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31430$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31431        BUILD_JDK_FOUND=no
31432      elif test ! -x "$BUILD_JDK/bin/javac"; then
31433        # Do we have a bin/javac?
31434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31435$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31436        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31437$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31438        BUILD_JDK_FOUND=no
31439      else
31440        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31441        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31442
31443        # Extra M4 quote needed to protect [] in grep expression.
31444        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31445        if test "x$FOUND_CORRECT_VERSION" = x; then
31446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31447$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31448          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31449$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31450          BUILD_JDK_FOUND=no
31451        else
31452          # We're done!
31453          BUILD_JDK_FOUND=yes
31454
31455  # Only process if variable expands to non-empty
31456
31457  if test "x$BUILD_JDK" != x; then
31458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31459
31460  # Input might be given as Windows format, start by converting to
31461  # unix format.
31462  path="$BUILD_JDK"
31463  new_path=`$CYGPATH -u "$path"`
31464
31465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31468  # "foo.exe" is OK but "foo" is an error.
31469  #
31470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31471  # It is also a way to make sure we got the proper file name for the real test later on.
31472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31473  if test "x$test_shortpath" = x; then
31474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31475$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31476    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31477  fi
31478
31479  # Call helper function which possibly converts this using DOS-style short mode.
31480  # If so, the updated path is stored in $new_path.
31481
31482  input_path="$new_path"
31483  # Check if we need to convert this using DOS-style short mode. If the path
31484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31485  # take no chances and rewrite it.
31486  # Note: m4 eats our [], so we need to use [ and ] instead.
31487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31488  if test "x$has_forbidden_chars" != x; then
31489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31493      # Going to short mode and back again did indeed matter. Since short mode is
31494      # case insensitive, let's make it lowercase to improve readability.
31495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31496      # Now convert it back to Unix-style (cygpath)
31497      input_path=`$CYGPATH -u "$shortmode_path"`
31498      new_path="$input_path"
31499    fi
31500  fi
31501
31502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31503  if test "x$test_cygdrive_prefix" = x; then
31504    # As a simple fix, exclude /usr/bin since it's not a real path.
31505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31507      # a path prefixed by /cygdrive for fixpath to work.
31508      new_path="$CYGWIN_ROOT_PATH$input_path"
31509    fi
31510  fi
31511
31512
31513  if test "x$path" != "x$new_path"; then
31514    BUILD_JDK="$new_path"
31515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31516$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31517  fi
31518
31519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31520
31521  path="$BUILD_JDK"
31522  has_colon=`$ECHO $path | $GREP ^.:`
31523  new_path="$path"
31524  if test "x$has_colon" = x; then
31525    # Not in mixed or Windows style, start by that.
31526    new_path=`cmd //c echo $path`
31527  fi
31528
31529
31530  input_path="$new_path"
31531  # Check if we need to convert this using DOS-style short mode. If the path
31532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31533  # take no chances and rewrite it.
31534  # Note: m4 eats our [], so we need to use [ and ] instead.
31535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31536  if test "x$has_forbidden_chars" != x; then
31537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31539  fi
31540
31541
31542  windows_path="$new_path"
31543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31544    unix_path=`$CYGPATH -u "$windows_path"`
31545    new_path="$unix_path"
31546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31548    new_path="$unix_path"
31549  fi
31550
31551  if test "x$path" != "x$new_path"; then
31552    BUILD_JDK="$new_path"
31553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31554$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31555  fi
31556
31557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31559
31560    else
31561      # We're on a unix platform. Hooray! :)
31562      path="$BUILD_JDK"
31563      has_space=`$ECHO "$path" | $GREP " "`
31564      if test "x$has_space" != x; then
31565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31566$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31568      fi
31569
31570      # Use eval to expand a potential ~
31571      eval path="$path"
31572      if test ! -f "$path" && test ! -d "$path"; then
31573        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31574      fi
31575
31576      if test -d "$path"; then
31577        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31578      else
31579        dir="`$DIRNAME "$path"`"
31580        base="`$BASENAME "$path"`"
31581        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31582      fi
31583    fi
31584  fi
31585
31586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31587$as_echo_n "checking for Build JDK... " >&6; }
31588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31589$as_echo "$BUILD_JDK" >&6; }
31590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31591$as_echo_n "checking Build JDK version... " >&6; }
31592          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31594$as_echo "$BUILD_JDK_VERSION" >&6; }
31595        fi # end check jdk version
31596      fi # end check java
31597    fi # end check build jdk found
31598  fi
31599
31600    EXTERNAL_BUILDJDK=true
31601  else
31602    if test "x$COMPILE_TYPE" = "xcross"; then
31603      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31604      BUILD_JDK_FOUND=yes
31605      CREATE_BUILDJDK=true
31606      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31607$as_echo_n "checking for Build JDK... " >&6; }
31608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31609$as_echo "yes, will build it for the host platform" >&6; }
31610    else
31611      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31612      BUILD_JDK_FOUND=yes
31613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31614$as_echo_n "checking for Build JDK... " >&6; }
31615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31616$as_echo "yes, will use output dir" >&6; }
31617    fi
31618  fi
31619
31620  JMOD="$BUILD_JDK/bin/jmod"
31621  JLINK="$BUILD_JDK/bin/jlink"
31622
31623
31624
31625  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31627$as_echo_n "checking for Build JDK... " >&6; }
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31629$as_echo "no" >&6; }
31630    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31631  fi
31632
31633
31634
31635
31636
31637
31638###############################################################################
31639#
31640# Configure the sources to use. We can add or override individual directories.
31641#
31642###############################################################################
31643
31644
31645  # Where are the sources.
31646  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31647  CORBA_TOPDIR="$SRC_ROOT/corba"
31648  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31649  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31650  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31651  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31652  JDK_TOPDIR="$SRC_ROOT/jdk"
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662  # This feature is no longer supported.
31663
31664
31665
31666# Check whether --with-add-source-root was given.
31667if test "${with_add_source_root+set}" = set; then :
31668  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
31669$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31670fi
31671
31672
31673
31674
31675# Check whether --with-override-source-root was given.
31676if test "${with_override_source_root+set}" = set; then :
31677  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
31678$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31679fi
31680
31681
31682
31683
31684# Check whether --with-adds-and-overrides was given.
31685if test "${with_adds_and_overrides+set}" = set; then :
31686  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
31687$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31688fi
31689
31690
31691
31692
31693# Check whether --with-override-langtools was given.
31694if test "${with_override_langtools+set}" = set; then :
31695  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31696$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31697fi
31698
31699
31700
31701
31702# Check whether --with-override-corba was given.
31703if test "${with_override_corba+set}" = set; then :
31704  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31705$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31706fi
31707
31708
31709
31710
31711# Check whether --with-override-jaxp was given.
31712if test "${with_override_jaxp+set}" = set; then :
31713  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31714$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31715fi
31716
31717
31718
31719
31720# Check whether --with-override-jaxws was given.
31721if test "${with_override_jaxws+set}" = set; then :
31722  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31723$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31724fi
31725
31726
31727
31728
31729# Check whether --with-override-hotspot was given.
31730if test "${with_override_hotspot+set}" = set; then :
31731  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31732$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31733fi
31734
31735
31736
31737
31738# Check whether --with-override-nashorn was given.
31739if test "${with_override_nashorn+set}" = set; then :
31740  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31741$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31742fi
31743
31744
31745
31746
31747# Check whether --with-override-jdk was given.
31748if test "${with_override_jdk+set}" = set; then :
31749  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31750$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31751fi
31752
31753
31754
31755
31756  BUILD_OUTPUT="$OUTPUT_ROOT"
31757
31758  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31759
31760
31761
31762# Check whether --with-import_hotspot was given.
31763if test "${with_import_hotspot+set}" = set; then :
31764  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31765$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31766fi
31767
31768
31769
31770
31771
31772
31773# Check whether --with-import-modules was given.
31774if test "${with_import_modules+set}" = set; then :
31775  withval=$with_import_modules;
31776fi
31777
31778
31779  if test "x$with_import_modules" != x \
31780      && test "x$with_import_modules" != "xno"; then
31781    if test -d "$with_import_modules"; then
31782      IMPORT_MODULES_TOPDIR="$with_import_modules"
31783
31784  # Only process if variable expands to non-empty
31785
31786  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31788
31789  # Input might be given as Windows format, start by converting to
31790  # unix format.
31791  path="$IMPORT_MODULES_TOPDIR"
31792  new_path=`$CYGPATH -u "$path"`
31793
31794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31797  # "foo.exe" is OK but "foo" is an error.
31798  #
31799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31800  # It is also a way to make sure we got the proper file name for the real test later on.
31801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31802  if test "x$test_shortpath" = x; then
31803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31804$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31805    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31806  fi
31807
31808  # Call helper function which possibly converts this using DOS-style short mode.
31809  # If so, the updated path is stored in $new_path.
31810
31811  input_path="$new_path"
31812  # Check if we need to convert this using DOS-style short mode. If the path
31813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31814  # take no chances and rewrite it.
31815  # Note: m4 eats our [], so we need to use [ and ] instead.
31816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31817  if test "x$has_forbidden_chars" != x; then
31818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31822      # Going to short mode and back again did indeed matter. Since short mode is
31823      # case insensitive, let's make it lowercase to improve readability.
31824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31825      # Now convert it back to Unix-style (cygpath)
31826      input_path=`$CYGPATH -u "$shortmode_path"`
31827      new_path="$input_path"
31828    fi
31829  fi
31830
31831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31832  if test "x$test_cygdrive_prefix" = x; then
31833    # As a simple fix, exclude /usr/bin since it's not a real path.
31834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31836      # a path prefixed by /cygdrive for fixpath to work.
31837      new_path="$CYGWIN_ROOT_PATH$input_path"
31838    fi
31839  fi
31840
31841
31842  if test "x$path" != "x$new_path"; then
31843    IMPORT_MODULES_TOPDIR="$new_path"
31844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31845$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31846  fi
31847
31848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31849
31850  path="$IMPORT_MODULES_TOPDIR"
31851  has_colon=`$ECHO $path | $GREP ^.:`
31852  new_path="$path"
31853  if test "x$has_colon" = x; then
31854    # Not in mixed or Windows style, start by that.
31855    new_path=`cmd //c echo $path`
31856  fi
31857
31858
31859  input_path="$new_path"
31860  # Check if we need to convert this using DOS-style short mode. If the path
31861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31862  # take no chances and rewrite it.
31863  # Note: m4 eats our [], so we need to use [ and ] instead.
31864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31865  if test "x$has_forbidden_chars" != x; then
31866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31868  fi
31869
31870
31871  windows_path="$new_path"
31872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31873    unix_path=`$CYGPATH -u "$windows_path"`
31874    new_path="$unix_path"
31875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31877    new_path="$unix_path"
31878  fi
31879
31880  if test "x$path" != "x$new_path"; then
31881    IMPORT_MODULES_TOPDIR="$new_path"
31882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31883$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31884  fi
31885
31886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31888
31889    else
31890      # We're on a unix platform. Hooray! :)
31891      path="$IMPORT_MODULES_TOPDIR"
31892      has_space=`$ECHO "$path" | $GREP " "`
31893      if test "x$has_space" != x; then
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31895$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31896        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31897      fi
31898
31899      # Use eval to expand a potential ~
31900      eval path="$path"
31901      if test ! -f "$path" && test ! -d "$path"; then
31902        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31903      fi
31904
31905      if test -d "$path"; then
31906        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31907      else
31908        dir="`$DIRNAME "$path"`"
31909        base="`$BASENAME "$path"`"
31910        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31911      fi
31912    fi
31913  fi
31914
31915    elif test -e "$with_import_modules"; then
31916      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31917      $RM -rf "$IMPORT_MODULES_TOPDIR"
31918      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31919      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31920        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31921      fi
31922    else
31923      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31924    fi
31925  fi
31926
31927  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31928    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31929  fi
31930  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31931    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31932  fi
31933  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31934    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31935  fi
31936  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31937    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31938  fi
31939  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31940    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31941  fi
31942  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31943    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31944  fi
31945  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31946    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31947  fi
31948  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31949    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31950  fi
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962###############################################################################
31963#
31964# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31965# native code.
31966#
31967###############################################################################
31968
31969# See if we are doing a complete static build or not
31970
31971  # Check whether --enable-static-build was given.
31972if test "${enable_static_build+set}" = set; then :
31973  enableval=$enable_static_build;
31974fi
31975
31976  STATIC_BUILD=false
31977  if test "x$enable_static_build" = "xyes"; then
31978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31979$as_echo_n "checking if static build is enabled... " >&6; }
31980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31981$as_echo "yes" >&6; }
31982    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31983      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31984    fi
31985    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31986    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31987    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31988    STATIC_BUILD=true
31989  elif test "x$enable_static_build" = "xno"; then
31990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31991$as_echo_n "checking if static build is enabled... " >&6; }
31992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31993$as_echo "no" >&6; }
31994  elif test "x$enable_static_build" != "x"; then
31995    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31996  fi
31997
31998
31999
32000
32001# First determine the toolchain type (compiler family)
32002
32003
32004# Check whether --with-toolchain-type was given.
32005if test "${with_toolchain_type+set}" = set; then :
32006  withval=$with_toolchain_type;
32007fi
32008
32009
32010  # Use indirect variable referencing
32011  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32012  VALID_TOOLCHAINS=${!toolchain_var_name}
32013
32014  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32015    if test -n "$XCODEBUILD"; then
32016      # On Mac OS X, default toolchain to clang after Xcode 5
32017      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32018      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32019      if test $? -ne 0; then
32020        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32021      fi
32022      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32023          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32024          $CUT -f 1 -d .`
32025      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32026$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32027      if test $XCODE_MAJOR_VERSION -ge 5; then
32028          DEFAULT_TOOLCHAIN="clang"
32029      else
32030          DEFAULT_TOOLCHAIN="gcc"
32031      fi
32032    else
32033      # If Xcode is not installed, but the command line tools are
32034      # then we can't run xcodebuild. On these systems we should
32035      # default to clang
32036      DEFAULT_TOOLCHAIN="clang"
32037    fi
32038  else
32039    # First toolchain type in the list is the default
32040    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32041  fi
32042
32043  if test "x$with_toolchain_type" = xlist; then
32044    # List all toolchains
32045    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32046$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32047    for toolchain in $VALID_TOOLCHAINS; do
32048      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32049      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32050      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32051    done
32052
32053    exit 0
32054  elif test "x$with_toolchain_type" != x; then
32055    # User override; check that it is valid
32056    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32057      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32058$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32059      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32060$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32061      as_fn_error $? "Cannot continue." "$LINENO" 5
32062    fi
32063    TOOLCHAIN_TYPE=$with_toolchain_type
32064  else
32065    # No flag given, use default
32066    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32067  fi
32068
32069
32070  TOOLCHAIN_CC_BINARY_clang="clang"
32071  TOOLCHAIN_CC_BINARY_gcc="gcc"
32072  TOOLCHAIN_CC_BINARY_microsoft="cl"
32073  TOOLCHAIN_CC_BINARY_solstudio="cc"
32074  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32075
32076  TOOLCHAIN_CXX_BINARY_clang="clang++"
32077  TOOLCHAIN_CXX_BINARY_gcc="g++"
32078  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32079  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32080  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32081
32082  # Use indirect variable referencing
32083  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32084  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32085  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32086  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32087  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32088  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32089  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32090  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32091
32092
32093  # Define filename patterns
32094  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32095    LIBRARY_PREFIX=
32096    SHARED_LIBRARY_SUFFIX='.dll'
32097    STATIC_LIBRARY_SUFFIX='.lib'
32098    SHARED_LIBRARY='$1.dll'
32099    STATIC_LIBRARY='$1.lib'
32100    OBJ_SUFFIX='.obj'
32101    EXE_SUFFIX='.exe'
32102  else
32103    LIBRARY_PREFIX=lib
32104    SHARED_LIBRARY_SUFFIX='.so'
32105    STATIC_LIBRARY_SUFFIX='.a'
32106    SHARED_LIBRARY='lib$1.so'
32107    STATIC_LIBRARY='lib$1.a'
32108    OBJ_SUFFIX='.o'
32109    EXE_SUFFIX=''
32110    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32111      # For full static builds, we're overloading the SHARED_LIBRARY
32112      # variables in order to limit the amount of changes required.
32113      # It would be better to remove SHARED and just use LIBRARY and
32114      # LIBRARY_SUFFIX for libraries that can be built either
32115      # shared or static and use STATIC_* for libraries that are
32116      # always built statically.
32117      if test "x$STATIC_BUILD" = xtrue; then
32118        SHARED_LIBRARY='lib$1.a'
32119        SHARED_LIBRARY_SUFFIX='.a'
32120      else
32121        SHARED_LIBRARY='lib$1.dylib'
32122        SHARED_LIBRARY_SUFFIX='.dylib'
32123      fi
32124    fi
32125  fi
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32137    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32138$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32139  else
32140    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32141$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32142  fi
32143
32144
32145# User supplied flags should be used when configure detects compilers
32146
32147  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32148    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32149$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32150  fi
32151
32152  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32154$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32155  fi
32156
32157  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32159$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32160  fi
32161
32162
32163# Check whether --with-extra-cflags was given.
32164if test "${with_extra_cflags+set}" = set; then :
32165  withval=$with_extra_cflags;
32166fi
32167
32168
32169
32170# Check whether --with-extra-cxxflags was given.
32171if test "${with_extra_cxxflags+set}" = set; then :
32172  withval=$with_extra_cxxflags;
32173fi
32174
32175
32176
32177# Check whether --with-extra-ldflags was given.
32178if test "${with_extra_ldflags+set}" = set; then :
32179  withval=$with_extra_ldflags;
32180fi
32181
32182
32183  EXTRA_CFLAGS="$with_extra_cflags"
32184  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32185  EXTRA_LDFLAGS="$with_extra_ldflags"
32186
32187
32188
32189
32190
32191  # The global CFLAGS and LDLAGS variables are used by configure tests and
32192  # should include the extra parameters
32193  CFLAGS="$EXTRA_CFLAGS"
32194  CXXFLAGS="$EXTRA_CXXFLAGS"
32195  LDFLAGS="$EXTRA_LDFLAGS"
32196  CPPFLAGS=""
32197
32198# The sysroot cflags are needed for configure to be able to run the compilers
32199
32200  if test "x$SYSROOT" != "x"; then
32201    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32202      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32203        # Solaris Studio does not have a concept of sysroot. Instead we must
32204        # make sure the default include and lib dirs are appended to each
32205        # compile and link command line. Must also add -I-xbuiltin to enable
32206        # inlining of system functions and intrinsics.
32207        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32208        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32209            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32210      fi
32211    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32212      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32213      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32214    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32215      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32216      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32217    fi
32218    # The global CFLAGS and LDFLAGS variables need these for configure to function
32219    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32220    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32221    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32222    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32223  fi
32224
32225  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32226    # We also need -iframework<path>/System/Library/Frameworks
32227    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32228    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32229    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32230    # set this here so it doesn't have to be peppered throughout the forest
32231    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32232    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32233  fi
32234
32235
32236
32237
32238
32239# Then detect the actual binaries needed
32240
32241  # FIXME: Is this needed?
32242  ac_ext=cpp
32243ac_cpp='$CXXCPP $CPPFLAGS'
32244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32247
32248
32249  # Store the CFLAGS etc passed to the configure script.
32250  ORG_CFLAGS="$CFLAGS"
32251  ORG_CXXFLAGS="$CXXFLAGS"
32252
32253  # autoconf magic only relies on PATH, so update it if tools dir is specified
32254  OLD_PATH="$PATH"
32255
32256  # On Windows, we need to detect the visual studio installation first.
32257  # This will change the PATH, but we need to keep that new PATH even
32258  # after toolchain detection is done, since the compiler (on x86) uses
32259  # it for DLL resolution in runtime.
32260  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32261      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32262
32263  # Store path to cygwin link.exe to help excluding it when searching for
32264  # VS linker. This must be done before changing the PATH when looking for VS.
32265  # Extract the first word of "link", so it can be a program name with args.
32266set dummy link; ac_word=$2
32267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32268$as_echo_n "checking for $ac_word... " >&6; }
32269if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32270  $as_echo_n "(cached) " >&6
32271else
32272  case $CYGWIN_LINK in
32273  [\\/]* | ?:[\\/]*)
32274  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32275  ;;
32276  *)
32277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32278for as_dir in $PATH
32279do
32280  IFS=$as_save_IFS
32281  test -z "$as_dir" && as_dir=.
32282    for ac_exec_ext in '' $ac_executable_extensions; do
32283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32284    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32286    break 2
32287  fi
32288done
32289  done
32290IFS=$as_save_IFS
32291
32292  ;;
32293esac
32294fi
32295CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32296if test -n "$CYGWIN_LINK"; then
32297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32298$as_echo "$CYGWIN_LINK" >&6; }
32299else
32300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32301$as_echo "no" >&6; }
32302fi
32303
32304
32305  if test "x$CYGWIN_LINK" != x; then
32306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32307$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32308    "$CYGWIN_LINK" --version > /dev/null
32309    if test $? -eq 0 ; then
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32311$as_echo "yes" >&6; }
32312    else
32313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32314$as_echo "no" >&6; }
32315      # This might be the VS linker. Don't exclude it later on.
32316      CYGWIN_LINK=""
32317    fi
32318  fi
32319
32320  # First-hand choice is to locate and run the vsvars bat file.
32321
32322
32323# Check whether --with-toolchain-version was given.
32324if test "${with_toolchain_version+set}" = set; then :
32325  withval=$with_toolchain_version;
32326fi
32327
32328
32329  if test "x$with_toolchain_version" = xlist; then
32330    # List all toolchains
32331    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32332$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32333    for version in $VALID_VS_VERSIONS; do
32334      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32335      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32336    done
32337
32338    exit 0
32339  elif test "x$DEVKIT_VS_VERSION" != x; then
32340    VS_VERSION=$DEVKIT_VS_VERSION
32341    TOOLCHAIN_VERSION=$VS_VERSION
32342    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32343    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32344    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32345    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32346    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32347    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32348
32349    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32350    # can still be exported as INCLUDE for compiler invocations without
32351    # SYSROOT_CFLAGS
32352    OLDIFS="$IFS"
32353    IFS=";"
32354    for i in $DEVKIT_VS_INCLUDE; do
32355      ipath=$i
32356
32357  unix_path="$ipath"
32358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359    windows_path=`$CYGPATH -m "$unix_path"`
32360    ipath="$windows_path"
32361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32362    windows_path=`cmd //c echo $unix_path`
32363    ipath="$windows_path"
32364  fi
32365
32366      VS_INCLUDE="$VS_INCLUDE;$ipath"
32367    done
32368    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32369    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32370    for i in $DEVKIT_VS_LIB; do
32371      libpath=$i
32372
32373  unix_path="$libpath"
32374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32375    windows_path=`$CYGPATH -m "$unix_path"`
32376    libpath="$windows_path"
32377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32378    windows_path=`cmd //c echo $unix_path`
32379    libpath="$windows_path"
32380  fi
32381
32382      VS_LIB="$VS_LIB;$libpath"
32383    done
32384    IFS="$OLDIFS"
32385
32386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32387$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32388
32389  elif test "x$with_toolchain_version" != x; then
32390    # User override; check that it is valid
32391    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32392      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32393$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32394      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32395$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32396      as_fn_error $? "Cannot continue." "$LINENO" 5
32397    fi
32398    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32399  else
32400    # No flag given, use default
32401    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32402  fi
32403
32404  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32405
32406  VS_VERSION="$VS_VERSION"
32407  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32408  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32409  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32410  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32411
32412  # When using --with-tools-dir, assume it points to the correct and default
32413  # version of Visual Studio or that --with-toolchain-version was also set.
32414  if test "x$with_tools_dir" != x; then
32415
32416  if test "x$VS_ENV_CMD" = x; then
32417    VS_VERSION="${VS_VERSION}"
32418    VS_BASE="$with_tools_dir/../.."
32419    METHOD="--with-tools-dir"
32420
32421    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32422      VCVARSFILE="vc/bin/vcvars32.bat"
32423    else
32424      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32425    fi
32426
32427
32428  windows_path="$VS_BASE"
32429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32430    unix_path=`$CYGPATH -u "$windows_path"`
32431    VS_BASE="$unix_path"
32432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32434    VS_BASE="$unix_path"
32435  fi
32436
32437    if test -d "$VS_BASE"; then
32438      if test -f "$VS_BASE/$VCVARSFILE"; then
32439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32440$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32441        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32442        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32443        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32444        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32445      else
32446        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32447$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32448        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32449$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32450      fi
32451    fi
32452  fi
32453
32454
32455  if test "x$VS_ENV_CMD" = x; then
32456    VS_VERSION="${VS_VERSION}"
32457    VS_BASE="$with_tools_dir/../../.."
32458    METHOD="--with-tools-dir"
32459
32460    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32461      VCVARSFILE="vc/bin/vcvars32.bat"
32462    else
32463      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32464    fi
32465
32466
32467  windows_path="$VS_BASE"
32468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32469    unix_path=`$CYGPATH -u "$windows_path"`
32470    VS_BASE="$unix_path"
32471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32473    VS_BASE="$unix_path"
32474  fi
32475
32476    if test -d "$VS_BASE"; then
32477      if test -f "$VS_BASE/$VCVARSFILE"; then
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32479$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32480        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32481        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32482        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32483        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32484      else
32485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32486$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32487        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32488$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32489      fi
32490    fi
32491  fi
32492
32493    if test "x$VS_ENV_CMD" = x; then
32494      # Having specified an argument which is incorrect will produce an instant failure;
32495      # we should not go on looking
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32497$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32498      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32499$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32500      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32501$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32502      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32503    fi
32504  fi
32505
32506  VS_ENV_CMD=""
32507  VS_ENV_ARGS=""
32508
32509  if test "x$VS_COMNTOOLS" != x; then
32510
32511  if test "x$VS_ENV_CMD" = x; then
32512    VS_VERSION="${VS_VERSION}"
32513    VS_BASE="$VS_COMNTOOLS/../.."
32514    METHOD="$VS_COMNTOOLS_VAR variable"
32515
32516    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32517      VCVARSFILE="vc/bin/vcvars32.bat"
32518    else
32519      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32520    fi
32521
32522
32523  windows_path="$VS_BASE"
32524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32525    unix_path=`$CYGPATH -u "$windows_path"`
32526    VS_BASE="$unix_path"
32527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32529    VS_BASE="$unix_path"
32530  fi
32531
32532    if test -d "$VS_BASE"; then
32533      if test -f "$VS_BASE/$VCVARSFILE"; then
32534        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32535$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32536        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32537        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32538        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32539        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32540      else
32541        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32542$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32543        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32544$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32545      fi
32546    fi
32547  fi
32548
32549  fi
32550  if test "x$PROGRAMFILES" != x; then
32551
32552  if test "x$VS_ENV_CMD" = x; then
32553    VS_VERSION="${VS_VERSION}"
32554    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32555    METHOD="well-known name"
32556
32557    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32558      VCVARSFILE="vc/bin/vcvars32.bat"
32559    else
32560      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32561    fi
32562
32563
32564  windows_path="$VS_BASE"
32565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32566    unix_path=`$CYGPATH -u "$windows_path"`
32567    VS_BASE="$unix_path"
32568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32570    VS_BASE="$unix_path"
32571  fi
32572
32573    if test -d "$VS_BASE"; then
32574      if test -f "$VS_BASE/$VCVARSFILE"; then
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32576$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32577        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32578        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32579        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32580        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32581      else
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32583$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32585$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32586      fi
32587    fi
32588  fi
32589
32590  fi
32591  # Work around the insanely named ProgramFiles(x86) env variable
32592  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32593  if test "x$PROGRAMFILES_X86" != x; then
32594
32595  if test "x$VS_ENV_CMD" = x; then
32596    VS_VERSION="${VS_VERSION}"
32597    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32598    METHOD="well-known name"
32599
32600    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32601      VCVARSFILE="vc/bin/vcvars32.bat"
32602    else
32603      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32604    fi
32605
32606
32607  windows_path="$VS_BASE"
32608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32609    unix_path=`$CYGPATH -u "$windows_path"`
32610    VS_BASE="$unix_path"
32611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32613    VS_BASE="$unix_path"
32614  fi
32615
32616    if test -d "$VS_BASE"; then
32617      if test -f "$VS_BASE/$VCVARSFILE"; then
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32619$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32620        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32621        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32622        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32623        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32624      else
32625        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32626$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32627        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32628$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32629      fi
32630    fi
32631  fi
32632
32633  fi
32634
32635  if test "x$VS_ENV_CMD" = x; then
32636    VS_VERSION="${VS_VERSION}"
32637    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32638    METHOD="well-known name"
32639
32640    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32641      VCVARSFILE="vc/bin/vcvars32.bat"
32642    else
32643      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32644    fi
32645
32646
32647  windows_path="$VS_BASE"
32648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32649    unix_path=`$CYGPATH -u "$windows_path"`
32650    VS_BASE="$unix_path"
32651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32653    VS_BASE="$unix_path"
32654  fi
32655
32656    if test -d "$VS_BASE"; then
32657      if test -f "$VS_BASE/$VCVARSFILE"; then
32658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32659$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32660        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32661        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32662        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32663        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32664      else
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32666$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32668$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32669      fi
32670    fi
32671  fi
32672
32673
32674  if test "x$VS_ENV_CMD" = x; then
32675    VS_VERSION="${VS_VERSION}"
32676    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32677    METHOD="well-known name"
32678
32679    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32680      VCVARSFILE="vc/bin/vcvars32.bat"
32681    else
32682      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32683    fi
32684
32685
32686  windows_path="$VS_BASE"
32687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32688    unix_path=`$CYGPATH -u "$windows_path"`
32689    VS_BASE="$unix_path"
32690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32692    VS_BASE="$unix_path"
32693  fi
32694
32695    if test -d "$VS_BASE"; then
32696      if test -f "$VS_BASE/$VCVARSFILE"; then
32697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32698$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32699        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32700        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32701        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32702        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32703      else
32704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32705$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32706        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32707$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32708      fi
32709    fi
32710  fi
32711
32712
32713  if test "x$SDK_INSTALL_DIR" != x; then
32714    if test "x$ProgramW6432" != x; then
32715
32716  if test "x$VS_ENV_CMD" = x; then
32717    VS_VERSION="${VS_VERSION}"
32718    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32719    METHOD="well-known name"
32720
32721  windows_path="$WIN_SDK_BASE"
32722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32723    unix_path=`$CYGPATH -u "$windows_path"`
32724    WIN_SDK_BASE="$unix_path"
32725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32727    WIN_SDK_BASE="$unix_path"
32728  fi
32729
32730    if test -d "$WIN_SDK_BASE"; then
32731      # There have been cases of partial or broken SDK installations. A missing
32732      # lib dir is not going to work.
32733      if test ! -d "$WIN_SDK_BASE/lib"; then
32734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32735$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32737$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32738      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32740$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32741        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32742        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32743          VS_ENV_ARGS="/x86"
32744        else
32745          VS_ENV_ARGS="/x64"
32746        fi
32747        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32748        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32749        # TODO: improve detection for other versions of SDK
32750        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32751      else
32752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32753$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32754        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32755$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32756      fi
32757    fi
32758  fi
32759
32760    fi
32761    if test "x$PROGRAMW6432" != x; then
32762
32763  if test "x$VS_ENV_CMD" = x; then
32764    VS_VERSION="${VS_VERSION}"
32765    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32766    METHOD="well-known name"
32767
32768  windows_path="$WIN_SDK_BASE"
32769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32770    unix_path=`$CYGPATH -u "$windows_path"`
32771    WIN_SDK_BASE="$unix_path"
32772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32774    WIN_SDK_BASE="$unix_path"
32775  fi
32776
32777    if test -d "$WIN_SDK_BASE"; then
32778      # There have been cases of partial or broken SDK installations. A missing
32779      # lib dir is not going to work.
32780      if test ! -d "$WIN_SDK_BASE/lib"; then
32781        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32782$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32784$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32785      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32786        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32787$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32788        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32789        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32790          VS_ENV_ARGS="/x86"
32791        else
32792          VS_ENV_ARGS="/x64"
32793        fi
32794        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32795        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32796        # TODO: improve detection for other versions of SDK
32797        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32798      else
32799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32800$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32802$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32803      fi
32804    fi
32805  fi
32806
32807    fi
32808    if test "x$PROGRAMFILES" != x; then
32809
32810  if test "x$VS_ENV_CMD" = x; then
32811    VS_VERSION="${VS_VERSION}"
32812    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32813    METHOD="well-known name"
32814
32815  windows_path="$WIN_SDK_BASE"
32816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32817    unix_path=`$CYGPATH -u "$windows_path"`
32818    WIN_SDK_BASE="$unix_path"
32819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32821    WIN_SDK_BASE="$unix_path"
32822  fi
32823
32824    if test -d "$WIN_SDK_BASE"; then
32825      # There have been cases of partial or broken SDK installations. A missing
32826      # lib dir is not going to work.
32827      if test ! -d "$WIN_SDK_BASE/lib"; then
32828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32829$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32831$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32832      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32833        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32834$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32835        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32836        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32837          VS_ENV_ARGS="/x86"
32838        else
32839          VS_ENV_ARGS="/x64"
32840        fi
32841        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32842        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32843        # TODO: improve detection for other versions of SDK
32844        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32845      else
32846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32847$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32848        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32849$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32850      fi
32851    fi
32852  fi
32853
32854    fi
32855
32856  if test "x$VS_ENV_CMD" = x; then
32857    VS_VERSION="${VS_VERSION}"
32858    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32859    METHOD="well-known name"
32860
32861  windows_path="$WIN_SDK_BASE"
32862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863    unix_path=`$CYGPATH -u "$windows_path"`
32864    WIN_SDK_BASE="$unix_path"
32865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867    WIN_SDK_BASE="$unix_path"
32868  fi
32869
32870    if test -d "$WIN_SDK_BASE"; then
32871      # There have been cases of partial or broken SDK installations. A missing
32872      # lib dir is not going to work.
32873      if test ! -d "$WIN_SDK_BASE/lib"; then
32874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32875$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32876        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32877$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32878      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32879        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32880$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32881        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32882        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32883          VS_ENV_ARGS="/x86"
32884        else
32885          VS_ENV_ARGS="/x64"
32886        fi
32887        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32888        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32889        # TODO: improve detection for other versions of SDK
32890        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32891      else
32892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32895$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32896      fi
32897    fi
32898  fi
32899
32900
32901  if test "x$VS_ENV_CMD" = x; then
32902    VS_VERSION="${VS_VERSION}"
32903    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32904    METHOD="well-known name"
32905
32906  windows_path="$WIN_SDK_BASE"
32907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32908    unix_path=`$CYGPATH -u "$windows_path"`
32909    WIN_SDK_BASE="$unix_path"
32910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32912    WIN_SDK_BASE="$unix_path"
32913  fi
32914
32915    if test -d "$WIN_SDK_BASE"; then
32916      # There have been cases of partial or broken SDK installations. A missing
32917      # lib dir is not going to work.
32918      if test ! -d "$WIN_SDK_BASE/lib"; then
32919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32920$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32922$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32923      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32925$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32926        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32927        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32928          VS_ENV_ARGS="/x86"
32929        else
32930          VS_ENV_ARGS="/x64"
32931        fi
32932        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32933        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32934        # TODO: improve detection for other versions of SDK
32935        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32936      else
32937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32938$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32939        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32940$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32941      fi
32942    fi
32943  fi
32944
32945  fi
32946
32947    if test "x$VS_ENV_CMD" != x; then
32948      TOOLCHAIN_VERSION=$VS_VERSION
32949      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32950      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32951      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32952      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32953      # The rest of the variables are already evaled while probing
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32955$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32956      break
32957    fi
32958  done
32959
32960
32961  # If we have a devkit, skip all of the below.
32962  if test "x$DEVKIT_VS_VERSION" = x; then
32963    if test "x$VS_ENV_CMD" != x; then
32964      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32965
32966  # Only process if variable expands to non-empty
32967
32968  if test "x$VS_ENV_CMD" != x; then
32969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32970
32971  # First separate the path from the arguments. This will split at the first
32972  # space.
32973  complete="$VS_ENV_CMD"
32974  path="${complete%% *}"
32975  tmp="$complete EOL"
32976  arguments="${tmp#* }"
32977
32978  # Input might be given as Windows format, start by converting to
32979  # unix format.
32980  new_path=`$CYGPATH -u "$path"`
32981
32982  # Now try to locate executable using which
32983  new_path=`$WHICH "$new_path" 2> /dev/null`
32984  # bat and cmd files are not always considered executable in cygwin causing which
32985  # to not find them
32986  if test "x$new_path" = x \
32987      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32988      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32989    new_path=`$CYGPATH -u "$path"`
32990  fi
32991  if test "x$new_path" = x; then
32992    # Oops. Which didn't find the executable.
32993    # The splitting of arguments from the executable at a space might have been incorrect,
32994    # since paths with space are more likely in Windows. Give it another try with the whole
32995    # argument.
32996    path="$complete"
32997    arguments="EOL"
32998    new_path=`$CYGPATH -u "$path"`
32999    new_path=`$WHICH "$new_path" 2> /dev/null`
33000    # bat and cmd files are not always considered executable in cygwin causing which
33001    # to not find them
33002    if test "x$new_path" = x \
33003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33005      new_path=`$CYGPATH -u "$path"`
33006    fi
33007    if test "x$new_path" = x; then
33008      # It's still not found. Now this is an unrecoverable error.
33009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33010$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33011      has_space=`$ECHO "$complete" | $GREP " "`
33012      if test "x$has_space" != x; then
33013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33015      fi
33016      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33017    fi
33018  fi
33019
33020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33023  # "foo.exe" is OK but "foo" is an error.
33024  #
33025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33026  # It is also a way to make sure we got the proper file name for the real test later on.
33027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33028  if test "x$test_shortpath" = x; then
33029    # Short path failed, file does not exist as specified.
33030    # Try adding .exe or .cmd
33031    if test -f "${new_path}.exe"; then
33032      input_to_shortpath="${new_path}.exe"
33033    elif test -f "${new_path}.cmd"; then
33034      input_to_shortpath="${new_path}.cmd"
33035    else
33036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33037$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33040      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33041    fi
33042  else
33043    input_to_shortpath="$new_path"
33044  fi
33045
33046  # Call helper function which possibly converts this using DOS-style short mode.
33047  # If so, the updated path is stored in $new_path.
33048  new_path="$input_to_shortpath"
33049
33050  input_path="$input_to_shortpath"
33051  # Check if we need to convert this using DOS-style short mode. If the path
33052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33053  # take no chances and rewrite it.
33054  # Note: m4 eats our [], so we need to use [ and ] instead.
33055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33056  if test "x$has_forbidden_chars" != x; then
33057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33061      # Going to short mode and back again did indeed matter. Since short mode is
33062      # case insensitive, let's make it lowercase to improve readability.
33063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33064      # Now convert it back to Unix-style (cygpath)
33065      input_path=`$CYGPATH -u "$shortmode_path"`
33066      new_path="$input_path"
33067    fi
33068  fi
33069
33070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33071  if test "x$test_cygdrive_prefix" = x; then
33072    # As a simple fix, exclude /usr/bin since it's not a real path.
33073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33075      # a path prefixed by /cygdrive for fixpath to work.
33076      new_path="$CYGWIN_ROOT_PATH$input_path"
33077    fi
33078  fi
33079
33080  # remove trailing .exe if any
33081  new_path="${new_path/%.exe/}"
33082
33083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33084
33085  # First separate the path from the arguments. This will split at the first
33086  # space.
33087  complete="$VS_ENV_CMD"
33088  path="${complete%% *}"
33089  tmp="$complete EOL"
33090  arguments="${tmp#* }"
33091
33092  # Input might be given as Windows format, start by converting to
33093  # unix format.
33094  new_path="$path"
33095
33096  windows_path="$new_path"
33097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33098    unix_path=`$CYGPATH -u "$windows_path"`
33099    new_path="$unix_path"
33100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33102    new_path="$unix_path"
33103  fi
33104
33105
33106  # Now try to locate executable using which
33107  new_path=`$WHICH "$new_path" 2> /dev/null`
33108
33109  if test "x$new_path" = x; then
33110    # Oops. Which didn't find the executable.
33111    # The splitting of arguments from the executable at a space might have been incorrect,
33112    # since paths with space are more likely in Windows. Give it another try with the whole
33113    # argument.
33114    path="$complete"
33115    arguments="EOL"
33116    new_path="$path"
33117
33118  windows_path="$new_path"
33119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33120    unix_path=`$CYGPATH -u "$windows_path"`
33121    new_path="$unix_path"
33122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33124    new_path="$unix_path"
33125  fi
33126
33127
33128    new_path=`$WHICH "$new_path" 2> /dev/null`
33129    # bat and cmd files are not always considered executable in MSYS causing which
33130    # to not find them
33131    if test "x$new_path" = x \
33132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33134      new_path="$path"
33135
33136  windows_path="$new_path"
33137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33138    unix_path=`$CYGPATH -u "$windows_path"`
33139    new_path="$unix_path"
33140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33142    new_path="$unix_path"
33143  fi
33144
33145    fi
33146
33147    if test "x$new_path" = x; then
33148      # It's still not found. Now this is an unrecoverable error.
33149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33150$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33151      has_space=`$ECHO "$complete" | $GREP " "`
33152      if test "x$has_space" != x; then
33153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33155      fi
33156      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33157    fi
33158  fi
33159
33160  # Now new_path has a complete unix path to the binary
33161  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33162    # Keep paths in /bin as-is, but remove trailing .exe if any
33163    new_path="${new_path/%.exe/}"
33164    # Do not save /bin paths to all_fixpath_prefixes!
33165  else
33166    # Not in mixed or Windows style, start by that.
33167    new_path=`cmd //c echo $new_path`
33168
33169  input_path="$new_path"
33170  # Check if we need to convert this using DOS-style short mode. If the path
33171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33172  # take no chances and rewrite it.
33173  # Note: m4 eats our [], so we need to use [ and ] instead.
33174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33175  if test "x$has_forbidden_chars" != x; then
33176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33178  fi
33179
33180    # Output is in $new_path
33181
33182  windows_path="$new_path"
33183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33184    unix_path=`$CYGPATH -u "$windows_path"`
33185    new_path="$unix_path"
33186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33188    new_path="$unix_path"
33189  fi
33190
33191    # remove trailing .exe if any
33192    new_path="${new_path/%.exe/}"
33193
33194    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33195    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33196  fi
33197
33198    else
33199      # We're on a unix platform. Hooray! :)
33200      # First separate the path from the arguments. This will split at the first
33201      # space.
33202      complete="$VS_ENV_CMD"
33203      path="${complete%% *}"
33204      tmp="$complete EOL"
33205      arguments="${tmp#* }"
33206
33207      # Cannot rely on the command "which" here since it doesn't always work.
33208      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33209      if test -z "$is_absolute_path"; then
33210        # Path to executable is not absolute. Find it.
33211        IFS_save="$IFS"
33212        IFS=:
33213        for p in $PATH; do
33214          if test -f "$p/$path" && test -x "$p/$path"; then
33215            new_path="$p/$path"
33216            break
33217          fi
33218        done
33219        IFS="$IFS_save"
33220      else
33221        # This is an absolute path, we can use it without further modifications.
33222        new_path="$path"
33223      fi
33224
33225      if test "x$new_path" = x; then
33226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33227$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33228        has_space=`$ECHO "$complete" | $GREP " "`
33229        if test "x$has_space" != x; then
33230          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33231$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33232        fi
33233        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33234      fi
33235    fi
33236
33237    # Now join together the path and the arguments once again
33238    if test "x$arguments" != xEOL; then
33239      new_complete="$new_path ${arguments% *}"
33240    else
33241      new_complete="$new_path"
33242    fi
33243
33244    if test "x$complete" != "x$new_complete"; then
33245      VS_ENV_CMD="$new_complete"
33246      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33247$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33248    fi
33249  fi
33250
33251
33252      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33253      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33254$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33255
33256      # We need to create a couple of temporary files.
33257      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33258      $MKDIR -p $VS_ENV_TMP_DIR
33259
33260      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33261      # Instead create a shell script which will set the relevant variables when run.
33262      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33263
33264  unix_path="$WINPATH_VS_ENV_CMD"
33265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33266    windows_path=`$CYGPATH -m "$unix_path"`
33267    WINPATH_VS_ENV_CMD="$windows_path"
33268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33269    windows_path=`cmd //c echo $unix_path`
33270    WINPATH_VS_ENV_CMD="$windows_path"
33271  fi
33272
33273      WINPATH_BASH="$BASH"
33274
33275  unix_path="$WINPATH_BASH"
33276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33277    windows_path=`$CYGPATH -m "$unix_path"`
33278    WINPATH_BASH="$windows_path"
33279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33280    windows_path=`cmd //c echo $unix_path`
33281    WINPATH_BASH="$windows_path"
33282  fi
33283
33284
33285      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33286      # script (executable by bash) that will setup the important variables.
33287      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33288      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33289      # This will end up something like:
33290      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33291      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33292      # These will end up something like:
33293      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33294      # The trailing space for everyone except PATH is no typo, but is needed due
33295      # to trailing \ in the Windows paths. These will be stripped later.
33296      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33297          >> $EXTRACT_VC_ENV_BAT_FILE
33298      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33299          >> $EXTRACT_VC_ENV_BAT_FILE
33300      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33301          >> $EXTRACT_VC_ENV_BAT_FILE
33302      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33303          >> $EXTRACT_VC_ENV_BAT_FILE
33304      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33305          >> $EXTRACT_VC_ENV_BAT_FILE
33306      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33307          >> $EXTRACT_VC_ENV_BAT_FILE
33308
33309      # Now execute the newly created bat file.
33310      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33311      # Change directory so we don't need to mess with Windows paths in redirects.
33312      cd $VS_ENV_TMP_DIR
33313      cmd /c extract-vs-env.bat | $CAT
33314      cd $CURDIR
33315
33316      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33317        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33318$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33319        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33320$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33321        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33322$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33323        as_fn_error $? "Cannot continue" "$LINENO" 5
33324      fi
33325
33326      # Now set all paths and other env variables. This will allow the rest of
33327      # the configure script to find and run the compiler in the proper way.
33328      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33329$as_echo "$as_me: Setting extracted environment variables" >&6;}
33330      . $VS_ENV_TMP_DIR/set-vs-env.sh
33331      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33332      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33333    else
33334      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33335      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33336$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33337    fi
33338  fi
33339
33340  # At this point, we should have correct variables in the environment, or we can't continue.
33341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33342$as_echo_n "checking for Visual Studio variables... " >&6; }
33343
33344  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33345      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33346    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33348$as_echo "present but broken" >&6; }
33349      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33350    else
33351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33352$as_echo "ok" >&6; }
33353      # Remove any trailing "\" ";" and " " from the variables.
33354      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33355      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33356      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33357      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33358      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33359      # Remove any paths containing # (typically F#) as that messes up make. This
33360      # is needed if visual studio was installed with F# support.
33361      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33362
33363
33364
33365
33366
33367      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33368      OLDIFS="$IFS"
33369      IFS=";"
33370      for i in $VS_INCLUDE; do
33371        ipath=$i
33372        # Only process non-empty elements
33373        if test "x$ipath" != x; then
33374          IFS="$OLDIFS"
33375          # Check that directory exists before calling fixup_path
33376          testpath=$ipath
33377
33378  windows_path="$testpath"
33379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33380    unix_path=`$CYGPATH -u "$windows_path"`
33381    testpath="$unix_path"
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33384    testpath="$unix_path"
33385  fi
33386
33387          if test -d "$testpath"; then
33388
33389  # Only process if variable expands to non-empty
33390
33391  if test "x$ipath" != x; then
33392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33393
33394  # Input might be given as Windows format, start by converting to
33395  # unix format.
33396  path="$ipath"
33397  new_path=`$CYGPATH -u "$path"`
33398
33399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33402  # "foo.exe" is OK but "foo" is an error.
33403  #
33404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33405  # It is also a way to make sure we got the proper file name for the real test later on.
33406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33407  if test "x$test_shortpath" = x; then
33408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33409$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33410    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33411  fi
33412
33413  # Call helper function which possibly converts this using DOS-style short mode.
33414  # If so, the updated path is stored in $new_path.
33415
33416  input_path="$new_path"
33417  # Check if we need to convert this using DOS-style short mode. If the path
33418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33419  # take no chances and rewrite it.
33420  # Note: m4 eats our [], so we need to use [ and ] instead.
33421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33422  if test "x$has_forbidden_chars" != x; then
33423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33427      # Going to short mode and back again did indeed matter. Since short mode is
33428      # case insensitive, let's make it lowercase to improve readability.
33429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33430      # Now convert it back to Unix-style (cygpath)
33431      input_path=`$CYGPATH -u "$shortmode_path"`
33432      new_path="$input_path"
33433    fi
33434  fi
33435
33436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33437  if test "x$test_cygdrive_prefix" = x; then
33438    # As a simple fix, exclude /usr/bin since it's not a real path.
33439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33441      # a path prefixed by /cygdrive for fixpath to work.
33442      new_path="$CYGWIN_ROOT_PATH$input_path"
33443    fi
33444  fi
33445
33446
33447  if test "x$path" != "x$new_path"; then
33448    ipath="$new_path"
33449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33450$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33451  fi
33452
33453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33454
33455  path="$ipath"
33456  has_colon=`$ECHO $path | $GREP ^.:`
33457  new_path="$path"
33458  if test "x$has_colon" = x; then
33459    # Not in mixed or Windows style, start by that.
33460    new_path=`cmd //c echo $path`
33461  fi
33462
33463
33464  input_path="$new_path"
33465  # Check if we need to convert this using DOS-style short mode. If the path
33466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33467  # take no chances and rewrite it.
33468  # Note: m4 eats our [], so we need to use [ and ] instead.
33469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33470  if test "x$has_forbidden_chars" != x; then
33471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33473  fi
33474
33475
33476  windows_path="$new_path"
33477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33478    unix_path=`$CYGPATH -u "$windows_path"`
33479    new_path="$unix_path"
33480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33482    new_path="$unix_path"
33483  fi
33484
33485  if test "x$path" != "x$new_path"; then
33486    ipath="$new_path"
33487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33488$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33489  fi
33490
33491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33493
33494    else
33495      # We're on a unix platform. Hooray! :)
33496      path="$ipath"
33497      has_space=`$ECHO "$path" | $GREP " "`
33498      if test "x$has_space" != x; then
33499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33500$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33502      fi
33503
33504      # Use eval to expand a potential ~
33505      eval path="$path"
33506      if test ! -f "$path" && test ! -d "$path"; then
33507        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33508      fi
33509
33510      if test -d "$path"; then
33511        ipath="`cd "$path"; $THEPWDCMD -L`"
33512      else
33513        dir="`$DIRNAME "$path"`"
33514        base="`$BASENAME "$path"`"
33515        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33516      fi
33517    fi
33518  fi
33519
33520            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33521          fi
33522          IFS=";"
33523        fi
33524      done
33525      # Convert VS_LIB into SYSROOT_LDFLAGS
33526      for i in $VS_LIB; do
33527        libpath=$i
33528        # Only process non-empty elements
33529        if test "x$libpath" != x; then
33530          IFS="$OLDIFS"
33531          # Check that directory exists before calling fixup_path
33532          testpath=$libpath
33533
33534  windows_path="$testpath"
33535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33536    unix_path=`$CYGPATH -u "$windows_path"`
33537    testpath="$unix_path"
33538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33540    testpath="$unix_path"
33541  fi
33542
33543          if test -d "$testpath"; then
33544
33545  # Only process if variable expands to non-empty
33546
33547  if test "x$libpath" != x; then
33548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33549
33550  # Input might be given as Windows format, start by converting to
33551  # unix format.
33552  path="$libpath"
33553  new_path=`$CYGPATH -u "$path"`
33554
33555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33558  # "foo.exe" is OK but "foo" is an error.
33559  #
33560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33561  # It is also a way to make sure we got the proper file name for the real test later on.
33562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33563  if test "x$test_shortpath" = x; then
33564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33565$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33566    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33567  fi
33568
33569  # Call helper function which possibly converts this using DOS-style short mode.
33570  # If so, the updated path is stored in $new_path.
33571
33572  input_path="$new_path"
33573  # Check if we need to convert this using DOS-style short mode. If the path
33574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33575  # take no chances and rewrite it.
33576  # Note: m4 eats our [], so we need to use [ and ] instead.
33577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33578  if test "x$has_forbidden_chars" != x; then
33579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33583      # Going to short mode and back again did indeed matter. Since short mode is
33584      # case insensitive, let's make it lowercase to improve readability.
33585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33586      # Now convert it back to Unix-style (cygpath)
33587      input_path=`$CYGPATH -u "$shortmode_path"`
33588      new_path="$input_path"
33589    fi
33590  fi
33591
33592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33593  if test "x$test_cygdrive_prefix" = x; then
33594    # As a simple fix, exclude /usr/bin since it's not a real path.
33595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33597      # a path prefixed by /cygdrive for fixpath to work.
33598      new_path="$CYGWIN_ROOT_PATH$input_path"
33599    fi
33600  fi
33601
33602
33603  if test "x$path" != "x$new_path"; then
33604    libpath="$new_path"
33605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33606$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33607  fi
33608
33609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33610
33611  path="$libpath"
33612  has_colon=`$ECHO $path | $GREP ^.:`
33613  new_path="$path"
33614  if test "x$has_colon" = x; then
33615    # Not in mixed or Windows style, start by that.
33616    new_path=`cmd //c echo $path`
33617  fi
33618
33619
33620  input_path="$new_path"
33621  # Check if we need to convert this using DOS-style short mode. If the path
33622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33623  # take no chances and rewrite it.
33624  # Note: m4 eats our [], so we need to use [ and ] instead.
33625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33626  if test "x$has_forbidden_chars" != x; then
33627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33629  fi
33630
33631
33632  windows_path="$new_path"
33633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33634    unix_path=`$CYGPATH -u "$windows_path"`
33635    new_path="$unix_path"
33636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33638    new_path="$unix_path"
33639  fi
33640
33641  if test "x$path" != "x$new_path"; then
33642    libpath="$new_path"
33643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33644$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33645  fi
33646
33647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33649
33650    else
33651      # We're on a unix platform. Hooray! :)
33652      path="$libpath"
33653      has_space=`$ECHO "$path" | $GREP " "`
33654      if test "x$has_space" != x; then
33655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33656$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33658      fi
33659
33660      # Use eval to expand a potential ~
33661      eval path="$path"
33662      if test ! -f "$path" && test ! -d "$path"; then
33663        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33664      fi
33665
33666      if test -d "$path"; then
33667        libpath="`cd "$path"; $THEPWDCMD -L`"
33668      else
33669        dir="`$DIRNAME "$path"`"
33670        base="`$BASENAME "$path"`"
33671        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33672      fi
33673    fi
33674  fi
33675
33676            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33677          fi
33678          IFS=";"
33679        fi
33680      done
33681      IFS="$OLDIFS"
33682    fi
33683  else
33684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33685$as_echo "not found" >&6; }
33686
33687    if test "x$VS_ENV_CMD" = x; then
33688      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33689$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33691$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33692    else
33693      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33694$as_echo "$as_me: Running the extraction script failed." >&6;}
33695    fi
33696    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33697$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33698    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33699$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33700    as_fn_error $? "Cannot continue" "$LINENO" 5
33701  fi
33702
33703    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33704    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33705    PATH="$VS_PATH"
33706    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33707    export INCLUDE="$VS_INCLUDE"
33708    export LIB="$VS_LIB"
33709  else
33710    if test "x$XCODE_VERSION_OUTPUT" != x; then
33711      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33712      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33713      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33714    else
33715      # Currently we do not define this for other toolchains. This might change as the need arise.
33716      TOOLCHAIN_VERSION=
33717    fi
33718  fi
33719
33720
33721  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33722  # override all other locations.
33723  if test "x$TOOLCHAIN_PATH" != x; then
33724    PATH=$TOOLCHAIN_PATH:$PATH
33725  fi
33726
33727
33728  #
33729  # Setup the compilers (CC and CXX)
33730  #
33731
33732  COMPILER_NAME=C
33733  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33734
33735  if test "x$CC" != x; then
33736    # User has supplied compiler name already, always let that override.
33737    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33738$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33739    if test "x`basename $CC`" = "x$CC"; then
33740      # A command without a complete path is provided, search $PATH.
33741
33742      for ac_prog in $CC
33743do
33744  # Extract the first word of "$ac_prog", so it can be a program name with args.
33745set dummy $ac_prog; ac_word=$2
33746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747$as_echo_n "checking for $ac_word... " >&6; }
33748if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33749  $as_echo_n "(cached) " >&6
33750else
33751  case $POTENTIAL_CC in
33752  [\\/]* | ?:[\\/]*)
33753  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33754  ;;
33755  *)
33756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33757for as_dir in $PATH
33758do
33759  IFS=$as_save_IFS
33760  test -z "$as_dir" && as_dir=.
33761    for ac_exec_ext in '' $ac_executable_extensions; do
33762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33763    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33765    break 2
33766  fi
33767done
33768  done
33769IFS=$as_save_IFS
33770
33771  ;;
33772esac
33773fi
33774POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33775if test -n "$POTENTIAL_CC"; then
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33777$as_echo "$POTENTIAL_CC" >&6; }
33778else
33779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33780$as_echo "no" >&6; }
33781fi
33782
33783
33784  test -n "$POTENTIAL_CC" && break
33785done
33786
33787      if test "x$POTENTIAL_CC" != x; then
33788        CC=$POTENTIAL_CC
33789      else
33790        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33791      fi
33792    else
33793      # Otherwise it might already be a complete path
33794      if test ! -x "$CC"; then
33795        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33796      fi
33797    fi
33798  else
33799    # No user supplied value. Locate compiler ourselves.
33800
33801    # If we are cross compiling, assume cross compilation tools follows the
33802    # cross compilation standard where they are prefixed with the autoconf
33803    # standard name for the target. For example the binary
33804    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33805    # If we are not cross compiling, then the default compiler name will be
33806    # used.
33807
33808    CC=
33809    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33810    # before checking the rest of the PATH.
33811    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33812    # step, this should not be necessary.
33813    if test -n "$TOOLCHAIN_PATH"; then
33814      PATH_save="$PATH"
33815      PATH="$TOOLCHAIN_PATH"
33816      if test -n "$ac_tool_prefix"; then
33817  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33818set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33820$as_echo_n "checking for $ac_word... " >&6; }
33821if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33822  $as_echo_n "(cached) " >&6
33823else
33824  case $TOOLCHAIN_PATH_CC in
33825  [\\/]* | ?:[\\/]*)
33826  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33827  ;;
33828  *)
33829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33830for as_dir in $PATH
33831do
33832  IFS=$as_save_IFS
33833  test -z "$as_dir" && as_dir=.
33834    for ac_exec_ext in '' $ac_executable_extensions; do
33835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33836    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33838    break 2
33839  fi
33840done
33841  done
33842IFS=$as_save_IFS
33843
33844  ;;
33845esac
33846fi
33847TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33848if test -n "$TOOLCHAIN_PATH_CC"; then
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33850$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33851else
33852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33853$as_echo "no" >&6; }
33854fi
33855
33856
33857fi
33858if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33859  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33860  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33861set dummy $SEARCH_LIST; ac_word=$2
33862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33863$as_echo_n "checking for $ac_word... " >&6; }
33864if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33865  $as_echo_n "(cached) " >&6
33866else
33867  case $ac_pt_TOOLCHAIN_PATH_CC in
33868  [\\/]* | ?:[\\/]*)
33869  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33870  ;;
33871  *)
33872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33873for as_dir in $PATH
33874do
33875  IFS=$as_save_IFS
33876  test -z "$as_dir" && as_dir=.
33877    for ac_exec_ext in '' $ac_executable_extensions; do
33878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33879    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33881    break 2
33882  fi
33883done
33884  done
33885IFS=$as_save_IFS
33886
33887  ;;
33888esac
33889fi
33890ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33891if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33893$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33894else
33895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33896$as_echo "no" >&6; }
33897fi
33898
33899  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33900    TOOLCHAIN_PATH_CC=""
33901  else
33902    case $cross_compiling:$ac_tool_warned in
33903yes:)
33904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33906ac_tool_warned=yes ;;
33907esac
33908    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33909  fi
33910else
33911  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33912fi
33913
33914      CC=$TOOLCHAIN_PATH_CC
33915      PATH="$PATH_save"
33916    fi
33917
33918    # AC_PATH_TOOL can't be run multiple times with the same variable,
33919    # so create a new name for this run.
33920    if test "x$CC" = x; then
33921      if test -n "$ac_tool_prefix"; then
33922  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33923set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33925$as_echo_n "checking for $ac_word... " >&6; }
33926if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33927  $as_echo_n "(cached) " >&6
33928else
33929  case $POTENTIAL_CC in
33930  [\\/]* | ?:[\\/]*)
33931  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33932  ;;
33933  *)
33934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33935for as_dir in $PATH
33936do
33937  IFS=$as_save_IFS
33938  test -z "$as_dir" && as_dir=.
33939    for ac_exec_ext in '' $ac_executable_extensions; do
33940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33941    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33943    break 2
33944  fi
33945done
33946  done
33947IFS=$as_save_IFS
33948
33949  ;;
33950esac
33951fi
33952POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33953if test -n "$POTENTIAL_CC"; then
33954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33955$as_echo "$POTENTIAL_CC" >&6; }
33956else
33957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33958$as_echo "no" >&6; }
33959fi
33960
33961
33962fi
33963if test -z "$ac_cv_path_POTENTIAL_CC"; then
33964  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33965  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33966set dummy $SEARCH_LIST; ac_word=$2
33967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33968$as_echo_n "checking for $ac_word... " >&6; }
33969if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33970  $as_echo_n "(cached) " >&6
33971else
33972  case $ac_pt_POTENTIAL_CC in
33973  [\\/]* | ?:[\\/]*)
33974  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33975  ;;
33976  *)
33977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33978for as_dir in $PATH
33979do
33980  IFS=$as_save_IFS
33981  test -z "$as_dir" && as_dir=.
33982    for ac_exec_ext in '' $ac_executable_extensions; do
33983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33984    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33986    break 2
33987  fi
33988done
33989  done
33990IFS=$as_save_IFS
33991
33992  ;;
33993esac
33994fi
33995ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33996if test -n "$ac_pt_POTENTIAL_CC"; then
33997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33998$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33999else
34000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34001$as_echo "no" >&6; }
34002fi
34003
34004  if test "x$ac_pt_POTENTIAL_CC" = x; then
34005    POTENTIAL_CC=""
34006  else
34007    case $cross_compiling:$ac_tool_warned in
34008yes:)
34009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34011ac_tool_warned=yes ;;
34012esac
34013    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34014  fi
34015else
34016  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34017fi
34018
34019      CC=$POTENTIAL_CC
34020    fi
34021
34022    if test "x$CC" = x; then
34023
34024  # Print a helpful message on how to acquire the necessary build dependency.
34025  # devkit is the help tag: freetype, cups, alsa etc
34026  MISSING_DEPENDENCY=devkit
34027
34028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34029    cygwin_help $MISSING_DEPENDENCY
34030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34031    msys_help $MISSING_DEPENDENCY
34032  else
34033    PKGHANDLER_COMMAND=
34034
34035    case $PKGHANDLER in
34036      apt-get)
34037        apt_help     $MISSING_DEPENDENCY ;;
34038      yum)
34039        yum_help     $MISSING_DEPENDENCY ;;
34040      brew)
34041        brew_help    $MISSING_DEPENDENCY ;;
34042      port)
34043        port_help    $MISSING_DEPENDENCY ;;
34044      pkgutil)
34045        pkgutil_help $MISSING_DEPENDENCY ;;
34046      pkgadd)
34047        pkgadd_help  $MISSING_DEPENDENCY ;;
34048    esac
34049
34050    if test "x$PKGHANDLER_COMMAND" != x; then
34051      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34052    fi
34053  fi
34054
34055      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34056    fi
34057  fi
34058
34059  # Now we have a compiler binary in CC. Make sure it's okay.
34060
34061  # Only process if variable expands to non-empty
34062
34063  if test "x$CC" != x; then
34064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34065
34066  # First separate the path from the arguments. This will split at the first
34067  # space.
34068  complete="$CC"
34069  path="${complete%% *}"
34070  tmp="$complete EOL"
34071  arguments="${tmp#* }"
34072
34073  # Input might be given as Windows format, start by converting to
34074  # unix format.
34075  new_path=`$CYGPATH -u "$path"`
34076
34077  # Now try to locate executable using which
34078  new_path=`$WHICH "$new_path" 2> /dev/null`
34079  # bat and cmd files are not always considered executable in cygwin causing which
34080  # to not find them
34081  if test "x$new_path" = x \
34082      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34083      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34084    new_path=`$CYGPATH -u "$path"`
34085  fi
34086  if test "x$new_path" = x; then
34087    # Oops. Which didn't find the executable.
34088    # The splitting of arguments from the executable at a space might have been incorrect,
34089    # since paths with space are more likely in Windows. Give it another try with the whole
34090    # argument.
34091    path="$complete"
34092    arguments="EOL"
34093    new_path=`$CYGPATH -u "$path"`
34094    new_path=`$WHICH "$new_path" 2> /dev/null`
34095    # bat and cmd files are not always considered executable in cygwin causing which
34096    # to not find them
34097    if test "x$new_path" = x \
34098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34100      new_path=`$CYGPATH -u "$path"`
34101    fi
34102    if test "x$new_path" = x; then
34103      # It's still not found. Now this is an unrecoverable error.
34104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34105$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34106      has_space=`$ECHO "$complete" | $GREP " "`
34107      if test "x$has_space" != x; then
34108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34110      fi
34111      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34112    fi
34113  fi
34114
34115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34118  # "foo.exe" is OK but "foo" is an error.
34119  #
34120  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34121  # It is also a way to make sure we got the proper file name for the real test later on.
34122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34123  if test "x$test_shortpath" = x; then
34124    # Short path failed, file does not exist as specified.
34125    # Try adding .exe or .cmd
34126    if test -f "${new_path}.exe"; then
34127      input_to_shortpath="${new_path}.exe"
34128    elif test -f "${new_path}.cmd"; then
34129      input_to_shortpath="${new_path}.cmd"
34130    else
34131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34132$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34133      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34134$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34135      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34136    fi
34137  else
34138    input_to_shortpath="$new_path"
34139  fi
34140
34141  # Call helper function which possibly converts this using DOS-style short mode.
34142  # If so, the updated path is stored in $new_path.
34143  new_path="$input_to_shortpath"
34144
34145  input_path="$input_to_shortpath"
34146  # Check if we need to convert this using DOS-style short mode. If the path
34147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34148  # take no chances and rewrite it.
34149  # Note: m4 eats our [], so we need to use [ and ] instead.
34150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34151  if test "x$has_forbidden_chars" != x; then
34152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34156      # Going to short mode and back again did indeed matter. Since short mode is
34157      # case insensitive, let's make it lowercase to improve readability.
34158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34159      # Now convert it back to Unix-style (cygpath)
34160      input_path=`$CYGPATH -u "$shortmode_path"`
34161      new_path="$input_path"
34162    fi
34163  fi
34164
34165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34166  if test "x$test_cygdrive_prefix" = x; then
34167    # As a simple fix, exclude /usr/bin since it's not a real path.
34168    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34170      # a path prefixed by /cygdrive for fixpath to work.
34171      new_path="$CYGWIN_ROOT_PATH$input_path"
34172    fi
34173  fi
34174
34175  # remove trailing .exe if any
34176  new_path="${new_path/%.exe/}"
34177
34178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34179
34180  # First separate the path from the arguments. This will split at the first
34181  # space.
34182  complete="$CC"
34183  path="${complete%% *}"
34184  tmp="$complete EOL"
34185  arguments="${tmp#* }"
34186
34187  # Input might be given as Windows format, start by converting to
34188  # unix format.
34189  new_path="$path"
34190
34191  windows_path="$new_path"
34192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34193    unix_path=`$CYGPATH -u "$windows_path"`
34194    new_path="$unix_path"
34195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34197    new_path="$unix_path"
34198  fi
34199
34200
34201  # Now try to locate executable using which
34202  new_path=`$WHICH "$new_path" 2> /dev/null`
34203
34204  if test "x$new_path" = x; then
34205    # Oops. Which didn't find the executable.
34206    # The splitting of arguments from the executable at a space might have been incorrect,
34207    # since paths with space are more likely in Windows. Give it another try with the whole
34208    # argument.
34209    path="$complete"
34210    arguments="EOL"
34211    new_path="$path"
34212
34213  windows_path="$new_path"
34214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34215    unix_path=`$CYGPATH -u "$windows_path"`
34216    new_path="$unix_path"
34217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34219    new_path="$unix_path"
34220  fi
34221
34222
34223    new_path=`$WHICH "$new_path" 2> /dev/null`
34224    # bat and cmd files are not always considered executable in MSYS causing which
34225    # to not find them
34226    if test "x$new_path" = x \
34227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34229      new_path="$path"
34230
34231  windows_path="$new_path"
34232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34233    unix_path=`$CYGPATH -u "$windows_path"`
34234    new_path="$unix_path"
34235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34237    new_path="$unix_path"
34238  fi
34239
34240    fi
34241
34242    if test "x$new_path" = x; then
34243      # It's still not found. Now this is an unrecoverable error.
34244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34245$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34246      has_space=`$ECHO "$complete" | $GREP " "`
34247      if test "x$has_space" != x; then
34248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34250      fi
34251      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34252    fi
34253  fi
34254
34255  # Now new_path has a complete unix path to the binary
34256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34257    # Keep paths in /bin as-is, but remove trailing .exe if any
34258    new_path="${new_path/%.exe/}"
34259    # Do not save /bin paths to all_fixpath_prefixes!
34260  else
34261    # Not in mixed or Windows style, start by that.
34262    new_path=`cmd //c echo $new_path`
34263
34264  input_path="$new_path"
34265  # Check if we need to convert this using DOS-style short mode. If the path
34266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34267  # take no chances and rewrite it.
34268  # Note: m4 eats our [], so we need to use [ and ] instead.
34269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34270  if test "x$has_forbidden_chars" != x; then
34271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34273  fi
34274
34275    # Output is in $new_path
34276
34277  windows_path="$new_path"
34278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34279    unix_path=`$CYGPATH -u "$windows_path"`
34280    new_path="$unix_path"
34281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34283    new_path="$unix_path"
34284  fi
34285
34286    # remove trailing .exe if any
34287    new_path="${new_path/%.exe/}"
34288
34289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34291  fi
34292
34293    else
34294      # We're on a unix platform. Hooray! :)
34295      # First separate the path from the arguments. This will split at the first
34296      # space.
34297      complete="$CC"
34298      path="${complete%% *}"
34299      tmp="$complete EOL"
34300      arguments="${tmp#* }"
34301
34302      # Cannot rely on the command "which" here since it doesn't always work.
34303      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34304      if test -z "$is_absolute_path"; then
34305        # Path to executable is not absolute. Find it.
34306        IFS_save="$IFS"
34307        IFS=:
34308        for p in $PATH; do
34309          if test -f "$p/$path" && test -x "$p/$path"; then
34310            new_path="$p/$path"
34311            break
34312          fi
34313        done
34314        IFS="$IFS_save"
34315      else
34316        # This is an absolute path, we can use it without further modifications.
34317        new_path="$path"
34318      fi
34319
34320      if test "x$new_path" = x; then
34321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34322$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34323        has_space=`$ECHO "$complete" | $GREP " "`
34324        if test "x$has_space" != x; then
34325          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34327        fi
34328        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34329      fi
34330    fi
34331
34332    # Now join together the path and the arguments once again
34333    if test "x$arguments" != xEOL; then
34334      new_complete="$new_path ${arguments% *}"
34335    else
34336      new_complete="$new_path"
34337    fi
34338
34339    if test "x$complete" != "x$new_complete"; then
34340      CC="$new_complete"
34341      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34342$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34343    fi
34344  fi
34345
34346  TEST_COMPILER="$CC"
34347
34348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34349$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34350  SYMLINK_ORIGINAL="$TEST_COMPILER"
34351
34352  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34353    # Follow a chain of symbolic links. Use readlink
34354    # where it exists, else fall back to horribly
34355    # complicated shell code.
34356    if test "x$READLINK_TESTED" != yes; then
34357      # On MacOSX there is a readlink tool with a different
34358      # purpose than the GNU readlink tool. Check the found readlink.
34359      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34360      if test "x$ISGNU" = x; then
34361        # A readlink that we do not know how to use.
34362        # Are there other non-GNU readlinks out there?
34363        READLINK_TESTED=yes
34364        READLINK=
34365      fi
34366    fi
34367
34368    if test "x$READLINK" != x; then
34369      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34370    else
34371      # Save the current directory for restoring afterwards
34372      STARTDIR=$PWD
34373      COUNTER=0
34374      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34375      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34376      cd $sym_link_dir
34377      # Use -P flag to resolve symlinks in directories.
34378      cd `$THEPWDCMD -P`
34379      sym_link_dir=`$THEPWDCMD -P`
34380      # Resolve file symlinks
34381      while test $COUNTER -lt 20; do
34382        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34383        if test "x$ISLINK" == x; then
34384          # This is not a symbolic link! We are done!
34385          break
34386        fi
34387        # Again resolve directory symlinks since the target of the just found
34388        # link could be in a different directory
34389        cd `$DIRNAME $ISLINK`
34390        sym_link_dir=`$THEPWDCMD -P`
34391        sym_link_file=`$BASENAME $ISLINK`
34392        let COUNTER=COUNTER+1
34393      done
34394      cd $STARTDIR
34395      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34396    fi
34397  fi
34398
34399  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34401$as_echo "no symlink" >&6; }
34402  else
34403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34404$as_echo "$SYMLINK_ORIGINAL" >&6; }
34405
34406    # We can't handle ccache by gcc wrappers, since we need to know if we're
34407    # using ccache. Instead ccache usage must be controlled by a configure option.
34408    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34409    if test "x$COMPILER_BASENAME" = "xccache"; then
34410      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34411$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34412      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34413    fi
34414  fi
34415
34416
34417  COMPILER=$CC
34418  COMPILER_NAME=$COMPILER_NAME
34419
34420  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34421    # cc -V output typically looks like
34422    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34423    # or
34424    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34425    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34426    # Check that this is likely to be the Solaris Studio cc.
34427    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34428    if test $? -ne 0; then
34429      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34430      { $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
34431$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34432      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34433$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34434      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34435$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34436      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34437    fi
34438    # Remove usage instructions (if present), and
34439    # collapse compiler output into a single line
34440    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34441        $SED -e 's/ *[Uu]sage:.*//'`
34442    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34443        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34444  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34445    # xlc -qversion output typically looks like
34446    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34447    #     Version: 11.01.0000.0015
34448    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34449    # Check that this is likely to be the IBM XL C compiler.
34450    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34451    if test $? -ne 0; then
34452      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34453      { $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
34454$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34455      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34456$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34457      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34458$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34459      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34460    fi
34461    # Collapse compiler output into a single line
34462    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34463    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34464        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34465  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34466    # There is no specific version flag, but all output starts with a version string.
34467    # First line typically looks something like:
34468    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34469    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34470    # Check that this is likely to be Microsoft CL.EXE.
34471    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34472    if test $? -ne 0; then
34473      { $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
34474$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34475      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34476$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34477      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34478    fi
34479    # Collapse compiler output into a single line
34480    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34481    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34482        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34483  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34484    # gcc --version output typically looks like
34485    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34486    #     Copyright (C) 2013 Free Software Foundation, Inc.
34487    #     This is free software; see the source for copying conditions.  There is NO
34488    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34489    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34490    # Check that this is likely to be GCC.
34491    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34492    if test $? -ne 0; then
34493      { $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
34494$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34495      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34496$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34497      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34498    fi
34499    # Remove Copyright and legalese from version string, and
34500    # collapse into a single line
34501    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34502        $SED -e 's/ *Copyright .*//'`
34503    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34504        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34505  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34506    # clang --version output typically looks like
34507    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34508    #    clang version 3.3 (tags/RELEASE_33/final)
34509    # or
34510    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34511    #    Target: x86_64-pc-linux-gnu
34512    #    Thread model: posix
34513    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34514    # Check that this is likely to be clang
34515    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34516    if test $? -ne 0; then
34517      { $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
34518$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34519      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34520$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34521      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34522    fi
34523    # Collapse compiler output into a single line
34524    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34525    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34526        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34527  else
34528      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34529  fi
34530  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34531  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34532  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34533  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34534
34535  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34536$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34537
34538
34539  # Now that we have resolved CC ourself, let autoconf have its go at it
34540  ac_ext=c
34541ac_cpp='$CPP $CPPFLAGS'
34542ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34543ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34544ac_compiler_gnu=$ac_cv_c_compiler_gnu
34545if test -n "$ac_tool_prefix"; then
34546  for ac_prog in $CC
34547  do
34548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34551$as_echo_n "checking for $ac_word... " >&6; }
34552if ${ac_cv_prog_CC+:} false; then :
34553  $as_echo_n "(cached) " >&6
34554else
34555  if test -n "$CC"; then
34556  ac_cv_prog_CC="$CC" # Let the user override the test.
34557else
34558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34559for as_dir in $PATH
34560do
34561  IFS=$as_save_IFS
34562  test -z "$as_dir" && as_dir=.
34563    for ac_exec_ext in '' $ac_executable_extensions; do
34564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34565    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34567    break 2
34568  fi
34569done
34570  done
34571IFS=$as_save_IFS
34572
34573fi
34574fi
34575CC=$ac_cv_prog_CC
34576if test -n "$CC"; then
34577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34578$as_echo "$CC" >&6; }
34579else
34580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34581$as_echo "no" >&6; }
34582fi
34583
34584
34585    test -n "$CC" && break
34586  done
34587fi
34588if test -z "$CC"; then
34589  ac_ct_CC=$CC
34590  for ac_prog in $CC
34591do
34592  # Extract the first word of "$ac_prog", so it can be a program name with args.
34593set dummy $ac_prog; ac_word=$2
34594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34595$as_echo_n "checking for $ac_word... " >&6; }
34596if ${ac_cv_prog_ac_ct_CC+:} false; then :
34597  $as_echo_n "(cached) " >&6
34598else
34599  if test -n "$ac_ct_CC"; then
34600  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34601else
34602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34603for as_dir in $PATH
34604do
34605  IFS=$as_save_IFS
34606  test -z "$as_dir" && as_dir=.
34607    for ac_exec_ext in '' $ac_executable_extensions; do
34608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34609    ac_cv_prog_ac_ct_CC="$ac_prog"
34610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34611    break 2
34612  fi
34613done
34614  done
34615IFS=$as_save_IFS
34616
34617fi
34618fi
34619ac_ct_CC=$ac_cv_prog_ac_ct_CC
34620if test -n "$ac_ct_CC"; then
34621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34622$as_echo "$ac_ct_CC" >&6; }
34623else
34624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34625$as_echo "no" >&6; }
34626fi
34627
34628
34629  test -n "$ac_ct_CC" && break
34630done
34631
34632  if test "x$ac_ct_CC" = x; then
34633    CC=""
34634  else
34635    case $cross_compiling:$ac_tool_warned in
34636yes:)
34637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34639ac_tool_warned=yes ;;
34640esac
34641    CC=$ac_ct_CC
34642  fi
34643fi
34644
34645
34646test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34648as_fn_error $? "no acceptable C compiler found in \$PATH
34649See \`config.log' for more details" "$LINENO" 5; }
34650
34651# Provide some information about the compiler.
34652$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34653set X $ac_compile
34654ac_compiler=$2
34655for ac_option in --version -v -V -qversion; do
34656  { { ac_try="$ac_compiler $ac_option >&5"
34657case "(($ac_try" in
34658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34659  *) ac_try_echo=$ac_try;;
34660esac
34661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34662$as_echo "$ac_try_echo"; } >&5
34663  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34664  ac_status=$?
34665  if test -s conftest.err; then
34666    sed '10a\
34667... rest of stderr output deleted ...
34668         10q' conftest.err >conftest.er1
34669    cat conftest.er1 >&5
34670  fi
34671  rm -f conftest.er1 conftest.err
34672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34673  test $ac_status = 0; }
34674done
34675
34676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34677/* end confdefs.h.  */
34678
34679int
34680main ()
34681{
34682
34683  ;
34684  return 0;
34685}
34686_ACEOF
34687ac_clean_files_save=$ac_clean_files
34688ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34689# Try to create an executable without -o first, disregard a.out.
34690# It will help us diagnose broken compilers, and finding out an intuition
34691# of exeext.
34692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34693$as_echo_n "checking whether the C compiler works... " >&6; }
34694ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34695
34696# The possible output files:
34697ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34698
34699ac_rmfiles=
34700for ac_file in $ac_files
34701do
34702  case $ac_file in
34703    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34704    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34705  esac
34706done
34707rm -f $ac_rmfiles
34708
34709if { { ac_try="$ac_link_default"
34710case "(($ac_try" in
34711  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34712  *) ac_try_echo=$ac_try;;
34713esac
34714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34715$as_echo "$ac_try_echo"; } >&5
34716  (eval "$ac_link_default") 2>&5
34717  ac_status=$?
34718  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34719  test $ac_status = 0; }; then :
34720  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34721# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34722# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34723# so that the user can short-circuit this test for compilers unknown to
34724# Autoconf.
34725for ac_file in $ac_files ''
34726do
34727  test -f "$ac_file" || continue
34728  case $ac_file in
34729    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34730	;;
34731    [ab].out )
34732	# We found the default executable, but exeext='' is most
34733	# certainly right.
34734	break;;
34735    *.* )
34736	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34737	then :; else
34738	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34739	fi
34740	# We set ac_cv_exeext here because the later test for it is not
34741	# safe: cross compilers may not add the suffix if given an `-o'
34742	# argument, so we may need to know it at that point already.
34743	# Even if this section looks crufty: it has the advantage of
34744	# actually working.
34745	break;;
34746    * )
34747	break;;
34748  esac
34749done
34750test "$ac_cv_exeext" = no && ac_cv_exeext=
34751
34752else
34753  ac_file=''
34754fi
34755if test -z "$ac_file"; then :
34756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34757$as_echo "no" >&6; }
34758$as_echo "$as_me: failed program was:" >&5
34759sed 's/^/| /' conftest.$ac_ext >&5
34760
34761{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34763as_fn_error 77 "C compiler cannot create executables
34764See \`config.log' for more details" "$LINENO" 5; }
34765else
34766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34767$as_echo "yes" >&6; }
34768fi
34769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34770$as_echo_n "checking for C compiler default output file name... " >&6; }
34771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34772$as_echo "$ac_file" >&6; }
34773ac_exeext=$ac_cv_exeext
34774
34775rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34776ac_clean_files=$ac_clean_files_save
34777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34778$as_echo_n "checking for suffix of executables... " >&6; }
34779if { { ac_try="$ac_link"
34780case "(($ac_try" in
34781  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34782  *) ac_try_echo=$ac_try;;
34783esac
34784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34785$as_echo "$ac_try_echo"; } >&5
34786  (eval "$ac_link") 2>&5
34787  ac_status=$?
34788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34789  test $ac_status = 0; }; then :
34790  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34791# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34792# work properly (i.e., refer to `conftest.exe'), while it won't with
34793# `rm'.
34794for ac_file in conftest.exe conftest conftest.*; do
34795  test -f "$ac_file" || continue
34796  case $ac_file in
34797    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34798    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34799	  break;;
34800    * ) break;;
34801  esac
34802done
34803else
34804  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34806as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34807See \`config.log' for more details" "$LINENO" 5; }
34808fi
34809rm -f conftest conftest$ac_cv_exeext
34810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34811$as_echo "$ac_cv_exeext" >&6; }
34812
34813rm -f conftest.$ac_ext
34814EXEEXT=$ac_cv_exeext
34815ac_exeext=$EXEEXT
34816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34817/* end confdefs.h.  */
34818#include <stdio.h>
34819int
34820main ()
34821{
34822FILE *f = fopen ("conftest.out", "w");
34823 return ferror (f) || fclose (f) != 0;
34824
34825  ;
34826  return 0;
34827}
34828_ACEOF
34829ac_clean_files="$ac_clean_files conftest.out"
34830# Check that the compiler produces executables we can run.  If not, either
34831# the compiler is broken, or we cross compile.
34832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34833$as_echo_n "checking whether we are cross compiling... " >&6; }
34834if test "$cross_compiling" != yes; then
34835  { { ac_try="$ac_link"
34836case "(($ac_try" in
34837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34838  *) ac_try_echo=$ac_try;;
34839esac
34840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34841$as_echo "$ac_try_echo"; } >&5
34842  (eval "$ac_link") 2>&5
34843  ac_status=$?
34844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34845  test $ac_status = 0; }
34846  if { ac_try='./conftest$ac_cv_exeext'
34847  { { case "(($ac_try" in
34848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34849  *) ac_try_echo=$ac_try;;
34850esac
34851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34852$as_echo "$ac_try_echo"; } >&5
34853  (eval "$ac_try") 2>&5
34854  ac_status=$?
34855  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34856  test $ac_status = 0; }; }; then
34857    cross_compiling=no
34858  else
34859    if test "$cross_compiling" = maybe; then
34860	cross_compiling=yes
34861    else
34862	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34864as_fn_error $? "cannot run C compiled programs.
34865If you meant to cross compile, use \`--host'.
34866See \`config.log' for more details" "$LINENO" 5; }
34867    fi
34868  fi
34869fi
34870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34871$as_echo "$cross_compiling" >&6; }
34872
34873rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34874ac_clean_files=$ac_clean_files_save
34875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34876$as_echo_n "checking for suffix of object files... " >&6; }
34877if ${ac_cv_objext+:} false; then :
34878  $as_echo_n "(cached) " >&6
34879else
34880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34881/* end confdefs.h.  */
34882
34883int
34884main ()
34885{
34886
34887  ;
34888  return 0;
34889}
34890_ACEOF
34891rm -f conftest.o conftest.obj
34892if { { ac_try="$ac_compile"
34893case "(($ac_try" in
34894  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34895  *) ac_try_echo=$ac_try;;
34896esac
34897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34898$as_echo "$ac_try_echo"; } >&5
34899  (eval "$ac_compile") 2>&5
34900  ac_status=$?
34901  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34902  test $ac_status = 0; }; then :
34903  for ac_file in conftest.o conftest.obj conftest.*; do
34904  test -f "$ac_file" || continue;
34905  case $ac_file in
34906    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34907    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34908       break;;
34909  esac
34910done
34911else
34912  $as_echo "$as_me: failed program was:" >&5
34913sed 's/^/| /' conftest.$ac_ext >&5
34914
34915{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34917as_fn_error $? "cannot compute suffix of object files: cannot compile
34918See \`config.log' for more details" "$LINENO" 5; }
34919fi
34920rm -f conftest.$ac_cv_objext conftest.$ac_ext
34921fi
34922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34923$as_echo "$ac_cv_objext" >&6; }
34924OBJEXT=$ac_cv_objext
34925ac_objext=$OBJEXT
34926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34927$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34928if ${ac_cv_c_compiler_gnu+:} false; then :
34929  $as_echo_n "(cached) " >&6
34930else
34931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34932/* end confdefs.h.  */
34933
34934int
34935main ()
34936{
34937#ifndef __GNUC__
34938       choke me
34939#endif
34940
34941  ;
34942  return 0;
34943}
34944_ACEOF
34945if ac_fn_c_try_compile "$LINENO"; then :
34946  ac_compiler_gnu=yes
34947else
34948  ac_compiler_gnu=no
34949fi
34950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34951ac_cv_c_compiler_gnu=$ac_compiler_gnu
34952
34953fi
34954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34955$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34956if test $ac_compiler_gnu = yes; then
34957  GCC=yes
34958else
34959  GCC=
34960fi
34961ac_test_CFLAGS=${CFLAGS+set}
34962ac_save_CFLAGS=$CFLAGS
34963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34964$as_echo_n "checking whether $CC accepts -g... " >&6; }
34965if ${ac_cv_prog_cc_g+:} false; then :
34966  $as_echo_n "(cached) " >&6
34967else
34968  ac_save_c_werror_flag=$ac_c_werror_flag
34969   ac_c_werror_flag=yes
34970   ac_cv_prog_cc_g=no
34971   CFLAGS="-g"
34972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34973/* end confdefs.h.  */
34974
34975int
34976main ()
34977{
34978
34979  ;
34980  return 0;
34981}
34982_ACEOF
34983if ac_fn_c_try_compile "$LINENO"; then :
34984  ac_cv_prog_cc_g=yes
34985else
34986  CFLAGS=""
34987      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34988/* end confdefs.h.  */
34989
34990int
34991main ()
34992{
34993
34994  ;
34995  return 0;
34996}
34997_ACEOF
34998if ac_fn_c_try_compile "$LINENO"; then :
34999
35000else
35001  ac_c_werror_flag=$ac_save_c_werror_flag
35002	 CFLAGS="-g"
35003	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35004/* end confdefs.h.  */
35005
35006int
35007main ()
35008{
35009
35010  ;
35011  return 0;
35012}
35013_ACEOF
35014if ac_fn_c_try_compile "$LINENO"; then :
35015  ac_cv_prog_cc_g=yes
35016fi
35017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35018fi
35019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35020fi
35021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35022   ac_c_werror_flag=$ac_save_c_werror_flag
35023fi
35024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35025$as_echo "$ac_cv_prog_cc_g" >&6; }
35026if test "$ac_test_CFLAGS" = set; then
35027  CFLAGS=$ac_save_CFLAGS
35028elif test $ac_cv_prog_cc_g = yes; then
35029  if test "$GCC" = yes; then
35030    CFLAGS="-g -O2"
35031  else
35032    CFLAGS="-g"
35033  fi
35034else
35035  if test "$GCC" = yes; then
35036    CFLAGS="-O2"
35037  else
35038    CFLAGS=
35039  fi
35040fi
35041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35042$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35043if ${ac_cv_prog_cc_c89+:} false; then :
35044  $as_echo_n "(cached) " >&6
35045else
35046  ac_cv_prog_cc_c89=no
35047ac_save_CC=$CC
35048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35049/* end confdefs.h.  */
35050#include <stdarg.h>
35051#include <stdio.h>
35052struct stat;
35053/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35054struct buf { int x; };
35055FILE * (*rcsopen) (struct buf *, struct stat *, int);
35056static char *e (p, i)
35057     char **p;
35058     int i;
35059{
35060  return p[i];
35061}
35062static char *f (char * (*g) (char **, int), char **p, ...)
35063{
35064  char *s;
35065  va_list v;
35066  va_start (v,p);
35067  s = g (p, va_arg (v,int));
35068  va_end (v);
35069  return s;
35070}
35071
35072/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35073   function prototypes and stuff, but not '\xHH' hex character constants.
35074   These don't provoke an error unfortunately, instead are silently treated
35075   as 'x'.  The following induces an error, until -std is added to get
35076   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35077   array size at least.  It's necessary to write '\x00'==0 to get something
35078   that's true only with -std.  */
35079int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35080
35081/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35082   inside strings and character constants.  */
35083#define FOO(x) 'x'
35084int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35085
35086int test (int i, double x);
35087struct s1 {int (*f) (int a);};
35088struct s2 {int (*f) (double a);};
35089int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35090int argc;
35091char **argv;
35092int
35093main ()
35094{
35095return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35096  ;
35097  return 0;
35098}
35099_ACEOF
35100for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35101	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35102do
35103  CC="$ac_save_CC $ac_arg"
35104  if ac_fn_c_try_compile "$LINENO"; then :
35105  ac_cv_prog_cc_c89=$ac_arg
35106fi
35107rm -f core conftest.err conftest.$ac_objext
35108  test "x$ac_cv_prog_cc_c89" != "xno" && break
35109done
35110rm -f conftest.$ac_ext
35111CC=$ac_save_CC
35112
35113fi
35114# AC_CACHE_VAL
35115case "x$ac_cv_prog_cc_c89" in
35116  x)
35117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35118$as_echo "none needed" >&6; } ;;
35119  xno)
35120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35121$as_echo "unsupported" >&6; } ;;
35122  *)
35123    CC="$CC $ac_cv_prog_cc_c89"
35124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35125$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35126esac
35127if test "x$ac_cv_prog_cc_c89" != xno; then :
35128
35129fi
35130
35131ac_ext=cpp
35132ac_cpp='$CXXCPP $CPPFLAGS'
35133ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35134ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35135ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35136
35137
35138
35139  COMPILER_NAME=C++
35140  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35141
35142  if test "x$CXX" != x; then
35143    # User has supplied compiler name already, always let that override.
35144    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35145$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35146    if test "x`basename $CXX`" = "x$CXX"; then
35147      # A command without a complete path is provided, search $PATH.
35148
35149      for ac_prog in $CXX
35150do
35151  # Extract the first word of "$ac_prog", so it can be a program name with args.
35152set dummy $ac_prog; ac_word=$2
35153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35154$as_echo_n "checking for $ac_word... " >&6; }
35155if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35156  $as_echo_n "(cached) " >&6
35157else
35158  case $POTENTIAL_CXX in
35159  [\\/]* | ?:[\\/]*)
35160  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35161  ;;
35162  *)
35163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35164for as_dir in $PATH
35165do
35166  IFS=$as_save_IFS
35167  test -z "$as_dir" && as_dir=.
35168    for ac_exec_ext in '' $ac_executable_extensions; do
35169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35170    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35172    break 2
35173  fi
35174done
35175  done
35176IFS=$as_save_IFS
35177
35178  ;;
35179esac
35180fi
35181POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35182if test -n "$POTENTIAL_CXX"; then
35183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35184$as_echo "$POTENTIAL_CXX" >&6; }
35185else
35186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35187$as_echo "no" >&6; }
35188fi
35189
35190
35191  test -n "$POTENTIAL_CXX" && break
35192done
35193
35194      if test "x$POTENTIAL_CXX" != x; then
35195        CXX=$POTENTIAL_CXX
35196      else
35197        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35198      fi
35199    else
35200      # Otherwise it might already be a complete path
35201      if test ! -x "$CXX"; then
35202        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35203      fi
35204    fi
35205  else
35206    # No user supplied value. Locate compiler ourselves.
35207
35208    # If we are cross compiling, assume cross compilation tools follows the
35209    # cross compilation standard where they are prefixed with the autoconf
35210    # standard name for the target. For example the binary
35211    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35212    # If we are not cross compiling, then the default compiler name will be
35213    # used.
35214
35215    CXX=
35216    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35217    # before checking the rest of the PATH.
35218    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35219    # step, this should not be necessary.
35220    if test -n "$TOOLCHAIN_PATH"; then
35221      PATH_save="$PATH"
35222      PATH="$TOOLCHAIN_PATH"
35223      if test -n "$ac_tool_prefix"; then
35224  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35225set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35227$as_echo_n "checking for $ac_word... " >&6; }
35228if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35229  $as_echo_n "(cached) " >&6
35230else
35231  case $TOOLCHAIN_PATH_CXX in
35232  [\\/]* | ?:[\\/]*)
35233  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35234  ;;
35235  *)
35236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35237for as_dir in $PATH
35238do
35239  IFS=$as_save_IFS
35240  test -z "$as_dir" && as_dir=.
35241    for ac_exec_ext in '' $ac_executable_extensions; do
35242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35243    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35245    break 2
35246  fi
35247done
35248  done
35249IFS=$as_save_IFS
35250
35251  ;;
35252esac
35253fi
35254TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35255if test -n "$TOOLCHAIN_PATH_CXX"; then
35256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35257$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35258else
35259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35260$as_echo "no" >&6; }
35261fi
35262
35263
35264fi
35265if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35266  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35267  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35268set dummy $SEARCH_LIST; ac_word=$2
35269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35270$as_echo_n "checking for $ac_word... " >&6; }
35271if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35272  $as_echo_n "(cached) " >&6
35273else
35274  case $ac_pt_TOOLCHAIN_PATH_CXX in
35275  [\\/]* | ?:[\\/]*)
35276  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35277  ;;
35278  *)
35279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35280for as_dir in $PATH
35281do
35282  IFS=$as_save_IFS
35283  test -z "$as_dir" && as_dir=.
35284    for ac_exec_ext in '' $ac_executable_extensions; do
35285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35286    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35288    break 2
35289  fi
35290done
35291  done
35292IFS=$as_save_IFS
35293
35294  ;;
35295esac
35296fi
35297ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35298if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35300$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35301else
35302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35303$as_echo "no" >&6; }
35304fi
35305
35306  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35307    TOOLCHAIN_PATH_CXX=""
35308  else
35309    case $cross_compiling:$ac_tool_warned in
35310yes:)
35311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35313ac_tool_warned=yes ;;
35314esac
35315    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35316  fi
35317else
35318  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35319fi
35320
35321      CXX=$TOOLCHAIN_PATH_CXX
35322      PATH="$PATH_save"
35323    fi
35324
35325    # AC_PATH_TOOL can't be run multiple times with the same variable,
35326    # so create a new name for this run.
35327    if test "x$CXX" = x; then
35328      if test -n "$ac_tool_prefix"; then
35329  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35330set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35332$as_echo_n "checking for $ac_word... " >&6; }
35333if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35334  $as_echo_n "(cached) " >&6
35335else
35336  case $POTENTIAL_CXX in
35337  [\\/]* | ?:[\\/]*)
35338  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35339  ;;
35340  *)
35341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35342for as_dir in $PATH
35343do
35344  IFS=$as_save_IFS
35345  test -z "$as_dir" && as_dir=.
35346    for ac_exec_ext in '' $ac_executable_extensions; do
35347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35348    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35350    break 2
35351  fi
35352done
35353  done
35354IFS=$as_save_IFS
35355
35356  ;;
35357esac
35358fi
35359POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35360if test -n "$POTENTIAL_CXX"; then
35361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35362$as_echo "$POTENTIAL_CXX" >&6; }
35363else
35364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35365$as_echo "no" >&6; }
35366fi
35367
35368
35369fi
35370if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35371  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35372  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35373set dummy $SEARCH_LIST; ac_word=$2
35374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35375$as_echo_n "checking for $ac_word... " >&6; }
35376if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35377  $as_echo_n "(cached) " >&6
35378else
35379  case $ac_pt_POTENTIAL_CXX in
35380  [\\/]* | ?:[\\/]*)
35381  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35382  ;;
35383  *)
35384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35385for as_dir in $PATH
35386do
35387  IFS=$as_save_IFS
35388  test -z "$as_dir" && as_dir=.
35389    for ac_exec_ext in '' $ac_executable_extensions; do
35390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35391    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35393    break 2
35394  fi
35395done
35396  done
35397IFS=$as_save_IFS
35398
35399  ;;
35400esac
35401fi
35402ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35403if test -n "$ac_pt_POTENTIAL_CXX"; then
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35405$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35406else
35407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35408$as_echo "no" >&6; }
35409fi
35410
35411  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35412    POTENTIAL_CXX=""
35413  else
35414    case $cross_compiling:$ac_tool_warned in
35415yes:)
35416{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35417$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35418ac_tool_warned=yes ;;
35419esac
35420    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35421  fi
35422else
35423  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35424fi
35425
35426      CXX=$POTENTIAL_CXX
35427    fi
35428
35429    if test "x$CXX" = x; then
35430
35431  # Print a helpful message on how to acquire the necessary build dependency.
35432  # devkit is the help tag: freetype, cups, alsa etc
35433  MISSING_DEPENDENCY=devkit
35434
35435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35436    cygwin_help $MISSING_DEPENDENCY
35437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35438    msys_help $MISSING_DEPENDENCY
35439  else
35440    PKGHANDLER_COMMAND=
35441
35442    case $PKGHANDLER in
35443      apt-get)
35444        apt_help     $MISSING_DEPENDENCY ;;
35445      yum)
35446        yum_help     $MISSING_DEPENDENCY ;;
35447      brew)
35448        brew_help    $MISSING_DEPENDENCY ;;
35449      port)
35450        port_help    $MISSING_DEPENDENCY ;;
35451      pkgutil)
35452        pkgutil_help $MISSING_DEPENDENCY ;;
35453      pkgadd)
35454        pkgadd_help  $MISSING_DEPENDENCY ;;
35455    esac
35456
35457    if test "x$PKGHANDLER_COMMAND" != x; then
35458      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35459    fi
35460  fi
35461
35462      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35463    fi
35464  fi
35465
35466  # Now we have a compiler binary in CXX. Make sure it's okay.
35467
35468  # Only process if variable expands to non-empty
35469
35470  if test "x$CXX" != x; then
35471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35472
35473  # First separate the path from the arguments. This will split at the first
35474  # space.
35475  complete="$CXX"
35476  path="${complete%% *}"
35477  tmp="$complete EOL"
35478  arguments="${tmp#* }"
35479
35480  # Input might be given as Windows format, start by converting to
35481  # unix format.
35482  new_path=`$CYGPATH -u "$path"`
35483
35484  # Now try to locate executable using which
35485  new_path=`$WHICH "$new_path" 2> /dev/null`
35486  # bat and cmd files are not always considered executable in cygwin causing which
35487  # to not find them
35488  if test "x$new_path" = x \
35489      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35490      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35491    new_path=`$CYGPATH -u "$path"`
35492  fi
35493  if test "x$new_path" = x; then
35494    # Oops. Which didn't find the executable.
35495    # The splitting of arguments from the executable at a space might have been incorrect,
35496    # since paths with space are more likely in Windows. Give it another try with the whole
35497    # argument.
35498    path="$complete"
35499    arguments="EOL"
35500    new_path=`$CYGPATH -u "$path"`
35501    new_path=`$WHICH "$new_path" 2> /dev/null`
35502    # bat and cmd files are not always considered executable in cygwin causing which
35503    # to not find them
35504    if test "x$new_path" = x \
35505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35507      new_path=`$CYGPATH -u "$path"`
35508    fi
35509    if test "x$new_path" = x; then
35510      # It's still not found. Now this is an unrecoverable error.
35511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35512$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35513      has_space=`$ECHO "$complete" | $GREP " "`
35514      if test "x$has_space" != x; then
35515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35517      fi
35518      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35519    fi
35520  fi
35521
35522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35525  # "foo.exe" is OK but "foo" is an error.
35526  #
35527  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35528  # It is also a way to make sure we got the proper file name for the real test later on.
35529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35530  if test "x$test_shortpath" = x; then
35531    # Short path failed, file does not exist as specified.
35532    # Try adding .exe or .cmd
35533    if test -f "${new_path}.exe"; then
35534      input_to_shortpath="${new_path}.exe"
35535    elif test -f "${new_path}.cmd"; then
35536      input_to_shortpath="${new_path}.cmd"
35537    else
35538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35539$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35542      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35543    fi
35544  else
35545    input_to_shortpath="$new_path"
35546  fi
35547
35548  # Call helper function which possibly converts this using DOS-style short mode.
35549  # If so, the updated path is stored in $new_path.
35550  new_path="$input_to_shortpath"
35551
35552  input_path="$input_to_shortpath"
35553  # Check if we need to convert this using DOS-style short mode. If the path
35554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35555  # take no chances and rewrite it.
35556  # Note: m4 eats our [], so we need to use [ and ] instead.
35557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35558  if test "x$has_forbidden_chars" != x; then
35559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35563      # Going to short mode and back again did indeed matter. Since short mode is
35564      # case insensitive, let's make it lowercase to improve readability.
35565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35566      # Now convert it back to Unix-style (cygpath)
35567      input_path=`$CYGPATH -u "$shortmode_path"`
35568      new_path="$input_path"
35569    fi
35570  fi
35571
35572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35573  if test "x$test_cygdrive_prefix" = x; then
35574    # As a simple fix, exclude /usr/bin since it's not a real path.
35575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35577      # a path prefixed by /cygdrive for fixpath to work.
35578      new_path="$CYGWIN_ROOT_PATH$input_path"
35579    fi
35580  fi
35581
35582  # remove trailing .exe if any
35583  new_path="${new_path/%.exe/}"
35584
35585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35586
35587  # First separate the path from the arguments. This will split at the first
35588  # space.
35589  complete="$CXX"
35590  path="${complete%% *}"
35591  tmp="$complete EOL"
35592  arguments="${tmp#* }"
35593
35594  # Input might be given as Windows format, start by converting to
35595  # unix format.
35596  new_path="$path"
35597
35598  windows_path="$new_path"
35599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35600    unix_path=`$CYGPATH -u "$windows_path"`
35601    new_path="$unix_path"
35602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35604    new_path="$unix_path"
35605  fi
35606
35607
35608  # Now try to locate executable using which
35609  new_path=`$WHICH "$new_path" 2> /dev/null`
35610
35611  if test "x$new_path" = x; then
35612    # Oops. Which didn't find the executable.
35613    # The splitting of arguments from the executable at a space might have been incorrect,
35614    # since paths with space are more likely in Windows. Give it another try with the whole
35615    # argument.
35616    path="$complete"
35617    arguments="EOL"
35618    new_path="$path"
35619
35620  windows_path="$new_path"
35621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35622    unix_path=`$CYGPATH -u "$windows_path"`
35623    new_path="$unix_path"
35624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35626    new_path="$unix_path"
35627  fi
35628
35629
35630    new_path=`$WHICH "$new_path" 2> /dev/null`
35631    # bat and cmd files are not always considered executable in MSYS causing which
35632    # to not find them
35633    if test "x$new_path" = x \
35634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35636      new_path="$path"
35637
35638  windows_path="$new_path"
35639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35640    unix_path=`$CYGPATH -u "$windows_path"`
35641    new_path="$unix_path"
35642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35644    new_path="$unix_path"
35645  fi
35646
35647    fi
35648
35649    if test "x$new_path" = x; then
35650      # It's still not found. Now this is an unrecoverable error.
35651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35652$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35653      has_space=`$ECHO "$complete" | $GREP " "`
35654      if test "x$has_space" != x; then
35655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35657      fi
35658      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35659    fi
35660  fi
35661
35662  # Now new_path has a complete unix path to the binary
35663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35664    # Keep paths in /bin as-is, but remove trailing .exe if any
35665    new_path="${new_path/%.exe/}"
35666    # Do not save /bin paths to all_fixpath_prefixes!
35667  else
35668    # Not in mixed or Windows style, start by that.
35669    new_path=`cmd //c echo $new_path`
35670
35671  input_path="$new_path"
35672  # Check if we need to convert this using DOS-style short mode. If the path
35673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35674  # take no chances and rewrite it.
35675  # Note: m4 eats our [], so we need to use [ and ] instead.
35676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35677  if test "x$has_forbidden_chars" != x; then
35678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35680  fi
35681
35682    # Output is in $new_path
35683
35684  windows_path="$new_path"
35685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35686    unix_path=`$CYGPATH -u "$windows_path"`
35687    new_path="$unix_path"
35688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35690    new_path="$unix_path"
35691  fi
35692
35693    # remove trailing .exe if any
35694    new_path="${new_path/%.exe/}"
35695
35696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35698  fi
35699
35700    else
35701      # We're on a unix platform. Hooray! :)
35702      # First separate the path from the arguments. This will split at the first
35703      # space.
35704      complete="$CXX"
35705      path="${complete%% *}"
35706      tmp="$complete EOL"
35707      arguments="${tmp#* }"
35708
35709      # Cannot rely on the command "which" here since it doesn't always work.
35710      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35711      if test -z "$is_absolute_path"; then
35712        # Path to executable is not absolute. Find it.
35713        IFS_save="$IFS"
35714        IFS=:
35715        for p in $PATH; do
35716          if test -f "$p/$path" && test -x "$p/$path"; then
35717            new_path="$p/$path"
35718            break
35719          fi
35720        done
35721        IFS="$IFS_save"
35722      else
35723        # This is an absolute path, we can use it without further modifications.
35724        new_path="$path"
35725      fi
35726
35727      if test "x$new_path" = x; then
35728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35729$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35730        has_space=`$ECHO "$complete" | $GREP " "`
35731        if test "x$has_space" != x; then
35732          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35734        fi
35735        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35736      fi
35737    fi
35738
35739    # Now join together the path and the arguments once again
35740    if test "x$arguments" != xEOL; then
35741      new_complete="$new_path ${arguments% *}"
35742    else
35743      new_complete="$new_path"
35744    fi
35745
35746    if test "x$complete" != "x$new_complete"; then
35747      CXX="$new_complete"
35748      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35749$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35750    fi
35751  fi
35752
35753  TEST_COMPILER="$CXX"
35754
35755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35756$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35757  SYMLINK_ORIGINAL="$TEST_COMPILER"
35758
35759  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35760    # Follow a chain of symbolic links. Use readlink
35761    # where it exists, else fall back to horribly
35762    # complicated shell code.
35763    if test "x$READLINK_TESTED" != yes; then
35764      # On MacOSX there is a readlink tool with a different
35765      # purpose than the GNU readlink tool. Check the found readlink.
35766      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35767      if test "x$ISGNU" = x; then
35768        # A readlink that we do not know how to use.
35769        # Are there other non-GNU readlinks out there?
35770        READLINK_TESTED=yes
35771        READLINK=
35772      fi
35773    fi
35774
35775    if test "x$READLINK" != x; then
35776      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35777    else
35778      # Save the current directory for restoring afterwards
35779      STARTDIR=$PWD
35780      COUNTER=0
35781      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35782      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35783      cd $sym_link_dir
35784      # Use -P flag to resolve symlinks in directories.
35785      cd `$THEPWDCMD -P`
35786      sym_link_dir=`$THEPWDCMD -P`
35787      # Resolve file symlinks
35788      while test $COUNTER -lt 20; do
35789        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35790        if test "x$ISLINK" == x; then
35791          # This is not a symbolic link! We are done!
35792          break
35793        fi
35794        # Again resolve directory symlinks since the target of the just found
35795        # link could be in a different directory
35796        cd `$DIRNAME $ISLINK`
35797        sym_link_dir=`$THEPWDCMD -P`
35798        sym_link_file=`$BASENAME $ISLINK`
35799        let COUNTER=COUNTER+1
35800      done
35801      cd $STARTDIR
35802      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35803    fi
35804  fi
35805
35806  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35808$as_echo "no symlink" >&6; }
35809  else
35810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35811$as_echo "$SYMLINK_ORIGINAL" >&6; }
35812
35813    # We can't handle ccache by gcc wrappers, since we need to know if we're
35814    # using ccache. Instead ccache usage must be controlled by a configure option.
35815    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35816    if test "x$COMPILER_BASENAME" = "xccache"; then
35817      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35818$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35819      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35820    fi
35821  fi
35822
35823
35824  COMPILER=$CXX
35825  COMPILER_NAME=$COMPILER_NAME
35826
35827  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35828    # cc -V output typically looks like
35829    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35830    # or
35831    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35832    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35833    # Check that this is likely to be the Solaris Studio cc.
35834    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35835    if test $? -ne 0; then
35836      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35837      { $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
35838$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35839      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35840$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35841      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35842$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35843      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35844    fi
35845    # Remove usage instructions (if present), and
35846    # collapse compiler output into a single line
35847    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35848        $SED -e 's/ *[Uu]sage:.*//'`
35849    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35850        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35851  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35852    # xlc -qversion output typically looks like
35853    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35854    #     Version: 11.01.0000.0015
35855    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35856    # Check that this is likely to be the IBM XL C compiler.
35857    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35858    if test $? -ne 0; then
35859      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35860      { $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
35861$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35863$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35864      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35865$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35866      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35867    fi
35868    # Collapse compiler output into a single line
35869    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35870    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35871        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35872  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35873    # There is no specific version flag, but all output starts with a version string.
35874    # First line typically looks something like:
35875    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35876    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35877    # Check that this is likely to be Microsoft CL.EXE.
35878    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35879    if test $? -ne 0; then
35880      { $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
35881$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35882      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35883$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35884      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35885    fi
35886    # Collapse compiler output into a single line
35887    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35888    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35889        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35890  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35891    # gcc --version output typically looks like
35892    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35893    #     Copyright (C) 2013 Free Software Foundation, Inc.
35894    #     This is free software; see the source for copying conditions.  There is NO
35895    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35896    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35897    # Check that this is likely to be GCC.
35898    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35899    if test $? -ne 0; then
35900      { $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
35901$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35902      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35903$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35904      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35905    fi
35906    # Remove Copyright and legalese from version string, and
35907    # collapse into a single line
35908    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35909        $SED -e 's/ *Copyright .*//'`
35910    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35911        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35912  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35913    # clang --version output typically looks like
35914    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35915    #    clang version 3.3 (tags/RELEASE_33/final)
35916    # or
35917    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35918    #    Target: x86_64-pc-linux-gnu
35919    #    Thread model: posix
35920    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35921    # Check that this is likely to be clang
35922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35923    if test $? -ne 0; then
35924      { $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
35925$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35926      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35927$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35928      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35929    fi
35930    # Collapse compiler output into a single line
35931    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35932    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35933        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35934  else
35935      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35936  fi
35937  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35938  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35939  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35940  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35941
35942  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35943$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35944
35945
35946  # Now that we have resolved CXX ourself, let autoconf have its go at it
35947  ac_ext=cpp
35948ac_cpp='$CXXCPP $CPPFLAGS'
35949ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35950ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35951ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35952if test -z "$CXX"; then
35953  if test -n "$CCC"; then
35954    CXX=$CCC
35955  else
35956    if test -n "$ac_tool_prefix"; then
35957  for ac_prog in $CXX
35958  do
35959    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35962$as_echo_n "checking for $ac_word... " >&6; }
35963if ${ac_cv_prog_CXX+:} false; then :
35964  $as_echo_n "(cached) " >&6
35965else
35966  if test -n "$CXX"; then
35967  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35968else
35969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35970for as_dir in $PATH
35971do
35972  IFS=$as_save_IFS
35973  test -z "$as_dir" && as_dir=.
35974    for ac_exec_ext in '' $ac_executable_extensions; do
35975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35976    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35978    break 2
35979  fi
35980done
35981  done
35982IFS=$as_save_IFS
35983
35984fi
35985fi
35986CXX=$ac_cv_prog_CXX
35987if test -n "$CXX"; then
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35989$as_echo "$CXX" >&6; }
35990else
35991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35992$as_echo "no" >&6; }
35993fi
35994
35995
35996    test -n "$CXX" && break
35997  done
35998fi
35999if test -z "$CXX"; then
36000  ac_ct_CXX=$CXX
36001  for ac_prog in $CXX
36002do
36003  # Extract the first word of "$ac_prog", so it can be a program name with args.
36004set dummy $ac_prog; ac_word=$2
36005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36006$as_echo_n "checking for $ac_word... " >&6; }
36007if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36008  $as_echo_n "(cached) " >&6
36009else
36010  if test -n "$ac_ct_CXX"; then
36011  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36012else
36013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36014for as_dir in $PATH
36015do
36016  IFS=$as_save_IFS
36017  test -z "$as_dir" && as_dir=.
36018    for ac_exec_ext in '' $ac_executable_extensions; do
36019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36020    ac_cv_prog_ac_ct_CXX="$ac_prog"
36021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36022    break 2
36023  fi
36024done
36025  done
36026IFS=$as_save_IFS
36027
36028fi
36029fi
36030ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36031if test -n "$ac_ct_CXX"; then
36032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36033$as_echo "$ac_ct_CXX" >&6; }
36034else
36035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36036$as_echo "no" >&6; }
36037fi
36038
36039
36040  test -n "$ac_ct_CXX" && break
36041done
36042
36043  if test "x$ac_ct_CXX" = x; then
36044    CXX="g++"
36045  else
36046    case $cross_compiling:$ac_tool_warned in
36047yes:)
36048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36050ac_tool_warned=yes ;;
36051esac
36052    CXX=$ac_ct_CXX
36053  fi
36054fi
36055
36056  fi
36057fi
36058# Provide some information about the compiler.
36059$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36060set X $ac_compile
36061ac_compiler=$2
36062for ac_option in --version -v -V -qversion; do
36063  { { ac_try="$ac_compiler $ac_option >&5"
36064case "(($ac_try" in
36065  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36066  *) ac_try_echo=$ac_try;;
36067esac
36068eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36069$as_echo "$ac_try_echo"; } >&5
36070  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36071  ac_status=$?
36072  if test -s conftest.err; then
36073    sed '10a\
36074... rest of stderr output deleted ...
36075         10q' conftest.err >conftest.er1
36076    cat conftest.er1 >&5
36077  fi
36078  rm -f conftest.er1 conftest.err
36079  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36080  test $ac_status = 0; }
36081done
36082
36083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36084$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36085if ${ac_cv_cxx_compiler_gnu+:} false; then :
36086  $as_echo_n "(cached) " >&6
36087else
36088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36089/* end confdefs.h.  */
36090
36091int
36092main ()
36093{
36094#ifndef __GNUC__
36095       choke me
36096#endif
36097
36098  ;
36099  return 0;
36100}
36101_ACEOF
36102if ac_fn_cxx_try_compile "$LINENO"; then :
36103  ac_compiler_gnu=yes
36104else
36105  ac_compiler_gnu=no
36106fi
36107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36108ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36109
36110fi
36111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36112$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36113if test $ac_compiler_gnu = yes; then
36114  GXX=yes
36115else
36116  GXX=
36117fi
36118ac_test_CXXFLAGS=${CXXFLAGS+set}
36119ac_save_CXXFLAGS=$CXXFLAGS
36120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36121$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36122if ${ac_cv_prog_cxx_g+:} false; then :
36123  $as_echo_n "(cached) " >&6
36124else
36125  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36126   ac_cxx_werror_flag=yes
36127   ac_cv_prog_cxx_g=no
36128   CXXFLAGS="-g"
36129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36130/* end confdefs.h.  */
36131
36132int
36133main ()
36134{
36135
36136  ;
36137  return 0;
36138}
36139_ACEOF
36140if ac_fn_cxx_try_compile "$LINENO"; then :
36141  ac_cv_prog_cxx_g=yes
36142else
36143  CXXFLAGS=""
36144      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36145/* end confdefs.h.  */
36146
36147int
36148main ()
36149{
36150
36151  ;
36152  return 0;
36153}
36154_ACEOF
36155if ac_fn_cxx_try_compile "$LINENO"; then :
36156
36157else
36158  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36159	 CXXFLAGS="-g"
36160	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36161/* end confdefs.h.  */
36162
36163int
36164main ()
36165{
36166
36167  ;
36168  return 0;
36169}
36170_ACEOF
36171if ac_fn_cxx_try_compile "$LINENO"; then :
36172  ac_cv_prog_cxx_g=yes
36173fi
36174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36175fi
36176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36177fi
36178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36179   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36180fi
36181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36182$as_echo "$ac_cv_prog_cxx_g" >&6; }
36183if test "$ac_test_CXXFLAGS" = set; then
36184  CXXFLAGS=$ac_save_CXXFLAGS
36185elif test $ac_cv_prog_cxx_g = yes; then
36186  if test "$GXX" = yes; then
36187    CXXFLAGS="-g -O2"
36188  else
36189    CXXFLAGS="-g"
36190  fi
36191else
36192  if test "$GXX" = yes; then
36193    CXXFLAGS="-O2"
36194  else
36195    CXXFLAGS=
36196  fi
36197fi
36198ac_ext=cpp
36199ac_cpp='$CXXCPP $CPPFLAGS'
36200ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36201ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36202ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36203
36204
36205  # This is the compiler version number on the form X.Y[.Z]
36206
36207
36208
36209
36210  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36212$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36214$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36215  fi
36216
36217  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36218  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36219    { $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
36220$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;}
36221  fi
36222
36223  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36224    { $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
36225$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36226  fi
36227
36228  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36229
36230
36231  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281    # Execute function body
36282
36283  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36284  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36285
36286  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36287    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36288  fi
36289
36290  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36291    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36292  fi
36293
36294  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36295  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36296
36297  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36298    :
36299
36300  else
36301    :
36302
36303          { $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
36304$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36305
36306
36307  fi
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322  fi
36323
36324  #
36325  # Setup the preprocessor (CPP and CXXCPP)
36326  #
36327  ac_ext=c
36328ac_cpp='$CPP $CPPFLAGS'
36329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36331ac_compiler_gnu=$ac_cv_c_compiler_gnu
36332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36333$as_echo_n "checking how to run the C preprocessor... " >&6; }
36334# On Suns, sometimes $CPP names a directory.
36335if test -n "$CPP" && test -d "$CPP"; then
36336  CPP=
36337fi
36338if test -z "$CPP"; then
36339  if ${ac_cv_prog_CPP+:} false; then :
36340  $as_echo_n "(cached) " >&6
36341else
36342      # Double quotes because CPP needs to be expanded
36343    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36344    do
36345      ac_preproc_ok=false
36346for ac_c_preproc_warn_flag in '' yes
36347do
36348  # Use a header file that comes with gcc, so configuring glibc
36349  # with a fresh cross-compiler works.
36350  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36351  # <limits.h> exists even on freestanding compilers.
36352  # On the NeXT, cc -E runs the code through the compiler's parser,
36353  # not just through cpp. "Syntax error" is here to catch this case.
36354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36355/* end confdefs.h.  */
36356#ifdef __STDC__
36357# include <limits.h>
36358#else
36359# include <assert.h>
36360#endif
36361		     Syntax error
36362_ACEOF
36363if ac_fn_c_try_cpp "$LINENO"; then :
36364
36365else
36366  # Broken: fails on valid input.
36367continue
36368fi
36369rm -f conftest.err conftest.i conftest.$ac_ext
36370
36371  # OK, works on sane cases.  Now check whether nonexistent headers
36372  # can be detected and how.
36373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36374/* end confdefs.h.  */
36375#include <ac_nonexistent.h>
36376_ACEOF
36377if ac_fn_c_try_cpp "$LINENO"; then :
36378  # Broken: success on invalid input.
36379continue
36380else
36381  # Passes both tests.
36382ac_preproc_ok=:
36383break
36384fi
36385rm -f conftest.err conftest.i conftest.$ac_ext
36386
36387done
36388# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36389rm -f conftest.i conftest.err conftest.$ac_ext
36390if $ac_preproc_ok; then :
36391  break
36392fi
36393
36394    done
36395    ac_cv_prog_CPP=$CPP
36396
36397fi
36398  CPP=$ac_cv_prog_CPP
36399else
36400  ac_cv_prog_CPP=$CPP
36401fi
36402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36403$as_echo "$CPP" >&6; }
36404ac_preproc_ok=false
36405for ac_c_preproc_warn_flag in '' yes
36406do
36407  # Use a header file that comes with gcc, so configuring glibc
36408  # with a fresh cross-compiler works.
36409  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36410  # <limits.h> exists even on freestanding compilers.
36411  # On the NeXT, cc -E runs the code through the compiler's parser,
36412  # not just through cpp. "Syntax error" is here to catch this case.
36413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36414/* end confdefs.h.  */
36415#ifdef __STDC__
36416# include <limits.h>
36417#else
36418# include <assert.h>
36419#endif
36420		     Syntax error
36421_ACEOF
36422if ac_fn_c_try_cpp "$LINENO"; then :
36423
36424else
36425  # Broken: fails on valid input.
36426continue
36427fi
36428rm -f conftest.err conftest.i conftest.$ac_ext
36429
36430  # OK, works on sane cases.  Now check whether nonexistent headers
36431  # can be detected and how.
36432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36433/* end confdefs.h.  */
36434#include <ac_nonexistent.h>
36435_ACEOF
36436if ac_fn_c_try_cpp "$LINENO"; then :
36437  # Broken: success on invalid input.
36438continue
36439else
36440  # Passes both tests.
36441ac_preproc_ok=:
36442break
36443fi
36444rm -f conftest.err conftest.i conftest.$ac_ext
36445
36446done
36447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36448rm -f conftest.i conftest.err conftest.$ac_ext
36449if $ac_preproc_ok; then :
36450
36451else
36452  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36454as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36455See \`config.log' for more details" "$LINENO" 5; }
36456fi
36457
36458ac_ext=cpp
36459ac_cpp='$CXXCPP $CPPFLAGS'
36460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36463
36464
36465  # Only process if variable expands to non-empty
36466
36467  if test "x$CPP" != x; then
36468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36469
36470  # First separate the path from the arguments. This will split at the first
36471  # space.
36472  complete="$CPP"
36473  path="${complete%% *}"
36474  tmp="$complete EOL"
36475  arguments="${tmp#* }"
36476
36477  # Input might be given as Windows format, start by converting to
36478  # unix format.
36479  new_path=`$CYGPATH -u "$path"`
36480
36481  # Now try to locate executable using which
36482  new_path=`$WHICH "$new_path" 2> /dev/null`
36483  # bat and cmd files are not always considered executable in cygwin causing which
36484  # to not find them
36485  if test "x$new_path" = x \
36486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36488    new_path=`$CYGPATH -u "$path"`
36489  fi
36490  if test "x$new_path" = x; then
36491    # Oops. Which didn't find the executable.
36492    # The splitting of arguments from the executable at a space might have been incorrect,
36493    # since paths with space are more likely in Windows. Give it another try with the whole
36494    # argument.
36495    path="$complete"
36496    arguments="EOL"
36497    new_path=`$CYGPATH -u "$path"`
36498    new_path=`$WHICH "$new_path" 2> /dev/null`
36499    # bat and cmd files are not always considered executable in cygwin causing which
36500    # to not find them
36501    if test "x$new_path" = x \
36502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36504      new_path=`$CYGPATH -u "$path"`
36505    fi
36506    if test "x$new_path" = x; then
36507      # It's still not found. Now this is an unrecoverable error.
36508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36509$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36510      has_space=`$ECHO "$complete" | $GREP " "`
36511      if test "x$has_space" != x; then
36512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36514      fi
36515      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36516    fi
36517  fi
36518
36519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36522  # "foo.exe" is OK but "foo" is an error.
36523  #
36524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36525  # It is also a way to make sure we got the proper file name for the real test later on.
36526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36527  if test "x$test_shortpath" = x; then
36528    # Short path failed, file does not exist as specified.
36529    # Try adding .exe or .cmd
36530    if test -f "${new_path}.exe"; then
36531      input_to_shortpath="${new_path}.exe"
36532    elif test -f "${new_path}.cmd"; then
36533      input_to_shortpath="${new_path}.cmd"
36534    else
36535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36536$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36539      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36540    fi
36541  else
36542    input_to_shortpath="$new_path"
36543  fi
36544
36545  # Call helper function which possibly converts this using DOS-style short mode.
36546  # If so, the updated path is stored in $new_path.
36547  new_path="$input_to_shortpath"
36548
36549  input_path="$input_to_shortpath"
36550  # Check if we need to convert this using DOS-style short mode. If the path
36551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36552  # take no chances and rewrite it.
36553  # Note: m4 eats our [], so we need to use [ and ] instead.
36554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36555  if test "x$has_forbidden_chars" != x; then
36556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36560      # Going to short mode and back again did indeed matter. Since short mode is
36561      # case insensitive, let's make it lowercase to improve readability.
36562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36563      # Now convert it back to Unix-style (cygpath)
36564      input_path=`$CYGPATH -u "$shortmode_path"`
36565      new_path="$input_path"
36566    fi
36567  fi
36568
36569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36570  if test "x$test_cygdrive_prefix" = x; then
36571    # As a simple fix, exclude /usr/bin since it's not a real path.
36572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36574      # a path prefixed by /cygdrive for fixpath to work.
36575      new_path="$CYGWIN_ROOT_PATH$input_path"
36576    fi
36577  fi
36578
36579  # remove trailing .exe if any
36580  new_path="${new_path/%.exe/}"
36581
36582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36583
36584  # First separate the path from the arguments. This will split at the first
36585  # space.
36586  complete="$CPP"
36587  path="${complete%% *}"
36588  tmp="$complete EOL"
36589  arguments="${tmp#* }"
36590
36591  # Input might be given as Windows format, start by converting to
36592  # unix format.
36593  new_path="$path"
36594
36595  windows_path="$new_path"
36596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36597    unix_path=`$CYGPATH -u "$windows_path"`
36598    new_path="$unix_path"
36599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36601    new_path="$unix_path"
36602  fi
36603
36604
36605  # Now try to locate executable using which
36606  new_path=`$WHICH "$new_path" 2> /dev/null`
36607
36608  if test "x$new_path" = x; then
36609    # Oops. Which didn't find the executable.
36610    # The splitting of arguments from the executable at a space might have been incorrect,
36611    # since paths with space are more likely in Windows. Give it another try with the whole
36612    # argument.
36613    path="$complete"
36614    arguments="EOL"
36615    new_path="$path"
36616
36617  windows_path="$new_path"
36618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36619    unix_path=`$CYGPATH -u "$windows_path"`
36620    new_path="$unix_path"
36621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36623    new_path="$unix_path"
36624  fi
36625
36626
36627    new_path=`$WHICH "$new_path" 2> /dev/null`
36628    # bat and cmd files are not always considered executable in MSYS causing which
36629    # to not find them
36630    if test "x$new_path" = x \
36631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36633      new_path="$path"
36634
36635  windows_path="$new_path"
36636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36637    unix_path=`$CYGPATH -u "$windows_path"`
36638    new_path="$unix_path"
36639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36641    new_path="$unix_path"
36642  fi
36643
36644    fi
36645
36646    if test "x$new_path" = x; then
36647      # It's still not found. Now this is an unrecoverable error.
36648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36649$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36650      has_space=`$ECHO "$complete" | $GREP " "`
36651      if test "x$has_space" != x; then
36652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36654      fi
36655      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36656    fi
36657  fi
36658
36659  # Now new_path has a complete unix path to the binary
36660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36661    # Keep paths in /bin as-is, but remove trailing .exe if any
36662    new_path="${new_path/%.exe/}"
36663    # Do not save /bin paths to all_fixpath_prefixes!
36664  else
36665    # Not in mixed or Windows style, start by that.
36666    new_path=`cmd //c echo $new_path`
36667
36668  input_path="$new_path"
36669  # Check if we need to convert this using DOS-style short mode. If the path
36670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36671  # take no chances and rewrite it.
36672  # Note: m4 eats our [], so we need to use [ and ] instead.
36673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36674  if test "x$has_forbidden_chars" != x; then
36675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36677  fi
36678
36679    # Output is in $new_path
36680
36681  windows_path="$new_path"
36682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36683    unix_path=`$CYGPATH -u "$windows_path"`
36684    new_path="$unix_path"
36685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36687    new_path="$unix_path"
36688  fi
36689
36690    # remove trailing .exe if any
36691    new_path="${new_path/%.exe/}"
36692
36693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36695  fi
36696
36697    else
36698      # We're on a unix platform. Hooray! :)
36699      # First separate the path from the arguments. This will split at the first
36700      # space.
36701      complete="$CPP"
36702      path="${complete%% *}"
36703      tmp="$complete EOL"
36704      arguments="${tmp#* }"
36705
36706      # Cannot rely on the command "which" here since it doesn't always work.
36707      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36708      if test -z "$is_absolute_path"; then
36709        # Path to executable is not absolute. Find it.
36710        IFS_save="$IFS"
36711        IFS=:
36712        for p in $PATH; do
36713          if test -f "$p/$path" && test -x "$p/$path"; then
36714            new_path="$p/$path"
36715            break
36716          fi
36717        done
36718        IFS="$IFS_save"
36719      else
36720        # This is an absolute path, we can use it without further modifications.
36721        new_path="$path"
36722      fi
36723
36724      if test "x$new_path" = x; then
36725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36726$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36727        has_space=`$ECHO "$complete" | $GREP " "`
36728        if test "x$has_space" != x; then
36729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36731        fi
36732        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36733      fi
36734    fi
36735
36736    # Now join together the path and the arguments once again
36737    if test "x$arguments" != xEOL; then
36738      new_complete="$new_path ${arguments% *}"
36739    else
36740      new_complete="$new_path"
36741    fi
36742
36743    if test "x$complete" != "x$new_complete"; then
36744      CPP="$new_complete"
36745      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36746$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36747    fi
36748  fi
36749
36750  ac_ext=cpp
36751ac_cpp='$CXXCPP $CPPFLAGS'
36752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36756$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36757if test -z "$CXXCPP"; then
36758  if ${ac_cv_prog_CXXCPP+:} false; then :
36759  $as_echo_n "(cached) " >&6
36760else
36761      # Double quotes because CXXCPP needs to be expanded
36762    for CXXCPP in "$CXX -E" "/lib/cpp"
36763    do
36764      ac_preproc_ok=false
36765for ac_cxx_preproc_warn_flag in '' yes
36766do
36767  # Use a header file that comes with gcc, so configuring glibc
36768  # with a fresh cross-compiler works.
36769  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36770  # <limits.h> exists even on freestanding compilers.
36771  # On the NeXT, cc -E runs the code through the compiler's parser,
36772  # not just through cpp. "Syntax error" is here to catch this case.
36773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36774/* end confdefs.h.  */
36775#ifdef __STDC__
36776# include <limits.h>
36777#else
36778# include <assert.h>
36779#endif
36780		     Syntax error
36781_ACEOF
36782if ac_fn_cxx_try_cpp "$LINENO"; then :
36783
36784else
36785  # Broken: fails on valid input.
36786continue
36787fi
36788rm -f conftest.err conftest.i conftest.$ac_ext
36789
36790  # OK, works on sane cases.  Now check whether nonexistent headers
36791  # can be detected and how.
36792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36793/* end confdefs.h.  */
36794#include <ac_nonexistent.h>
36795_ACEOF
36796if ac_fn_cxx_try_cpp "$LINENO"; then :
36797  # Broken: success on invalid input.
36798continue
36799else
36800  # Passes both tests.
36801ac_preproc_ok=:
36802break
36803fi
36804rm -f conftest.err conftest.i conftest.$ac_ext
36805
36806done
36807# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36808rm -f conftest.i conftest.err conftest.$ac_ext
36809if $ac_preproc_ok; then :
36810  break
36811fi
36812
36813    done
36814    ac_cv_prog_CXXCPP=$CXXCPP
36815
36816fi
36817  CXXCPP=$ac_cv_prog_CXXCPP
36818else
36819  ac_cv_prog_CXXCPP=$CXXCPP
36820fi
36821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36822$as_echo "$CXXCPP" >&6; }
36823ac_preproc_ok=false
36824for ac_cxx_preproc_warn_flag in '' yes
36825do
36826  # Use a header file that comes with gcc, so configuring glibc
36827  # with a fresh cross-compiler works.
36828  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36829  # <limits.h> exists even on freestanding compilers.
36830  # On the NeXT, cc -E runs the code through the compiler's parser,
36831  # not just through cpp. "Syntax error" is here to catch this case.
36832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36833/* end confdefs.h.  */
36834#ifdef __STDC__
36835# include <limits.h>
36836#else
36837# include <assert.h>
36838#endif
36839		     Syntax error
36840_ACEOF
36841if ac_fn_cxx_try_cpp "$LINENO"; then :
36842
36843else
36844  # Broken: fails on valid input.
36845continue
36846fi
36847rm -f conftest.err conftest.i conftest.$ac_ext
36848
36849  # OK, works on sane cases.  Now check whether nonexistent headers
36850  # can be detected and how.
36851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36852/* end confdefs.h.  */
36853#include <ac_nonexistent.h>
36854_ACEOF
36855if ac_fn_cxx_try_cpp "$LINENO"; then :
36856  # Broken: success on invalid input.
36857continue
36858else
36859  # Passes both tests.
36860ac_preproc_ok=:
36861break
36862fi
36863rm -f conftest.err conftest.i conftest.$ac_ext
36864
36865done
36866# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36867rm -f conftest.i conftest.err conftest.$ac_ext
36868if $ac_preproc_ok; then :
36869
36870else
36871  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36873as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36874See \`config.log' for more details" "$LINENO" 5; }
36875fi
36876
36877ac_ext=cpp
36878ac_cpp='$CXXCPP $CPPFLAGS'
36879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36882
36883
36884  # Only process if variable expands to non-empty
36885
36886  if test "x$CXXCPP" != x; then
36887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36888
36889  # First separate the path from the arguments. This will split at the first
36890  # space.
36891  complete="$CXXCPP"
36892  path="${complete%% *}"
36893  tmp="$complete EOL"
36894  arguments="${tmp#* }"
36895
36896  # Input might be given as Windows format, start by converting to
36897  # unix format.
36898  new_path=`$CYGPATH -u "$path"`
36899
36900  # Now try to locate executable using which
36901  new_path=`$WHICH "$new_path" 2> /dev/null`
36902  # bat and cmd files are not always considered executable in cygwin causing which
36903  # to not find them
36904  if test "x$new_path" = x \
36905      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36906      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36907    new_path=`$CYGPATH -u "$path"`
36908  fi
36909  if test "x$new_path" = x; then
36910    # Oops. Which didn't find the executable.
36911    # The splitting of arguments from the executable at a space might have been incorrect,
36912    # since paths with space are more likely in Windows. Give it another try with the whole
36913    # argument.
36914    path="$complete"
36915    arguments="EOL"
36916    new_path=`$CYGPATH -u "$path"`
36917    new_path=`$WHICH "$new_path" 2> /dev/null`
36918    # bat and cmd files are not always considered executable in cygwin causing which
36919    # to not find them
36920    if test "x$new_path" = x \
36921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36923      new_path=`$CYGPATH -u "$path"`
36924    fi
36925    if test "x$new_path" = x; then
36926      # It's still not found. Now this is an unrecoverable error.
36927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36928$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36929      has_space=`$ECHO "$complete" | $GREP " "`
36930      if test "x$has_space" != x; then
36931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36933      fi
36934      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36935    fi
36936  fi
36937
36938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36941  # "foo.exe" is OK but "foo" is an error.
36942  #
36943  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36944  # It is also a way to make sure we got the proper file name for the real test later on.
36945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36946  if test "x$test_shortpath" = x; then
36947    # Short path failed, file does not exist as specified.
36948    # Try adding .exe or .cmd
36949    if test -f "${new_path}.exe"; then
36950      input_to_shortpath="${new_path}.exe"
36951    elif test -f "${new_path}.cmd"; then
36952      input_to_shortpath="${new_path}.cmd"
36953    else
36954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36955$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36958      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36959    fi
36960  else
36961    input_to_shortpath="$new_path"
36962  fi
36963
36964  # Call helper function which possibly converts this using DOS-style short mode.
36965  # If so, the updated path is stored in $new_path.
36966  new_path="$input_to_shortpath"
36967
36968  input_path="$input_to_shortpath"
36969  # Check if we need to convert this using DOS-style short mode. If the path
36970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36971  # take no chances and rewrite it.
36972  # Note: m4 eats our [], so we need to use [ and ] instead.
36973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36974  if test "x$has_forbidden_chars" != x; then
36975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36979      # Going to short mode and back again did indeed matter. Since short mode is
36980      # case insensitive, let's make it lowercase to improve readability.
36981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36982      # Now convert it back to Unix-style (cygpath)
36983      input_path=`$CYGPATH -u "$shortmode_path"`
36984      new_path="$input_path"
36985    fi
36986  fi
36987
36988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36989  if test "x$test_cygdrive_prefix" = x; then
36990    # As a simple fix, exclude /usr/bin since it's not a real path.
36991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36993      # a path prefixed by /cygdrive for fixpath to work.
36994      new_path="$CYGWIN_ROOT_PATH$input_path"
36995    fi
36996  fi
36997
36998  # remove trailing .exe if any
36999  new_path="${new_path/%.exe/}"
37000
37001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37002
37003  # First separate the path from the arguments. This will split at the first
37004  # space.
37005  complete="$CXXCPP"
37006  path="${complete%% *}"
37007  tmp="$complete EOL"
37008  arguments="${tmp#* }"
37009
37010  # Input might be given as Windows format, start by converting to
37011  # unix format.
37012  new_path="$path"
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023
37024  # Now try to locate executable using which
37025  new_path=`$WHICH "$new_path" 2> /dev/null`
37026
37027  if test "x$new_path" = x; then
37028    # Oops. Which didn't find the executable.
37029    # The splitting of arguments from the executable at a space might have been incorrect,
37030    # since paths with space are more likely in Windows. Give it another try with the whole
37031    # argument.
37032    path="$complete"
37033    arguments="EOL"
37034    new_path="$path"
37035
37036  windows_path="$new_path"
37037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37038    unix_path=`$CYGPATH -u "$windows_path"`
37039    new_path="$unix_path"
37040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37042    new_path="$unix_path"
37043  fi
37044
37045
37046    new_path=`$WHICH "$new_path" 2> /dev/null`
37047    # bat and cmd files are not always considered executable in MSYS causing which
37048    # to not find them
37049    if test "x$new_path" = x \
37050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37052      new_path="$path"
37053
37054  windows_path="$new_path"
37055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37056    unix_path=`$CYGPATH -u "$windows_path"`
37057    new_path="$unix_path"
37058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37060    new_path="$unix_path"
37061  fi
37062
37063    fi
37064
37065    if test "x$new_path" = x; then
37066      # It's still not found. Now this is an unrecoverable error.
37067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37068$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37069      has_space=`$ECHO "$complete" | $GREP " "`
37070      if test "x$has_space" != x; then
37071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37073      fi
37074      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37075    fi
37076  fi
37077
37078  # Now new_path has a complete unix path to the binary
37079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37080    # Keep paths in /bin as-is, but remove trailing .exe if any
37081    new_path="${new_path/%.exe/}"
37082    # Do not save /bin paths to all_fixpath_prefixes!
37083  else
37084    # Not in mixed or Windows style, start by that.
37085    new_path=`cmd //c echo $new_path`
37086
37087  input_path="$new_path"
37088  # Check if we need to convert this using DOS-style short mode. If the path
37089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37090  # take no chances and rewrite it.
37091  # Note: m4 eats our [], so we need to use [ and ] instead.
37092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37093  if test "x$has_forbidden_chars" != x; then
37094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37096  fi
37097
37098    # Output is in $new_path
37099
37100  windows_path="$new_path"
37101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37102    unix_path=`$CYGPATH -u "$windows_path"`
37103    new_path="$unix_path"
37104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37106    new_path="$unix_path"
37107  fi
37108
37109    # remove trailing .exe if any
37110    new_path="${new_path/%.exe/}"
37111
37112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37114  fi
37115
37116    else
37117      # We're on a unix platform. Hooray! :)
37118      # First separate the path from the arguments. This will split at the first
37119      # space.
37120      complete="$CXXCPP"
37121      path="${complete%% *}"
37122      tmp="$complete EOL"
37123      arguments="${tmp#* }"
37124
37125      # Cannot rely on the command "which" here since it doesn't always work.
37126      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37127      if test -z "$is_absolute_path"; then
37128        # Path to executable is not absolute. Find it.
37129        IFS_save="$IFS"
37130        IFS=:
37131        for p in $PATH; do
37132          if test -f "$p/$path" && test -x "$p/$path"; then
37133            new_path="$p/$path"
37134            break
37135          fi
37136        done
37137        IFS="$IFS_save"
37138      else
37139        # This is an absolute path, we can use it without further modifications.
37140        new_path="$path"
37141      fi
37142
37143      if test "x$new_path" = x; then
37144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37145$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37146        has_space=`$ECHO "$complete" | $GREP " "`
37147        if test "x$has_space" != x; then
37148          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37149$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37150        fi
37151        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37152      fi
37153    fi
37154
37155    # Now join together the path and the arguments once again
37156    if test "x$arguments" != xEOL; then
37157      new_complete="$new_path ${arguments% *}"
37158    else
37159      new_complete="$new_path"
37160    fi
37161
37162    if test "x$complete" != "x$new_complete"; then
37163      CXXCPP="$new_complete"
37164      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37165$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37166    fi
37167  fi
37168
37169
37170  #
37171  # Setup the linker (LD)
37172  #
37173  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37174    # In the Microsoft toolchain we have a separate LD command "link".
37175    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37176    # a cygwin program for something completely different.
37177    # Extract the first word of "link", so it can be a program name with args.
37178set dummy link; ac_word=$2
37179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180$as_echo_n "checking for $ac_word... " >&6; }
37181if ${ac_cv_prog_LD+:} false; then :
37182  $as_echo_n "(cached) " >&6
37183else
37184  if test -n "$LD"; then
37185  ac_cv_prog_LD="$LD" # Let the user override the test.
37186else
37187  ac_prog_rejected=no
37188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37189for as_dir in $PATH
37190do
37191  IFS=$as_save_IFS
37192  test -z "$as_dir" && as_dir=.
37193    for ac_exec_ext in '' $ac_executable_extensions; do
37194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37195    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37196       ac_prog_rejected=yes
37197       continue
37198     fi
37199    ac_cv_prog_LD="link"
37200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37201    break 2
37202  fi
37203done
37204  done
37205IFS=$as_save_IFS
37206
37207if test $ac_prog_rejected = yes; then
37208  # We found a bogon in the path, so make sure we never use it.
37209  set dummy $ac_cv_prog_LD
37210  shift
37211  if test $# != 0; then
37212    # We chose a different compiler from the bogus one.
37213    # However, it has the same basename, so the bogon will be chosen
37214    # first if we set LD to just the basename; use the full file name.
37215    shift
37216    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37217  fi
37218fi
37219fi
37220fi
37221LD=$ac_cv_prog_LD
37222if test -n "$LD"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37224$as_echo "$LD" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231
37232  # Only process if variable expands to non-empty
37233
37234  if test "x$LD" != x; then
37235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37236
37237  # First separate the path from the arguments. This will split at the first
37238  # space.
37239  complete="$LD"
37240  path="${complete%% *}"
37241  tmp="$complete EOL"
37242  arguments="${tmp#* }"
37243
37244  # Input might be given as Windows format, start by converting to
37245  # unix format.
37246  new_path=`$CYGPATH -u "$path"`
37247
37248  # Now try to locate executable using which
37249  new_path=`$WHICH "$new_path" 2> /dev/null`
37250  # bat and cmd files are not always considered executable in cygwin causing which
37251  # to not find them
37252  if test "x$new_path" = x \
37253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37255    new_path=`$CYGPATH -u "$path"`
37256  fi
37257  if test "x$new_path" = x; then
37258    # Oops. Which didn't find the executable.
37259    # The splitting of arguments from the executable at a space might have been incorrect,
37260    # since paths with space are more likely in Windows. Give it another try with the whole
37261    # argument.
37262    path="$complete"
37263    arguments="EOL"
37264    new_path=`$CYGPATH -u "$path"`
37265    new_path=`$WHICH "$new_path" 2> /dev/null`
37266    # bat and cmd files are not always considered executable in cygwin causing which
37267    # to not find them
37268    if test "x$new_path" = x \
37269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37271      new_path=`$CYGPATH -u "$path"`
37272    fi
37273    if test "x$new_path" = x; then
37274      # It's still not found. Now this is an unrecoverable error.
37275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37276$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37277      has_space=`$ECHO "$complete" | $GREP " "`
37278      if test "x$has_space" != x; then
37279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37281      fi
37282      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37283    fi
37284  fi
37285
37286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37289  # "foo.exe" is OK but "foo" is an error.
37290  #
37291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37292  # It is also a way to make sure we got the proper file name for the real test later on.
37293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37294  if test "x$test_shortpath" = x; then
37295    # Short path failed, file does not exist as specified.
37296    # Try adding .exe or .cmd
37297    if test -f "${new_path}.exe"; then
37298      input_to_shortpath="${new_path}.exe"
37299    elif test -f "${new_path}.cmd"; then
37300      input_to_shortpath="${new_path}.cmd"
37301    else
37302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37303$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37306      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37307    fi
37308  else
37309    input_to_shortpath="$new_path"
37310  fi
37311
37312  # Call helper function which possibly converts this using DOS-style short mode.
37313  # If so, the updated path is stored in $new_path.
37314  new_path="$input_to_shortpath"
37315
37316  input_path="$input_to_shortpath"
37317  # Check if we need to convert this using DOS-style short mode. If the path
37318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37319  # take no chances and rewrite it.
37320  # Note: m4 eats our [], so we need to use [ and ] instead.
37321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37322  if test "x$has_forbidden_chars" != x; then
37323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37327      # Going to short mode and back again did indeed matter. Since short mode is
37328      # case insensitive, let's make it lowercase to improve readability.
37329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37330      # Now convert it back to Unix-style (cygpath)
37331      input_path=`$CYGPATH -u "$shortmode_path"`
37332      new_path="$input_path"
37333    fi
37334  fi
37335
37336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37337  if test "x$test_cygdrive_prefix" = x; then
37338    # As a simple fix, exclude /usr/bin since it's not a real path.
37339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37341      # a path prefixed by /cygdrive for fixpath to work.
37342      new_path="$CYGWIN_ROOT_PATH$input_path"
37343    fi
37344  fi
37345
37346  # remove trailing .exe if any
37347  new_path="${new_path/%.exe/}"
37348
37349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37350
37351  # First separate the path from the arguments. This will split at the first
37352  # space.
37353  complete="$LD"
37354  path="${complete%% *}"
37355  tmp="$complete EOL"
37356  arguments="${tmp#* }"
37357
37358  # Input might be given as Windows format, start by converting to
37359  # unix format.
37360  new_path="$path"
37361
37362  windows_path="$new_path"
37363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37364    unix_path=`$CYGPATH -u "$windows_path"`
37365    new_path="$unix_path"
37366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37368    new_path="$unix_path"
37369  fi
37370
37371
37372  # Now try to locate executable using which
37373  new_path=`$WHICH "$new_path" 2> /dev/null`
37374
37375  if test "x$new_path" = x; then
37376    # Oops. Which didn't find the executable.
37377    # The splitting of arguments from the executable at a space might have been incorrect,
37378    # since paths with space are more likely in Windows. Give it another try with the whole
37379    # argument.
37380    path="$complete"
37381    arguments="EOL"
37382    new_path="$path"
37383
37384  windows_path="$new_path"
37385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37386    unix_path=`$CYGPATH -u "$windows_path"`
37387    new_path="$unix_path"
37388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37390    new_path="$unix_path"
37391  fi
37392
37393
37394    new_path=`$WHICH "$new_path" 2> /dev/null`
37395    # bat and cmd files are not always considered executable in MSYS causing which
37396    # to not find them
37397    if test "x$new_path" = x \
37398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37400      new_path="$path"
37401
37402  windows_path="$new_path"
37403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37404    unix_path=`$CYGPATH -u "$windows_path"`
37405    new_path="$unix_path"
37406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37408    new_path="$unix_path"
37409  fi
37410
37411    fi
37412
37413    if test "x$new_path" = x; then
37414      # It's still not found. Now this is an unrecoverable error.
37415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37416$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37417      has_space=`$ECHO "$complete" | $GREP " "`
37418      if test "x$has_space" != x; then
37419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37421      fi
37422      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37423    fi
37424  fi
37425
37426  # Now new_path has a complete unix path to the binary
37427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37428    # Keep paths in /bin as-is, but remove trailing .exe if any
37429    new_path="${new_path/%.exe/}"
37430    # Do not save /bin paths to all_fixpath_prefixes!
37431  else
37432    # Not in mixed or Windows style, start by that.
37433    new_path=`cmd //c echo $new_path`
37434
37435  input_path="$new_path"
37436  # Check if we need to convert this using DOS-style short mode. If the path
37437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37438  # take no chances and rewrite it.
37439  # Note: m4 eats our [], so we need to use [ and ] instead.
37440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37441  if test "x$has_forbidden_chars" != x; then
37442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37444  fi
37445
37446    # Output is in $new_path
37447
37448  windows_path="$new_path"
37449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37450    unix_path=`$CYGPATH -u "$windows_path"`
37451    new_path="$unix_path"
37452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37454    new_path="$unix_path"
37455  fi
37456
37457    # remove trailing .exe if any
37458    new_path="${new_path/%.exe/}"
37459
37460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37462  fi
37463
37464    else
37465      # We're on a unix platform. Hooray! :)
37466      # First separate the path from the arguments. This will split at the first
37467      # space.
37468      complete="$LD"
37469      path="${complete%% *}"
37470      tmp="$complete EOL"
37471      arguments="${tmp#* }"
37472
37473      # Cannot rely on the command "which" here since it doesn't always work.
37474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37475      if test -z "$is_absolute_path"; then
37476        # Path to executable is not absolute. Find it.
37477        IFS_save="$IFS"
37478        IFS=:
37479        for p in $PATH; do
37480          if test -f "$p/$path" && test -x "$p/$path"; then
37481            new_path="$p/$path"
37482            break
37483          fi
37484        done
37485        IFS="$IFS_save"
37486      else
37487        # This is an absolute path, we can use it without further modifications.
37488        new_path="$path"
37489      fi
37490
37491      if test "x$new_path" = x; then
37492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37493$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37494        has_space=`$ECHO "$complete" | $GREP " "`
37495        if test "x$has_space" != x; then
37496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37498        fi
37499        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37500      fi
37501    fi
37502
37503    # Now join together the path and the arguments once again
37504    if test "x$arguments" != xEOL; then
37505      new_complete="$new_path ${arguments% *}"
37506    else
37507      new_complete="$new_path"
37508    fi
37509
37510    if test "x$complete" != "x$new_complete"; then
37511      LD="$new_complete"
37512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37513$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37514    fi
37515  fi
37516
37517    # Verify that we indeed succeeded with this trick.
37518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37519$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37520    "$LD" --version > /dev/null
37521    if test $? -eq 0 ; then
37522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37523$as_echo "no" >&6; }
37524      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37525    else
37526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37527$as_echo "yes" >&6; }
37528    fi
37529    LDCXX="$LD"
37530  else
37531    # All other toolchains use the compiler to link.
37532    LD="$CC"
37533    LDCXX="$CXX"
37534  fi
37535
37536  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37537
37538
37539  #
37540  # Setup the assembler (AS)
37541  #
37542  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37543
37544
37545  # Publish this variable in the help.
37546
37547
37548  if [ -z "${AS+x}" ]; then
37549    # The variable is not set by user, try to locate tool using the code snippet
37550    for ac_prog in as
37551do
37552  # Extract the first word of "$ac_prog", so it can be a program name with args.
37553set dummy $ac_prog; ac_word=$2
37554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37555$as_echo_n "checking for $ac_word... " >&6; }
37556if ${ac_cv_path_AS+:} false; then :
37557  $as_echo_n "(cached) " >&6
37558else
37559  case $AS in
37560  [\\/]* | ?:[\\/]*)
37561  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37562  ;;
37563  *)
37564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37565for as_dir in $PATH
37566do
37567  IFS=$as_save_IFS
37568  test -z "$as_dir" && as_dir=.
37569    for ac_exec_ext in '' $ac_executable_extensions; do
37570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37571    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37573    break 2
37574  fi
37575done
37576  done
37577IFS=$as_save_IFS
37578
37579  ;;
37580esac
37581fi
37582AS=$ac_cv_path_AS
37583if test -n "$AS"; then
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37585$as_echo "$AS" >&6; }
37586else
37587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37588$as_echo "no" >&6; }
37589fi
37590
37591
37592  test -n "$AS" && break
37593done
37594
37595  else
37596    # The variable is set, but is it from the command line or the environment?
37597
37598    # Try to remove the string !AS! from our list.
37599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37601      # If it failed, the variable was not from the command line. Ignore it,
37602      # but warn the user (except for BASH, which is always set by the calling BASH).
37603      if test "xAS" != xBASH; then
37604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37605$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37606      fi
37607      # Try to locate tool using the code snippet
37608      for ac_prog in as
37609do
37610  # Extract the first word of "$ac_prog", so it can be a program name with args.
37611set dummy $ac_prog; ac_word=$2
37612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37613$as_echo_n "checking for $ac_word... " >&6; }
37614if ${ac_cv_path_AS+:} false; then :
37615  $as_echo_n "(cached) " >&6
37616else
37617  case $AS in
37618  [\\/]* | ?:[\\/]*)
37619  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37620  ;;
37621  *)
37622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37623for as_dir in $PATH
37624do
37625  IFS=$as_save_IFS
37626  test -z "$as_dir" && as_dir=.
37627    for ac_exec_ext in '' $ac_executable_extensions; do
37628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37629    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37631    break 2
37632  fi
37633done
37634  done
37635IFS=$as_save_IFS
37636
37637  ;;
37638esac
37639fi
37640AS=$ac_cv_path_AS
37641if test -n "$AS"; then
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37643$as_echo "$AS" >&6; }
37644else
37645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37646$as_echo "no" >&6; }
37647fi
37648
37649
37650  test -n "$AS" && break
37651done
37652
37653    else
37654      # If it succeeded, then it was overridden by the user. We will use it
37655      # for the tool.
37656
37657      # First remove it from the list of overridden variables, so we can test
37658      # for unknown variables in the end.
37659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37660
37661      # Check if we try to supply an empty value
37662      if test "x$AS" = x; then
37663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37664$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37666$as_echo_n "checking for AS... " >&6; }
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37668$as_echo "disabled" >&6; }
37669      else
37670        # Check if the provided tool contains a complete path.
37671        tool_specified="$AS"
37672        tool_basename="${tool_specified##*/}"
37673        if test "x$tool_basename" = "x$tool_specified"; then
37674          # A command without a complete path is provided, search $PATH.
37675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37676$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37677          # Extract the first word of "$tool_basename", so it can be a program name with args.
37678set dummy $tool_basename; ac_word=$2
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680$as_echo_n "checking for $ac_word... " >&6; }
37681if ${ac_cv_path_AS+:} false; then :
37682  $as_echo_n "(cached) " >&6
37683else
37684  case $AS in
37685  [\\/]* | ?:[\\/]*)
37686  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37687  ;;
37688  *)
37689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37690for as_dir in $PATH
37691do
37692  IFS=$as_save_IFS
37693  test -z "$as_dir" && as_dir=.
37694    for ac_exec_ext in '' $ac_executable_extensions; do
37695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37696    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37698    break 2
37699  fi
37700done
37701  done
37702IFS=$as_save_IFS
37703
37704  ;;
37705esac
37706fi
37707AS=$ac_cv_path_AS
37708if test -n "$AS"; then
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37710$as_echo "$AS" >&6; }
37711else
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37713$as_echo "no" >&6; }
37714fi
37715
37716
37717          if test "x$AS" = x; then
37718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37719          fi
37720        else
37721          # Otherwise we believe it is a complete path. Use it as it is.
37722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37723$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37725$as_echo_n "checking for AS... " >&6; }
37726          if test ! -x "$tool_specified"; then
37727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37728$as_echo "not found" >&6; }
37729            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37730          fi
37731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37732$as_echo "$tool_specified" >&6; }
37733        fi
37734      fi
37735    fi
37736
37737  fi
37738
37739
37740
37741  # Only process if variable expands to non-empty
37742
37743  if test "x$AS" != x; then
37744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37745
37746  # First separate the path from the arguments. This will split at the first
37747  # space.
37748  complete="$AS"
37749  path="${complete%% *}"
37750  tmp="$complete EOL"
37751  arguments="${tmp#* }"
37752
37753  # Input might be given as Windows format, start by converting to
37754  # unix format.
37755  new_path=`$CYGPATH -u "$path"`
37756
37757  # Now try to locate executable using which
37758  new_path=`$WHICH "$new_path" 2> /dev/null`
37759  # bat and cmd files are not always considered executable in cygwin causing which
37760  # to not find them
37761  if test "x$new_path" = x \
37762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37764    new_path=`$CYGPATH -u "$path"`
37765  fi
37766  if test "x$new_path" = x; then
37767    # Oops. Which didn't find the executable.
37768    # The splitting of arguments from the executable at a space might have been incorrect,
37769    # since paths with space are more likely in Windows. Give it another try with the whole
37770    # argument.
37771    path="$complete"
37772    arguments="EOL"
37773    new_path=`$CYGPATH -u "$path"`
37774    new_path=`$WHICH "$new_path" 2> /dev/null`
37775    # bat and cmd files are not always considered executable in cygwin causing which
37776    # to not find them
37777    if test "x$new_path" = x \
37778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780      new_path=`$CYGPATH -u "$path"`
37781    fi
37782    if test "x$new_path" = x; then
37783      # It's still not found. Now this is an unrecoverable error.
37784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37785$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37786      has_space=`$ECHO "$complete" | $GREP " "`
37787      if test "x$has_space" != x; then
37788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37790      fi
37791      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37792    fi
37793  fi
37794
37795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37798  # "foo.exe" is OK but "foo" is an error.
37799  #
37800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37801  # It is also a way to make sure we got the proper file name for the real test later on.
37802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37803  if test "x$test_shortpath" = x; then
37804    # Short path failed, file does not exist as specified.
37805    # Try adding .exe or .cmd
37806    if test -f "${new_path}.exe"; then
37807      input_to_shortpath="${new_path}.exe"
37808    elif test -f "${new_path}.cmd"; then
37809      input_to_shortpath="${new_path}.cmd"
37810    else
37811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37812$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37815      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37816    fi
37817  else
37818    input_to_shortpath="$new_path"
37819  fi
37820
37821  # Call helper function which possibly converts this using DOS-style short mode.
37822  # If so, the updated path is stored in $new_path.
37823  new_path="$input_to_shortpath"
37824
37825  input_path="$input_to_shortpath"
37826  # Check if we need to convert this using DOS-style short mode. If the path
37827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37828  # take no chances and rewrite it.
37829  # Note: m4 eats our [], so we need to use [ and ] instead.
37830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37831  if test "x$has_forbidden_chars" != x; then
37832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37836      # Going to short mode and back again did indeed matter. Since short mode is
37837      # case insensitive, let's make it lowercase to improve readability.
37838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37839      # Now convert it back to Unix-style (cygpath)
37840      input_path=`$CYGPATH -u "$shortmode_path"`
37841      new_path="$input_path"
37842    fi
37843  fi
37844
37845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37846  if test "x$test_cygdrive_prefix" = x; then
37847    # As a simple fix, exclude /usr/bin since it's not a real path.
37848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37850      # a path prefixed by /cygdrive for fixpath to work.
37851      new_path="$CYGWIN_ROOT_PATH$input_path"
37852    fi
37853  fi
37854
37855  # remove trailing .exe if any
37856  new_path="${new_path/%.exe/}"
37857
37858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37859
37860  # First separate the path from the arguments. This will split at the first
37861  # space.
37862  complete="$AS"
37863  path="${complete%% *}"
37864  tmp="$complete EOL"
37865  arguments="${tmp#* }"
37866
37867  # Input might be given as Windows format, start by converting to
37868  # unix format.
37869  new_path="$path"
37870
37871  windows_path="$new_path"
37872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37873    unix_path=`$CYGPATH -u "$windows_path"`
37874    new_path="$unix_path"
37875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37877    new_path="$unix_path"
37878  fi
37879
37880
37881  # Now try to locate executable using which
37882  new_path=`$WHICH "$new_path" 2> /dev/null`
37883
37884  if test "x$new_path" = x; then
37885    # Oops. Which didn't find the executable.
37886    # The splitting of arguments from the executable at a space might have been incorrect,
37887    # since paths with space are more likely in Windows. Give it another try with the whole
37888    # argument.
37889    path="$complete"
37890    arguments="EOL"
37891    new_path="$path"
37892
37893  windows_path="$new_path"
37894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37895    unix_path=`$CYGPATH -u "$windows_path"`
37896    new_path="$unix_path"
37897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37899    new_path="$unix_path"
37900  fi
37901
37902
37903    new_path=`$WHICH "$new_path" 2> /dev/null`
37904    # bat and cmd files are not always considered executable in MSYS causing which
37905    # to not find them
37906    if test "x$new_path" = x \
37907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37909      new_path="$path"
37910
37911  windows_path="$new_path"
37912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37913    unix_path=`$CYGPATH -u "$windows_path"`
37914    new_path="$unix_path"
37915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37917    new_path="$unix_path"
37918  fi
37919
37920    fi
37921
37922    if test "x$new_path" = x; then
37923      # It's still not found. Now this is an unrecoverable error.
37924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37925$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37926      has_space=`$ECHO "$complete" | $GREP " "`
37927      if test "x$has_space" != x; then
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37930      fi
37931      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37932    fi
37933  fi
37934
37935  # Now new_path has a complete unix path to the binary
37936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37937    # Keep paths in /bin as-is, but remove trailing .exe if any
37938    new_path="${new_path/%.exe/}"
37939    # Do not save /bin paths to all_fixpath_prefixes!
37940  else
37941    # Not in mixed or Windows style, start by that.
37942    new_path=`cmd //c echo $new_path`
37943
37944  input_path="$new_path"
37945  # Check if we need to convert this using DOS-style short mode. If the path
37946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37947  # take no chances and rewrite it.
37948  # Note: m4 eats our [], so we need to use [ and ] instead.
37949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37950  if test "x$has_forbidden_chars" != x; then
37951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37953  fi
37954
37955    # Output is in $new_path
37956
37957  windows_path="$new_path"
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959    unix_path=`$CYGPATH -u "$windows_path"`
37960    new_path="$unix_path"
37961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37963    new_path="$unix_path"
37964  fi
37965
37966    # remove trailing .exe if any
37967    new_path="${new_path/%.exe/}"
37968
37969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37971  fi
37972
37973    else
37974      # We're on a unix platform. Hooray! :)
37975      # First separate the path from the arguments. This will split at the first
37976      # space.
37977      complete="$AS"
37978      path="${complete%% *}"
37979      tmp="$complete EOL"
37980      arguments="${tmp#* }"
37981
37982      # Cannot rely on the command "which" here since it doesn't always work.
37983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37984      if test -z "$is_absolute_path"; then
37985        # Path to executable is not absolute. Find it.
37986        IFS_save="$IFS"
37987        IFS=:
37988        for p in $PATH; do
37989          if test -f "$p/$path" && test -x "$p/$path"; then
37990            new_path="$p/$path"
37991            break
37992          fi
37993        done
37994        IFS="$IFS_save"
37995      else
37996        # This is an absolute path, we can use it without further modifications.
37997        new_path="$path"
37998      fi
37999
38000      if test "x$new_path" = x; then
38001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38002$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38003        has_space=`$ECHO "$complete" | $GREP " "`
38004        if test "x$has_space" != x; then
38005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38007        fi
38008        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38009      fi
38010    fi
38011
38012    # Now join together the path and the arguments once again
38013    if test "x$arguments" != xEOL; then
38014      new_complete="$new_path ${arguments% *}"
38015    else
38016      new_complete="$new_path"
38017    fi
38018
38019    if test "x$complete" != "x$new_complete"; then
38020      AS="$new_complete"
38021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38022$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38023    fi
38024  fi
38025
38026    if test "x$AS" = x; then
38027      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38028    fi
38029  else
38030    # FIXME: is this correct for microsoft?
38031    AS="$CC -c"
38032  fi
38033
38034
38035  #
38036  # Setup the archiver (AR)
38037  #
38038  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38039    # The corresponding ar tool is lib.exe (used to create static libraries)
38040    # Extract the first word of "lib", so it can be a program name with args.
38041set dummy lib; ac_word=$2
38042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38043$as_echo_n "checking for $ac_word... " >&6; }
38044if ${ac_cv_prog_AR+:} false; then :
38045  $as_echo_n "(cached) " >&6
38046else
38047  if test -n "$AR"; then
38048  ac_cv_prog_AR="$AR" # Let the user override the test.
38049else
38050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38051for as_dir in $PATH
38052do
38053  IFS=$as_save_IFS
38054  test -z "$as_dir" && as_dir=.
38055    for ac_exec_ext in '' $ac_executable_extensions; do
38056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38057    ac_cv_prog_AR="lib"
38058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38059    break 2
38060  fi
38061done
38062  done
38063IFS=$as_save_IFS
38064
38065fi
38066fi
38067AR=$ac_cv_prog_AR
38068if test -n "$AR"; then
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38070$as_echo "$AR" >&6; }
38071else
38072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38073$as_echo "no" >&6; }
38074fi
38075
38076
38077  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38078
38079
38080  # Publish this variable in the help.
38081
38082
38083  if [ -z "${AR+x}" ]; then
38084    # The variable is not set by user, try to locate tool using the code snippet
38085    if test -n "$ac_tool_prefix"; then
38086  for ac_prog in ar gcc-ar
38087  do
38088    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38091$as_echo_n "checking for $ac_word... " >&6; }
38092if ${ac_cv_prog_AR+:} false; then :
38093  $as_echo_n "(cached) " >&6
38094else
38095  if test -n "$AR"; then
38096  ac_cv_prog_AR="$AR" # Let the user override the test.
38097else
38098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38099for as_dir in $PATH
38100do
38101  IFS=$as_save_IFS
38102  test -z "$as_dir" && as_dir=.
38103    for ac_exec_ext in '' $ac_executable_extensions; do
38104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38105    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38107    break 2
38108  fi
38109done
38110  done
38111IFS=$as_save_IFS
38112
38113fi
38114fi
38115AR=$ac_cv_prog_AR
38116if test -n "$AR"; then
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38118$as_echo "$AR" >&6; }
38119else
38120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38121$as_echo "no" >&6; }
38122fi
38123
38124
38125    test -n "$AR" && break
38126  done
38127fi
38128if test -z "$AR"; then
38129  ac_ct_AR=$AR
38130  for ac_prog in ar gcc-ar
38131do
38132  # Extract the first word of "$ac_prog", so it can be a program name with args.
38133set dummy $ac_prog; ac_word=$2
38134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38135$as_echo_n "checking for $ac_word... " >&6; }
38136if ${ac_cv_prog_ac_ct_AR+:} false; then :
38137  $as_echo_n "(cached) " >&6
38138else
38139  if test -n "$ac_ct_AR"; then
38140  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38141else
38142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38143for as_dir in $PATH
38144do
38145  IFS=$as_save_IFS
38146  test -z "$as_dir" && as_dir=.
38147    for ac_exec_ext in '' $ac_executable_extensions; do
38148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38149    ac_cv_prog_ac_ct_AR="$ac_prog"
38150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38151    break 2
38152  fi
38153done
38154  done
38155IFS=$as_save_IFS
38156
38157fi
38158fi
38159ac_ct_AR=$ac_cv_prog_ac_ct_AR
38160if test -n "$ac_ct_AR"; then
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38162$as_echo "$ac_ct_AR" >&6; }
38163else
38164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38165$as_echo "no" >&6; }
38166fi
38167
38168
38169  test -n "$ac_ct_AR" && break
38170done
38171
38172  if test "x$ac_ct_AR" = x; then
38173    AR=""
38174  else
38175    case $cross_compiling:$ac_tool_warned in
38176yes:)
38177{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38178$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38179ac_tool_warned=yes ;;
38180esac
38181    AR=$ac_ct_AR
38182  fi
38183fi
38184
38185  else
38186    # The variable is set, but is it from the command line or the environment?
38187
38188    # Try to remove the string !AR! from our list.
38189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38191      # If it failed, the variable was not from the command line. Ignore it,
38192      # but warn the user (except for BASH, which is always set by the calling BASH).
38193      if test "xAR" != xBASH; then
38194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38195$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38196      fi
38197      # Try to locate tool using the code snippet
38198      if test -n "$ac_tool_prefix"; then
38199  for ac_prog in ar gcc-ar
38200  do
38201    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38202set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38204$as_echo_n "checking for $ac_word... " >&6; }
38205if ${ac_cv_prog_AR+:} false; then :
38206  $as_echo_n "(cached) " >&6
38207else
38208  if test -n "$AR"; then
38209  ac_cv_prog_AR="$AR" # Let the user override the test.
38210else
38211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38212for as_dir in $PATH
38213do
38214  IFS=$as_save_IFS
38215  test -z "$as_dir" && as_dir=.
38216    for ac_exec_ext in '' $ac_executable_extensions; do
38217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38218    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38220    break 2
38221  fi
38222done
38223  done
38224IFS=$as_save_IFS
38225
38226fi
38227fi
38228AR=$ac_cv_prog_AR
38229if test -n "$AR"; then
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38231$as_echo "$AR" >&6; }
38232else
38233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38234$as_echo "no" >&6; }
38235fi
38236
38237
38238    test -n "$AR" && break
38239  done
38240fi
38241if test -z "$AR"; then
38242  ac_ct_AR=$AR
38243  for ac_prog in ar gcc-ar
38244do
38245  # Extract the first word of "$ac_prog", so it can be a program name with args.
38246set dummy $ac_prog; ac_word=$2
38247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38248$as_echo_n "checking for $ac_word... " >&6; }
38249if ${ac_cv_prog_ac_ct_AR+:} false; then :
38250  $as_echo_n "(cached) " >&6
38251else
38252  if test -n "$ac_ct_AR"; then
38253  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38254else
38255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38256for as_dir in $PATH
38257do
38258  IFS=$as_save_IFS
38259  test -z "$as_dir" && as_dir=.
38260    for ac_exec_ext in '' $ac_executable_extensions; do
38261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38262    ac_cv_prog_ac_ct_AR="$ac_prog"
38263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38264    break 2
38265  fi
38266done
38267  done
38268IFS=$as_save_IFS
38269
38270fi
38271fi
38272ac_ct_AR=$ac_cv_prog_ac_ct_AR
38273if test -n "$ac_ct_AR"; then
38274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38275$as_echo "$ac_ct_AR" >&6; }
38276else
38277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38278$as_echo "no" >&6; }
38279fi
38280
38281
38282  test -n "$ac_ct_AR" && break
38283done
38284
38285  if test "x$ac_ct_AR" = x; then
38286    AR=""
38287  else
38288    case $cross_compiling:$ac_tool_warned in
38289yes:)
38290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38292ac_tool_warned=yes ;;
38293esac
38294    AR=$ac_ct_AR
38295  fi
38296fi
38297
38298    else
38299      # If it succeeded, then it was overridden by the user. We will use it
38300      # for the tool.
38301
38302      # First remove it from the list of overridden variables, so we can test
38303      # for unknown variables in the end.
38304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38305
38306      # Check if we try to supply an empty value
38307      if test "x$AR" = x; then
38308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38309$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38311$as_echo_n "checking for AR... " >&6; }
38312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38313$as_echo "disabled" >&6; }
38314      else
38315        # Check if the provided tool contains a complete path.
38316        tool_specified="$AR"
38317        tool_basename="${tool_specified##*/}"
38318        if test "x$tool_basename" = "x$tool_specified"; then
38319          # A command without a complete path is provided, search $PATH.
38320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38321$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38322          # Extract the first word of "$tool_basename", so it can be a program name with args.
38323set dummy $tool_basename; ac_word=$2
38324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38325$as_echo_n "checking for $ac_word... " >&6; }
38326if ${ac_cv_path_AR+:} false; then :
38327  $as_echo_n "(cached) " >&6
38328else
38329  case $AR in
38330  [\\/]* | ?:[\\/]*)
38331  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38332  ;;
38333  *)
38334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38335for as_dir in $PATH
38336do
38337  IFS=$as_save_IFS
38338  test -z "$as_dir" && as_dir=.
38339    for ac_exec_ext in '' $ac_executable_extensions; do
38340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38341    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38343    break 2
38344  fi
38345done
38346  done
38347IFS=$as_save_IFS
38348
38349  ;;
38350esac
38351fi
38352AR=$ac_cv_path_AR
38353if test -n "$AR"; then
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38355$as_echo "$AR" >&6; }
38356else
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38358$as_echo "no" >&6; }
38359fi
38360
38361
38362          if test "x$AR" = x; then
38363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38364          fi
38365        else
38366          # Otherwise we believe it is a complete path. Use it as it is.
38367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38368$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38370$as_echo_n "checking for AR... " >&6; }
38371          if test ! -x "$tool_specified"; then
38372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38373$as_echo "not found" >&6; }
38374            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38375          fi
38376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38377$as_echo "$tool_specified" >&6; }
38378        fi
38379      fi
38380    fi
38381
38382  fi
38383
38384
38385  else
38386
38387
38388  # Publish this variable in the help.
38389
38390
38391  if [ -z "${AR+x}" ]; then
38392    # The variable is not set by user, try to locate tool using the code snippet
38393    if test -n "$ac_tool_prefix"; then
38394  for ac_prog in ar
38395  do
38396    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38397set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38399$as_echo_n "checking for $ac_word... " >&6; }
38400if ${ac_cv_prog_AR+:} false; then :
38401  $as_echo_n "(cached) " >&6
38402else
38403  if test -n "$AR"; then
38404  ac_cv_prog_AR="$AR" # Let the user override the test.
38405else
38406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38407for as_dir in $PATH
38408do
38409  IFS=$as_save_IFS
38410  test -z "$as_dir" && as_dir=.
38411    for ac_exec_ext in '' $ac_executable_extensions; do
38412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38413    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38415    break 2
38416  fi
38417done
38418  done
38419IFS=$as_save_IFS
38420
38421fi
38422fi
38423AR=$ac_cv_prog_AR
38424if test -n "$AR"; then
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38426$as_echo "$AR" >&6; }
38427else
38428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38429$as_echo "no" >&6; }
38430fi
38431
38432
38433    test -n "$AR" && break
38434  done
38435fi
38436if test -z "$AR"; then
38437  ac_ct_AR=$AR
38438  for ac_prog in ar
38439do
38440  # Extract the first word of "$ac_prog", so it can be a program name with args.
38441set dummy $ac_prog; ac_word=$2
38442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38443$as_echo_n "checking for $ac_word... " >&6; }
38444if ${ac_cv_prog_ac_ct_AR+:} false; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  if test -n "$ac_ct_AR"; then
38448  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38449else
38450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38451for as_dir in $PATH
38452do
38453  IFS=$as_save_IFS
38454  test -z "$as_dir" && as_dir=.
38455    for ac_exec_ext in '' $ac_executable_extensions; do
38456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38457    ac_cv_prog_ac_ct_AR="$ac_prog"
38458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38459    break 2
38460  fi
38461done
38462  done
38463IFS=$as_save_IFS
38464
38465fi
38466fi
38467ac_ct_AR=$ac_cv_prog_ac_ct_AR
38468if test -n "$ac_ct_AR"; then
38469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38470$as_echo "$ac_ct_AR" >&6; }
38471else
38472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38473$as_echo "no" >&6; }
38474fi
38475
38476
38477  test -n "$ac_ct_AR" && break
38478done
38479
38480  if test "x$ac_ct_AR" = x; then
38481    AR=""
38482  else
38483    case $cross_compiling:$ac_tool_warned in
38484yes:)
38485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38487ac_tool_warned=yes ;;
38488esac
38489    AR=$ac_ct_AR
38490  fi
38491fi
38492
38493  else
38494    # The variable is set, but is it from the command line or the environment?
38495
38496    # Try to remove the string !AR! from our list.
38497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38499      # If it failed, the variable was not from the command line. Ignore it,
38500      # but warn the user (except for BASH, which is always set by the calling BASH).
38501      if test "xAR" != xBASH; then
38502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38503$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38504      fi
38505      # Try to locate tool using the code snippet
38506      if test -n "$ac_tool_prefix"; then
38507  for ac_prog in ar
38508  do
38509    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38512$as_echo_n "checking for $ac_word... " >&6; }
38513if ${ac_cv_prog_AR+:} false; then :
38514  $as_echo_n "(cached) " >&6
38515else
38516  if test -n "$AR"; then
38517  ac_cv_prog_AR="$AR" # Let the user override the test.
38518else
38519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38520for as_dir in $PATH
38521do
38522  IFS=$as_save_IFS
38523  test -z "$as_dir" && as_dir=.
38524    for ac_exec_ext in '' $ac_executable_extensions; do
38525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38526    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38528    break 2
38529  fi
38530done
38531  done
38532IFS=$as_save_IFS
38533
38534fi
38535fi
38536AR=$ac_cv_prog_AR
38537if test -n "$AR"; then
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38539$as_echo "$AR" >&6; }
38540else
38541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38542$as_echo "no" >&6; }
38543fi
38544
38545
38546    test -n "$AR" && break
38547  done
38548fi
38549if test -z "$AR"; then
38550  ac_ct_AR=$AR
38551  for ac_prog in ar
38552do
38553  # Extract the first word of "$ac_prog", so it can be a program name with args.
38554set dummy $ac_prog; ac_word=$2
38555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38556$as_echo_n "checking for $ac_word... " >&6; }
38557if ${ac_cv_prog_ac_ct_AR+:} false; then :
38558  $as_echo_n "(cached) " >&6
38559else
38560  if test -n "$ac_ct_AR"; then
38561  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38562else
38563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38564for as_dir in $PATH
38565do
38566  IFS=$as_save_IFS
38567  test -z "$as_dir" && as_dir=.
38568    for ac_exec_ext in '' $ac_executable_extensions; do
38569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38570    ac_cv_prog_ac_ct_AR="$ac_prog"
38571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38572    break 2
38573  fi
38574done
38575  done
38576IFS=$as_save_IFS
38577
38578fi
38579fi
38580ac_ct_AR=$ac_cv_prog_ac_ct_AR
38581if test -n "$ac_ct_AR"; then
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38583$as_echo "$ac_ct_AR" >&6; }
38584else
38585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38586$as_echo "no" >&6; }
38587fi
38588
38589
38590  test -n "$ac_ct_AR" && break
38591done
38592
38593  if test "x$ac_ct_AR" = x; then
38594    AR=""
38595  else
38596    case $cross_compiling:$ac_tool_warned in
38597yes:)
38598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38600ac_tool_warned=yes ;;
38601esac
38602    AR=$ac_ct_AR
38603  fi
38604fi
38605
38606    else
38607      # If it succeeded, then it was overridden by the user. We will use it
38608      # for the tool.
38609
38610      # First remove it from the list of overridden variables, so we can test
38611      # for unknown variables in the end.
38612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38613
38614      # Check if we try to supply an empty value
38615      if test "x$AR" = x; then
38616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38617$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38619$as_echo_n "checking for AR... " >&6; }
38620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38621$as_echo "disabled" >&6; }
38622      else
38623        # Check if the provided tool contains a complete path.
38624        tool_specified="$AR"
38625        tool_basename="${tool_specified##*/}"
38626        if test "x$tool_basename" = "x$tool_specified"; then
38627          # A command without a complete path is provided, search $PATH.
38628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38629$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38630          # Extract the first word of "$tool_basename", so it can be a program name with args.
38631set dummy $tool_basename; ac_word=$2
38632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38633$as_echo_n "checking for $ac_word... " >&6; }
38634if ${ac_cv_path_AR+:} false; then :
38635  $as_echo_n "(cached) " >&6
38636else
38637  case $AR in
38638  [\\/]* | ?:[\\/]*)
38639  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38640  ;;
38641  *)
38642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38643for as_dir in $PATH
38644do
38645  IFS=$as_save_IFS
38646  test -z "$as_dir" && as_dir=.
38647    for ac_exec_ext in '' $ac_executable_extensions; do
38648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38649    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38651    break 2
38652  fi
38653done
38654  done
38655IFS=$as_save_IFS
38656
38657  ;;
38658esac
38659fi
38660AR=$ac_cv_path_AR
38661if test -n "$AR"; then
38662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38663$as_echo "$AR" >&6; }
38664else
38665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38666$as_echo "no" >&6; }
38667fi
38668
38669
38670          if test "x$AR" = x; then
38671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38672          fi
38673        else
38674          # Otherwise we believe it is a complete path. Use it as it is.
38675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38676$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38678$as_echo_n "checking for AR... " >&6; }
38679          if test ! -x "$tool_specified"; then
38680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38681$as_echo "not found" >&6; }
38682            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38683          fi
38684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38685$as_echo "$tool_specified" >&6; }
38686        fi
38687      fi
38688    fi
38689
38690  fi
38691
38692
38693  fi
38694
38695  # Only process if variable expands to non-empty
38696
38697  if test "x$AR" != x; then
38698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38699
38700  # First separate the path from the arguments. This will split at the first
38701  # space.
38702  complete="$AR"
38703  path="${complete%% *}"
38704  tmp="$complete EOL"
38705  arguments="${tmp#* }"
38706
38707  # Input might be given as Windows format, start by converting to
38708  # unix format.
38709  new_path=`$CYGPATH -u "$path"`
38710
38711  # Now try to locate executable using which
38712  new_path=`$WHICH "$new_path" 2> /dev/null`
38713  # bat and cmd files are not always considered executable in cygwin causing which
38714  # to not find them
38715  if test "x$new_path" = x \
38716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38718    new_path=`$CYGPATH -u "$path"`
38719  fi
38720  if test "x$new_path" = x; then
38721    # Oops. Which didn't find the executable.
38722    # The splitting of arguments from the executable at a space might have been incorrect,
38723    # since paths with space are more likely in Windows. Give it another try with the whole
38724    # argument.
38725    path="$complete"
38726    arguments="EOL"
38727    new_path=`$CYGPATH -u "$path"`
38728    new_path=`$WHICH "$new_path" 2> /dev/null`
38729    # bat and cmd files are not always considered executable in cygwin causing which
38730    # to not find them
38731    if test "x$new_path" = x \
38732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38734      new_path=`$CYGPATH -u "$path"`
38735    fi
38736    if test "x$new_path" = x; then
38737      # It's still not found. Now this is an unrecoverable error.
38738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38739$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38740      has_space=`$ECHO "$complete" | $GREP " "`
38741      if test "x$has_space" != x; then
38742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38744      fi
38745      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38746    fi
38747  fi
38748
38749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38752  # "foo.exe" is OK but "foo" is an error.
38753  #
38754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38755  # It is also a way to make sure we got the proper file name for the real test later on.
38756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38757  if test "x$test_shortpath" = x; then
38758    # Short path failed, file does not exist as specified.
38759    # Try adding .exe or .cmd
38760    if test -f "${new_path}.exe"; then
38761      input_to_shortpath="${new_path}.exe"
38762    elif test -f "${new_path}.cmd"; then
38763      input_to_shortpath="${new_path}.cmd"
38764    else
38765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38766$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38769      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38770    fi
38771  else
38772    input_to_shortpath="$new_path"
38773  fi
38774
38775  # Call helper function which possibly converts this using DOS-style short mode.
38776  # If so, the updated path is stored in $new_path.
38777  new_path="$input_to_shortpath"
38778
38779  input_path="$input_to_shortpath"
38780  # Check if we need to convert this using DOS-style short mode. If the path
38781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38782  # take no chances and rewrite it.
38783  # Note: m4 eats our [], so we need to use [ and ] instead.
38784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38785  if test "x$has_forbidden_chars" != x; then
38786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38790      # Going to short mode and back again did indeed matter. Since short mode is
38791      # case insensitive, let's make it lowercase to improve readability.
38792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38793      # Now convert it back to Unix-style (cygpath)
38794      input_path=`$CYGPATH -u "$shortmode_path"`
38795      new_path="$input_path"
38796    fi
38797  fi
38798
38799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38800  if test "x$test_cygdrive_prefix" = x; then
38801    # As a simple fix, exclude /usr/bin since it's not a real path.
38802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38804      # a path prefixed by /cygdrive for fixpath to work.
38805      new_path="$CYGWIN_ROOT_PATH$input_path"
38806    fi
38807  fi
38808
38809  # remove trailing .exe if any
38810  new_path="${new_path/%.exe/}"
38811
38812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813
38814  # First separate the path from the arguments. This will split at the first
38815  # space.
38816  complete="$AR"
38817  path="${complete%% *}"
38818  tmp="$complete EOL"
38819  arguments="${tmp#* }"
38820
38821  # Input might be given as Windows format, start by converting to
38822  # unix format.
38823  new_path="$path"
38824
38825  windows_path="$new_path"
38826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38827    unix_path=`$CYGPATH -u "$windows_path"`
38828    new_path="$unix_path"
38829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38831    new_path="$unix_path"
38832  fi
38833
38834
38835  # Now try to locate executable using which
38836  new_path=`$WHICH "$new_path" 2> /dev/null`
38837
38838  if test "x$new_path" = x; then
38839    # Oops. Which didn't find the executable.
38840    # The splitting of arguments from the executable at a space might have been incorrect,
38841    # since paths with space are more likely in Windows. Give it another try with the whole
38842    # argument.
38843    path="$complete"
38844    arguments="EOL"
38845    new_path="$path"
38846
38847  windows_path="$new_path"
38848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38849    unix_path=`$CYGPATH -u "$windows_path"`
38850    new_path="$unix_path"
38851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38853    new_path="$unix_path"
38854  fi
38855
38856
38857    new_path=`$WHICH "$new_path" 2> /dev/null`
38858    # bat and cmd files are not always considered executable in MSYS causing which
38859    # to not find them
38860    if test "x$new_path" = x \
38861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38863      new_path="$path"
38864
38865  windows_path="$new_path"
38866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38867    unix_path=`$CYGPATH -u "$windows_path"`
38868    new_path="$unix_path"
38869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38871    new_path="$unix_path"
38872  fi
38873
38874    fi
38875
38876    if test "x$new_path" = x; then
38877      # It's still not found. Now this is an unrecoverable error.
38878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38879$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38880      has_space=`$ECHO "$complete" | $GREP " "`
38881      if test "x$has_space" != x; then
38882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38884      fi
38885      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38886    fi
38887  fi
38888
38889  # Now new_path has a complete unix path to the binary
38890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38891    # Keep paths in /bin as-is, but remove trailing .exe if any
38892    new_path="${new_path/%.exe/}"
38893    # Do not save /bin paths to all_fixpath_prefixes!
38894  else
38895    # Not in mixed or Windows style, start by that.
38896    new_path=`cmd //c echo $new_path`
38897
38898  input_path="$new_path"
38899  # Check if we need to convert this using DOS-style short mode. If the path
38900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38901  # take no chances and rewrite it.
38902  # Note: m4 eats our [], so we need to use [ and ] instead.
38903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38904  if test "x$has_forbidden_chars" != x; then
38905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38907  fi
38908
38909    # Output is in $new_path
38910
38911  windows_path="$new_path"
38912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913    unix_path=`$CYGPATH -u "$windows_path"`
38914    new_path="$unix_path"
38915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38917    new_path="$unix_path"
38918  fi
38919
38920    # remove trailing .exe if any
38921    new_path="${new_path/%.exe/}"
38922
38923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38925  fi
38926
38927    else
38928      # We're on a unix platform. Hooray! :)
38929      # First separate the path from the arguments. This will split at the first
38930      # space.
38931      complete="$AR"
38932      path="${complete%% *}"
38933      tmp="$complete EOL"
38934      arguments="${tmp#* }"
38935
38936      # Cannot rely on the command "which" here since it doesn't always work.
38937      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38938      if test -z "$is_absolute_path"; then
38939        # Path to executable is not absolute. Find it.
38940        IFS_save="$IFS"
38941        IFS=:
38942        for p in $PATH; do
38943          if test -f "$p/$path" && test -x "$p/$path"; then
38944            new_path="$p/$path"
38945            break
38946          fi
38947        done
38948        IFS="$IFS_save"
38949      else
38950        # This is an absolute path, we can use it without further modifications.
38951        new_path="$path"
38952      fi
38953
38954      if test "x$new_path" = x; then
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38956$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38957        has_space=`$ECHO "$complete" | $GREP " "`
38958        if test "x$has_space" != x; then
38959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38961        fi
38962        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38963      fi
38964    fi
38965
38966    # Now join together the path and the arguments once again
38967    if test "x$arguments" != xEOL; then
38968      new_complete="$new_path ${arguments% *}"
38969    else
38970      new_complete="$new_path"
38971    fi
38972
38973    if test "x$complete" != "x$new_complete"; then
38974      AR="$new_complete"
38975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38976$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38977    fi
38978  fi
38979
38980
38981
38982  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38983
38984
38985  # Publish this variable in the help.
38986
38987
38988  if [ -z "${LIPO+x}" ]; then
38989    # The variable is not set by user, try to locate tool using the code snippet
38990    for ac_prog in lipo
38991do
38992  # Extract the first word of "$ac_prog", so it can be a program name with args.
38993set dummy $ac_prog; ac_word=$2
38994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38995$as_echo_n "checking for $ac_word... " >&6; }
38996if ${ac_cv_path_LIPO+:} false; then :
38997  $as_echo_n "(cached) " >&6
38998else
38999  case $LIPO in
39000  [\\/]* | ?:[\\/]*)
39001  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39002  ;;
39003  *)
39004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39005for as_dir in $PATH
39006do
39007  IFS=$as_save_IFS
39008  test -z "$as_dir" && as_dir=.
39009    for ac_exec_ext in '' $ac_executable_extensions; do
39010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39011    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39013    break 2
39014  fi
39015done
39016  done
39017IFS=$as_save_IFS
39018
39019  ;;
39020esac
39021fi
39022LIPO=$ac_cv_path_LIPO
39023if test -n "$LIPO"; then
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39025$as_echo "$LIPO" >&6; }
39026else
39027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39028$as_echo "no" >&6; }
39029fi
39030
39031
39032  test -n "$LIPO" && break
39033done
39034
39035  else
39036    # The variable is set, but is it from the command line or the environment?
39037
39038    # Try to remove the string !LIPO! from our list.
39039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39041      # If it failed, the variable was not from the command line. Ignore it,
39042      # but warn the user (except for BASH, which is always set by the calling BASH).
39043      if test "xLIPO" != xBASH; then
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39045$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39046      fi
39047      # Try to locate tool using the code snippet
39048      for ac_prog in lipo
39049do
39050  # Extract the first word of "$ac_prog", so it can be a program name with args.
39051set dummy $ac_prog; ac_word=$2
39052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39053$as_echo_n "checking for $ac_word... " >&6; }
39054if ${ac_cv_path_LIPO+:} false; then :
39055  $as_echo_n "(cached) " >&6
39056else
39057  case $LIPO in
39058  [\\/]* | ?:[\\/]*)
39059  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39060  ;;
39061  *)
39062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39063for as_dir in $PATH
39064do
39065  IFS=$as_save_IFS
39066  test -z "$as_dir" && as_dir=.
39067    for ac_exec_ext in '' $ac_executable_extensions; do
39068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39069    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39071    break 2
39072  fi
39073done
39074  done
39075IFS=$as_save_IFS
39076
39077  ;;
39078esac
39079fi
39080LIPO=$ac_cv_path_LIPO
39081if test -n "$LIPO"; then
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39083$as_echo "$LIPO" >&6; }
39084else
39085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39086$as_echo "no" >&6; }
39087fi
39088
39089
39090  test -n "$LIPO" && break
39091done
39092
39093    else
39094      # If it succeeded, then it was overridden by the user. We will use it
39095      # for the tool.
39096
39097      # First remove it from the list of overridden variables, so we can test
39098      # for unknown variables in the end.
39099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39100
39101      # Check if we try to supply an empty value
39102      if test "x$LIPO" = x; then
39103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39104$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39106$as_echo_n "checking for LIPO... " >&6; }
39107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39108$as_echo "disabled" >&6; }
39109      else
39110        # Check if the provided tool contains a complete path.
39111        tool_specified="$LIPO"
39112        tool_basename="${tool_specified##*/}"
39113        if test "x$tool_basename" = "x$tool_specified"; then
39114          # A command without a complete path is provided, search $PATH.
39115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39116$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39117          # Extract the first word of "$tool_basename", so it can be a program name with args.
39118set dummy $tool_basename; ac_word=$2
39119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39120$as_echo_n "checking for $ac_word... " >&6; }
39121if ${ac_cv_path_LIPO+:} false; then :
39122  $as_echo_n "(cached) " >&6
39123else
39124  case $LIPO in
39125  [\\/]* | ?:[\\/]*)
39126  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39127  ;;
39128  *)
39129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39130for as_dir in $PATH
39131do
39132  IFS=$as_save_IFS
39133  test -z "$as_dir" && as_dir=.
39134    for ac_exec_ext in '' $ac_executable_extensions; do
39135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39136    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39138    break 2
39139  fi
39140done
39141  done
39142IFS=$as_save_IFS
39143
39144  ;;
39145esac
39146fi
39147LIPO=$ac_cv_path_LIPO
39148if test -n "$LIPO"; then
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39150$as_echo "$LIPO" >&6; }
39151else
39152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39153$as_echo "no" >&6; }
39154fi
39155
39156
39157          if test "x$LIPO" = x; then
39158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39159          fi
39160        else
39161          # Otherwise we believe it is a complete path. Use it as it is.
39162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39163$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39165$as_echo_n "checking for LIPO... " >&6; }
39166          if test ! -x "$tool_specified"; then
39167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39168$as_echo "not found" >&6; }
39169            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39170          fi
39171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39172$as_echo "$tool_specified" >&6; }
39173        fi
39174      fi
39175    fi
39176
39177  fi
39178
39179
39180
39181  # Only process if variable expands to non-empty
39182
39183  if test "x$LIPO" != x; then
39184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39185
39186  # First separate the path from the arguments. This will split at the first
39187  # space.
39188  complete="$LIPO"
39189  path="${complete%% *}"
39190  tmp="$complete EOL"
39191  arguments="${tmp#* }"
39192
39193  # Input might be given as Windows format, start by converting to
39194  # unix format.
39195  new_path=`$CYGPATH -u "$path"`
39196
39197  # Now try to locate executable using which
39198  new_path=`$WHICH "$new_path" 2> /dev/null`
39199  # bat and cmd files are not always considered executable in cygwin causing which
39200  # to not find them
39201  if test "x$new_path" = x \
39202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39204    new_path=`$CYGPATH -u "$path"`
39205  fi
39206  if test "x$new_path" = x; then
39207    # Oops. Which didn't find the executable.
39208    # The splitting of arguments from the executable at a space might have been incorrect,
39209    # since paths with space are more likely in Windows. Give it another try with the whole
39210    # argument.
39211    path="$complete"
39212    arguments="EOL"
39213    new_path=`$CYGPATH -u "$path"`
39214    new_path=`$WHICH "$new_path" 2> /dev/null`
39215    # bat and cmd files are not always considered executable in cygwin causing which
39216    # to not find them
39217    if test "x$new_path" = x \
39218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39220      new_path=`$CYGPATH -u "$path"`
39221    fi
39222    if test "x$new_path" = x; then
39223      # It's still not found. Now this is an unrecoverable error.
39224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39225$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39226      has_space=`$ECHO "$complete" | $GREP " "`
39227      if test "x$has_space" != x; then
39228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39230      fi
39231      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39232    fi
39233  fi
39234
39235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39238  # "foo.exe" is OK but "foo" is an error.
39239  #
39240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39241  # It is also a way to make sure we got the proper file name for the real test later on.
39242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39243  if test "x$test_shortpath" = x; then
39244    # Short path failed, file does not exist as specified.
39245    # Try adding .exe or .cmd
39246    if test -f "${new_path}.exe"; then
39247      input_to_shortpath="${new_path}.exe"
39248    elif test -f "${new_path}.cmd"; then
39249      input_to_shortpath="${new_path}.cmd"
39250    else
39251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39252$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39255      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39256    fi
39257  else
39258    input_to_shortpath="$new_path"
39259  fi
39260
39261  # Call helper function which possibly converts this using DOS-style short mode.
39262  # If so, the updated path is stored in $new_path.
39263  new_path="$input_to_shortpath"
39264
39265  input_path="$input_to_shortpath"
39266  # Check if we need to convert this using DOS-style short mode. If the path
39267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39268  # take no chances and rewrite it.
39269  # Note: m4 eats our [], so we need to use [ and ] instead.
39270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39271  if test "x$has_forbidden_chars" != x; then
39272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39276      # Going to short mode and back again did indeed matter. Since short mode is
39277      # case insensitive, let's make it lowercase to improve readability.
39278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39279      # Now convert it back to Unix-style (cygpath)
39280      input_path=`$CYGPATH -u "$shortmode_path"`
39281      new_path="$input_path"
39282    fi
39283  fi
39284
39285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39286  if test "x$test_cygdrive_prefix" = x; then
39287    # As a simple fix, exclude /usr/bin since it's not a real path.
39288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39290      # a path prefixed by /cygdrive for fixpath to work.
39291      new_path="$CYGWIN_ROOT_PATH$input_path"
39292    fi
39293  fi
39294
39295  # remove trailing .exe if any
39296  new_path="${new_path/%.exe/}"
39297
39298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39299
39300  # First separate the path from the arguments. This will split at the first
39301  # space.
39302  complete="$LIPO"
39303  path="${complete%% *}"
39304  tmp="$complete EOL"
39305  arguments="${tmp#* }"
39306
39307  # Input might be given as Windows format, start by converting to
39308  # unix format.
39309  new_path="$path"
39310
39311  windows_path="$new_path"
39312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39313    unix_path=`$CYGPATH -u "$windows_path"`
39314    new_path="$unix_path"
39315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39317    new_path="$unix_path"
39318  fi
39319
39320
39321  # Now try to locate executable using which
39322  new_path=`$WHICH "$new_path" 2> /dev/null`
39323
39324  if test "x$new_path" = x; then
39325    # Oops. Which didn't find the executable.
39326    # The splitting of arguments from the executable at a space might have been incorrect,
39327    # since paths with space are more likely in Windows. Give it another try with the whole
39328    # argument.
39329    path="$complete"
39330    arguments="EOL"
39331    new_path="$path"
39332
39333  windows_path="$new_path"
39334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39335    unix_path=`$CYGPATH -u "$windows_path"`
39336    new_path="$unix_path"
39337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39339    new_path="$unix_path"
39340  fi
39341
39342
39343    new_path=`$WHICH "$new_path" 2> /dev/null`
39344    # bat and cmd files are not always considered executable in MSYS causing which
39345    # to not find them
39346    if test "x$new_path" = x \
39347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39349      new_path="$path"
39350
39351  windows_path="$new_path"
39352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39353    unix_path=`$CYGPATH -u "$windows_path"`
39354    new_path="$unix_path"
39355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39357    new_path="$unix_path"
39358  fi
39359
39360    fi
39361
39362    if test "x$new_path" = x; then
39363      # It's still not found. Now this is an unrecoverable error.
39364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39365$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39366      has_space=`$ECHO "$complete" | $GREP " "`
39367      if test "x$has_space" != x; then
39368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39370      fi
39371      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39372    fi
39373  fi
39374
39375  # Now new_path has a complete unix path to the binary
39376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39377    # Keep paths in /bin as-is, but remove trailing .exe if any
39378    new_path="${new_path/%.exe/}"
39379    # Do not save /bin paths to all_fixpath_prefixes!
39380  else
39381    # Not in mixed or Windows style, start by that.
39382    new_path=`cmd //c echo $new_path`
39383
39384  input_path="$new_path"
39385  # Check if we need to convert this using DOS-style short mode. If the path
39386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39387  # take no chances and rewrite it.
39388  # Note: m4 eats our [], so we need to use [ and ] instead.
39389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39390  if test "x$has_forbidden_chars" != x; then
39391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39393  fi
39394
39395    # Output is in $new_path
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406    # remove trailing .exe if any
39407    new_path="${new_path/%.exe/}"
39408
39409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39411  fi
39412
39413    else
39414      # We're on a unix platform. Hooray! :)
39415      # First separate the path from the arguments. This will split at the first
39416      # space.
39417      complete="$LIPO"
39418      path="${complete%% *}"
39419      tmp="$complete EOL"
39420      arguments="${tmp#* }"
39421
39422      # Cannot rely on the command "which" here since it doesn't always work.
39423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39424      if test -z "$is_absolute_path"; then
39425        # Path to executable is not absolute. Find it.
39426        IFS_save="$IFS"
39427        IFS=:
39428        for p in $PATH; do
39429          if test -f "$p/$path" && test -x "$p/$path"; then
39430            new_path="$p/$path"
39431            break
39432          fi
39433        done
39434        IFS="$IFS_save"
39435      else
39436        # This is an absolute path, we can use it without further modifications.
39437        new_path="$path"
39438      fi
39439
39440      if test "x$new_path" = x; then
39441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39442$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39443        has_space=`$ECHO "$complete" | $GREP " "`
39444        if test "x$has_space" != x; then
39445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39447        fi
39448        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39449      fi
39450    fi
39451
39452    # Now join together the path and the arguments once again
39453    if test "x$arguments" != xEOL; then
39454      new_complete="$new_path ${arguments% *}"
39455    else
39456      new_complete="$new_path"
39457    fi
39458
39459    if test "x$complete" != "x$new_complete"; then
39460      LIPO="$new_complete"
39461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39462$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39463    fi
39464  fi
39465
39466  fi
39467
39468  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39469    # Extract the first word of "mt", so it can be a program name with args.
39470set dummy mt; ac_word=$2
39471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39472$as_echo_n "checking for $ac_word... " >&6; }
39473if ${ac_cv_prog_MT+:} false; then :
39474  $as_echo_n "(cached) " >&6
39475else
39476  if test -n "$MT"; then
39477  ac_cv_prog_MT="$MT" # Let the user override the test.
39478else
39479  ac_prog_rejected=no
39480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39481for as_dir in $PATH
39482do
39483  IFS=$as_save_IFS
39484  test -z "$as_dir" && as_dir=.
39485    for ac_exec_ext in '' $ac_executable_extensions; do
39486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39487    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39488       ac_prog_rejected=yes
39489       continue
39490     fi
39491    ac_cv_prog_MT="mt"
39492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39493    break 2
39494  fi
39495done
39496  done
39497IFS=$as_save_IFS
39498
39499if test $ac_prog_rejected = yes; then
39500  # We found a bogon in the path, so make sure we never use it.
39501  set dummy $ac_cv_prog_MT
39502  shift
39503  if test $# != 0; then
39504    # We chose a different compiler from the bogus one.
39505    # However, it has the same basename, so the bogon will be chosen
39506    # first if we set MT to just the basename; use the full file name.
39507    shift
39508    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39509  fi
39510fi
39511fi
39512fi
39513MT=$ac_cv_prog_MT
39514if test -n "$MT"; then
39515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39516$as_echo "$MT" >&6; }
39517else
39518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39519$as_echo "no" >&6; }
39520fi
39521
39522
39523
39524  # Only process if variable expands to non-empty
39525
39526  if test "x$MT" != x; then
39527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39528
39529  # First separate the path from the arguments. This will split at the first
39530  # space.
39531  complete="$MT"
39532  path="${complete%% *}"
39533  tmp="$complete EOL"
39534  arguments="${tmp#* }"
39535
39536  # Input might be given as Windows format, start by converting to
39537  # unix format.
39538  new_path=`$CYGPATH -u "$path"`
39539
39540  # Now try to locate executable using which
39541  new_path=`$WHICH "$new_path" 2> /dev/null`
39542  # bat and cmd files are not always considered executable in cygwin causing which
39543  # to not find them
39544  if test "x$new_path" = x \
39545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39547    new_path=`$CYGPATH -u "$path"`
39548  fi
39549  if test "x$new_path" = x; then
39550    # Oops. Which didn't find the executable.
39551    # The splitting of arguments from the executable at a space might have been incorrect,
39552    # since paths with space are more likely in Windows. Give it another try with the whole
39553    # argument.
39554    path="$complete"
39555    arguments="EOL"
39556    new_path=`$CYGPATH -u "$path"`
39557    new_path=`$WHICH "$new_path" 2> /dev/null`
39558    # bat and cmd files are not always considered executable in cygwin causing which
39559    # to not find them
39560    if test "x$new_path" = x \
39561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39563      new_path=`$CYGPATH -u "$path"`
39564    fi
39565    if test "x$new_path" = x; then
39566      # It's still not found. Now this is an unrecoverable error.
39567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39568$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39569      has_space=`$ECHO "$complete" | $GREP " "`
39570      if test "x$has_space" != x; then
39571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39573      fi
39574      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39575    fi
39576  fi
39577
39578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39581  # "foo.exe" is OK but "foo" is an error.
39582  #
39583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39584  # It is also a way to make sure we got the proper file name for the real test later on.
39585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39586  if test "x$test_shortpath" = x; then
39587    # Short path failed, file does not exist as specified.
39588    # Try adding .exe or .cmd
39589    if test -f "${new_path}.exe"; then
39590      input_to_shortpath="${new_path}.exe"
39591    elif test -f "${new_path}.cmd"; then
39592      input_to_shortpath="${new_path}.cmd"
39593    else
39594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39595$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39598      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39599    fi
39600  else
39601    input_to_shortpath="$new_path"
39602  fi
39603
39604  # Call helper function which possibly converts this using DOS-style short mode.
39605  # If so, the updated path is stored in $new_path.
39606  new_path="$input_to_shortpath"
39607
39608  input_path="$input_to_shortpath"
39609  # Check if we need to convert this using DOS-style short mode. If the path
39610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39611  # take no chances and rewrite it.
39612  # Note: m4 eats our [], so we need to use [ and ] instead.
39613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39614  if test "x$has_forbidden_chars" != x; then
39615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39619      # Going to short mode and back again did indeed matter. Since short mode is
39620      # case insensitive, let's make it lowercase to improve readability.
39621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39622      # Now convert it back to Unix-style (cygpath)
39623      input_path=`$CYGPATH -u "$shortmode_path"`
39624      new_path="$input_path"
39625    fi
39626  fi
39627
39628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39629  if test "x$test_cygdrive_prefix" = x; then
39630    # As a simple fix, exclude /usr/bin since it's not a real path.
39631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39633      # a path prefixed by /cygdrive for fixpath to work.
39634      new_path="$CYGWIN_ROOT_PATH$input_path"
39635    fi
39636  fi
39637
39638  # remove trailing .exe if any
39639  new_path="${new_path/%.exe/}"
39640
39641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39642
39643  # First separate the path from the arguments. This will split at the first
39644  # space.
39645  complete="$MT"
39646  path="${complete%% *}"
39647  tmp="$complete EOL"
39648  arguments="${tmp#* }"
39649
39650  # Input might be given as Windows format, start by converting to
39651  # unix format.
39652  new_path="$path"
39653
39654  windows_path="$new_path"
39655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39656    unix_path=`$CYGPATH -u "$windows_path"`
39657    new_path="$unix_path"
39658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39660    new_path="$unix_path"
39661  fi
39662
39663
39664  # Now try to locate executable using which
39665  new_path=`$WHICH "$new_path" 2> /dev/null`
39666
39667  if test "x$new_path" = x; then
39668    # Oops. Which didn't find the executable.
39669    # The splitting of arguments from the executable at a space might have been incorrect,
39670    # since paths with space are more likely in Windows. Give it another try with the whole
39671    # argument.
39672    path="$complete"
39673    arguments="EOL"
39674    new_path="$path"
39675
39676  windows_path="$new_path"
39677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39678    unix_path=`$CYGPATH -u "$windows_path"`
39679    new_path="$unix_path"
39680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39682    new_path="$unix_path"
39683  fi
39684
39685
39686    new_path=`$WHICH "$new_path" 2> /dev/null`
39687    # bat and cmd files are not always considered executable in MSYS causing which
39688    # to not find them
39689    if test "x$new_path" = x \
39690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39692      new_path="$path"
39693
39694  windows_path="$new_path"
39695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39696    unix_path=`$CYGPATH -u "$windows_path"`
39697    new_path="$unix_path"
39698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39700    new_path="$unix_path"
39701  fi
39702
39703    fi
39704
39705    if test "x$new_path" = x; then
39706      # It's still not found. Now this is an unrecoverable error.
39707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39708$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39709      has_space=`$ECHO "$complete" | $GREP " "`
39710      if test "x$has_space" != x; then
39711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39713      fi
39714      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39715    fi
39716  fi
39717
39718  # Now new_path has a complete unix path to the binary
39719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39720    # Keep paths in /bin as-is, but remove trailing .exe if any
39721    new_path="${new_path/%.exe/}"
39722    # Do not save /bin paths to all_fixpath_prefixes!
39723  else
39724    # Not in mixed or Windows style, start by that.
39725    new_path=`cmd //c echo $new_path`
39726
39727  input_path="$new_path"
39728  # Check if we need to convert this using DOS-style short mode. If the path
39729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39730  # take no chances and rewrite it.
39731  # Note: m4 eats our [], so we need to use [ and ] instead.
39732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39733  if test "x$has_forbidden_chars" != x; then
39734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39736  fi
39737
39738    # Output is in $new_path
39739
39740  windows_path="$new_path"
39741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39742    unix_path=`$CYGPATH -u "$windows_path"`
39743    new_path="$unix_path"
39744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39746    new_path="$unix_path"
39747  fi
39748
39749    # remove trailing .exe if any
39750    new_path="${new_path/%.exe/}"
39751
39752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39754  fi
39755
39756    else
39757      # We're on a unix platform. Hooray! :)
39758      # First separate the path from the arguments. This will split at the first
39759      # space.
39760      complete="$MT"
39761      path="${complete%% *}"
39762      tmp="$complete EOL"
39763      arguments="${tmp#* }"
39764
39765      # Cannot rely on the command "which" here since it doesn't always work.
39766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39767      if test -z "$is_absolute_path"; then
39768        # Path to executable is not absolute. Find it.
39769        IFS_save="$IFS"
39770        IFS=:
39771        for p in $PATH; do
39772          if test -f "$p/$path" && test -x "$p/$path"; then
39773            new_path="$p/$path"
39774            break
39775          fi
39776        done
39777        IFS="$IFS_save"
39778      else
39779        # This is an absolute path, we can use it without further modifications.
39780        new_path="$path"
39781      fi
39782
39783      if test "x$new_path" = x; then
39784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39785$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39786        has_space=`$ECHO "$complete" | $GREP " "`
39787        if test "x$has_space" != x; then
39788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39790        fi
39791        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39792      fi
39793    fi
39794
39795    # Now join together the path and the arguments once again
39796    if test "x$arguments" != xEOL; then
39797      new_complete="$new_path ${arguments% *}"
39798    else
39799      new_complete="$new_path"
39800    fi
39801
39802    if test "x$complete" != "x$new_complete"; then
39803      MT="$new_complete"
39804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39805$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39806    fi
39807  fi
39808
39809    # Setup the resource compiler (RC)
39810    # Extract the first word of "rc", so it can be a program name with args.
39811set dummy rc; ac_word=$2
39812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39813$as_echo_n "checking for $ac_word... " >&6; }
39814if ${ac_cv_prog_RC+:} false; then :
39815  $as_echo_n "(cached) " >&6
39816else
39817  if test -n "$RC"; then
39818  ac_cv_prog_RC="$RC" # Let the user override the test.
39819else
39820  ac_prog_rejected=no
39821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39822for as_dir in $PATH
39823do
39824  IFS=$as_save_IFS
39825  test -z "$as_dir" && as_dir=.
39826    for ac_exec_ext in '' $ac_executable_extensions; do
39827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39828    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39829       ac_prog_rejected=yes
39830       continue
39831     fi
39832    ac_cv_prog_RC="rc"
39833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39834    break 2
39835  fi
39836done
39837  done
39838IFS=$as_save_IFS
39839
39840if test $ac_prog_rejected = yes; then
39841  # We found a bogon in the path, so make sure we never use it.
39842  set dummy $ac_cv_prog_RC
39843  shift
39844  if test $# != 0; then
39845    # We chose a different compiler from the bogus one.
39846    # However, it has the same basename, so the bogon will be chosen
39847    # first if we set RC to just the basename; use the full file name.
39848    shift
39849    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39850  fi
39851fi
39852fi
39853fi
39854RC=$ac_cv_prog_RC
39855if test -n "$RC"; then
39856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39857$as_echo "$RC" >&6; }
39858else
39859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39860$as_echo "no" >&6; }
39861fi
39862
39863
39864
39865  # Only process if variable expands to non-empty
39866
39867  if test "x$RC" != x; then
39868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39869
39870  # First separate the path from the arguments. This will split at the first
39871  # space.
39872  complete="$RC"
39873  path="${complete%% *}"
39874  tmp="$complete EOL"
39875  arguments="${tmp#* }"
39876
39877  # Input might be given as Windows format, start by converting to
39878  # unix format.
39879  new_path=`$CYGPATH -u "$path"`
39880
39881  # Now try to locate executable using which
39882  new_path=`$WHICH "$new_path" 2> /dev/null`
39883  # bat and cmd files are not always considered executable in cygwin causing which
39884  # to not find them
39885  if test "x$new_path" = x \
39886      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39887      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39888    new_path=`$CYGPATH -u "$path"`
39889  fi
39890  if test "x$new_path" = x; then
39891    # Oops. Which didn't find the executable.
39892    # The splitting of arguments from the executable at a space might have been incorrect,
39893    # since paths with space are more likely in Windows. Give it another try with the whole
39894    # argument.
39895    path="$complete"
39896    arguments="EOL"
39897    new_path=`$CYGPATH -u "$path"`
39898    new_path=`$WHICH "$new_path" 2> /dev/null`
39899    # bat and cmd files are not always considered executable in cygwin causing which
39900    # to not find them
39901    if test "x$new_path" = x \
39902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39904      new_path=`$CYGPATH -u "$path"`
39905    fi
39906    if test "x$new_path" = x; then
39907      # It's still not found. Now this is an unrecoverable error.
39908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39909$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39910      has_space=`$ECHO "$complete" | $GREP " "`
39911      if test "x$has_space" != x; then
39912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39914      fi
39915      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39916    fi
39917  fi
39918
39919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39922  # "foo.exe" is OK but "foo" is an error.
39923  #
39924  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39925  # It is also a way to make sure we got the proper file name for the real test later on.
39926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39927  if test "x$test_shortpath" = x; then
39928    # Short path failed, file does not exist as specified.
39929    # Try adding .exe or .cmd
39930    if test -f "${new_path}.exe"; then
39931      input_to_shortpath="${new_path}.exe"
39932    elif test -f "${new_path}.cmd"; then
39933      input_to_shortpath="${new_path}.cmd"
39934    else
39935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39936$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39939      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39940    fi
39941  else
39942    input_to_shortpath="$new_path"
39943  fi
39944
39945  # Call helper function which possibly converts this using DOS-style short mode.
39946  # If so, the updated path is stored in $new_path.
39947  new_path="$input_to_shortpath"
39948
39949  input_path="$input_to_shortpath"
39950  # Check if we need to convert this using DOS-style short mode. If the path
39951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39952  # take no chances and rewrite it.
39953  # Note: m4 eats our [], so we need to use [ and ] instead.
39954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39955  if test "x$has_forbidden_chars" != x; then
39956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39960      # Going to short mode and back again did indeed matter. Since short mode is
39961      # case insensitive, let's make it lowercase to improve readability.
39962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39963      # Now convert it back to Unix-style (cygpath)
39964      input_path=`$CYGPATH -u "$shortmode_path"`
39965      new_path="$input_path"
39966    fi
39967  fi
39968
39969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39970  if test "x$test_cygdrive_prefix" = x; then
39971    # As a simple fix, exclude /usr/bin since it's not a real path.
39972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39974      # a path prefixed by /cygdrive for fixpath to work.
39975      new_path="$CYGWIN_ROOT_PATH$input_path"
39976    fi
39977  fi
39978
39979  # remove trailing .exe if any
39980  new_path="${new_path/%.exe/}"
39981
39982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39983
39984  # First separate the path from the arguments. This will split at the first
39985  # space.
39986  complete="$RC"
39987  path="${complete%% *}"
39988  tmp="$complete EOL"
39989  arguments="${tmp#* }"
39990
39991  # Input might be given as Windows format, start by converting to
39992  # unix format.
39993  new_path="$path"
39994
39995  windows_path="$new_path"
39996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39997    unix_path=`$CYGPATH -u "$windows_path"`
39998    new_path="$unix_path"
39999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40001    new_path="$unix_path"
40002  fi
40003
40004
40005  # Now try to locate executable using which
40006  new_path=`$WHICH "$new_path" 2> /dev/null`
40007
40008  if test "x$new_path" = x; then
40009    # Oops. Which didn't find the executable.
40010    # The splitting of arguments from the executable at a space might have been incorrect,
40011    # since paths with space are more likely in Windows. Give it another try with the whole
40012    # argument.
40013    path="$complete"
40014    arguments="EOL"
40015    new_path="$path"
40016
40017  windows_path="$new_path"
40018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40019    unix_path=`$CYGPATH -u "$windows_path"`
40020    new_path="$unix_path"
40021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40023    new_path="$unix_path"
40024  fi
40025
40026
40027    new_path=`$WHICH "$new_path" 2> /dev/null`
40028    # bat and cmd files are not always considered executable in MSYS causing which
40029    # to not find them
40030    if test "x$new_path" = x \
40031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40033      new_path="$path"
40034
40035  windows_path="$new_path"
40036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40037    unix_path=`$CYGPATH -u "$windows_path"`
40038    new_path="$unix_path"
40039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40041    new_path="$unix_path"
40042  fi
40043
40044    fi
40045
40046    if test "x$new_path" = x; then
40047      # It's still not found. Now this is an unrecoverable error.
40048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40049$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40050      has_space=`$ECHO "$complete" | $GREP " "`
40051      if test "x$has_space" != x; then
40052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40054      fi
40055      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40056    fi
40057  fi
40058
40059  # Now new_path has a complete unix path to the binary
40060  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40061    # Keep paths in /bin as-is, but remove trailing .exe if any
40062    new_path="${new_path/%.exe/}"
40063    # Do not save /bin paths to all_fixpath_prefixes!
40064  else
40065    # Not in mixed or Windows style, start by that.
40066    new_path=`cmd //c echo $new_path`
40067
40068  input_path="$new_path"
40069  # Check if we need to convert this using DOS-style short mode. If the path
40070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40071  # take no chances and rewrite it.
40072  # Note: m4 eats our [], so we need to use [ and ] instead.
40073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40074  if test "x$has_forbidden_chars" != x; then
40075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40077  fi
40078
40079    # Output is in $new_path
40080
40081  windows_path="$new_path"
40082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40083    unix_path=`$CYGPATH -u "$windows_path"`
40084    new_path="$unix_path"
40085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40087    new_path="$unix_path"
40088  fi
40089
40090    # remove trailing .exe if any
40091    new_path="${new_path/%.exe/}"
40092
40093    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40094    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40095  fi
40096
40097    else
40098      # We're on a unix platform. Hooray! :)
40099      # First separate the path from the arguments. This will split at the first
40100      # space.
40101      complete="$RC"
40102      path="${complete%% *}"
40103      tmp="$complete EOL"
40104      arguments="${tmp#* }"
40105
40106      # Cannot rely on the command "which" here since it doesn't always work.
40107      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40108      if test -z "$is_absolute_path"; then
40109        # Path to executable is not absolute. Find it.
40110        IFS_save="$IFS"
40111        IFS=:
40112        for p in $PATH; do
40113          if test -f "$p/$path" && test -x "$p/$path"; then
40114            new_path="$p/$path"
40115            break
40116          fi
40117        done
40118        IFS="$IFS_save"
40119      else
40120        # This is an absolute path, we can use it without further modifications.
40121        new_path="$path"
40122      fi
40123
40124      if test "x$new_path" = x; then
40125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40126$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40127        has_space=`$ECHO "$complete" | $GREP " "`
40128        if test "x$has_space" != x; then
40129          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40130$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40131        fi
40132        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40133      fi
40134    fi
40135
40136    # Now join together the path and the arguments once again
40137    if test "x$arguments" != xEOL; then
40138      new_complete="$new_path ${arguments% *}"
40139    else
40140      new_complete="$new_path"
40141    fi
40142
40143    if test "x$complete" != "x$new_complete"; then
40144      RC="$new_complete"
40145      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40146$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40147    fi
40148  fi
40149
40150    # Extract the first word of "dumpbin", so it can be a program name with args.
40151set dummy dumpbin; ac_word=$2
40152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40153$as_echo_n "checking for $ac_word... " >&6; }
40154if ${ac_cv_prog_DUMPBIN+:} false; then :
40155  $as_echo_n "(cached) " >&6
40156else
40157  if test -n "$DUMPBIN"; then
40158  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40159else
40160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40161for as_dir in $PATH
40162do
40163  IFS=$as_save_IFS
40164  test -z "$as_dir" && as_dir=.
40165    for ac_exec_ext in '' $ac_executable_extensions; do
40166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40167    ac_cv_prog_DUMPBIN="dumpbin"
40168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40169    break 2
40170  fi
40171done
40172  done
40173IFS=$as_save_IFS
40174
40175fi
40176fi
40177DUMPBIN=$ac_cv_prog_DUMPBIN
40178if test -n "$DUMPBIN"; then
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40180$as_echo "$DUMPBIN" >&6; }
40181else
40182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40183$as_echo "no" >&6; }
40184fi
40185
40186
40187
40188  # Only process if variable expands to non-empty
40189
40190  if test "x$DUMPBIN" != x; then
40191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40192
40193  # First separate the path from the arguments. This will split at the first
40194  # space.
40195  complete="$DUMPBIN"
40196  path="${complete%% *}"
40197  tmp="$complete EOL"
40198  arguments="${tmp#* }"
40199
40200  # Input might be given as Windows format, start by converting to
40201  # unix format.
40202  new_path=`$CYGPATH -u "$path"`
40203
40204  # Now try to locate executable using which
40205  new_path=`$WHICH "$new_path" 2> /dev/null`
40206  # bat and cmd files are not always considered executable in cygwin causing which
40207  # to not find them
40208  if test "x$new_path" = x \
40209      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40210      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40211    new_path=`$CYGPATH -u "$path"`
40212  fi
40213  if test "x$new_path" = x; then
40214    # Oops. Which didn't find the executable.
40215    # The splitting of arguments from the executable at a space might have been incorrect,
40216    # since paths with space are more likely in Windows. Give it another try with the whole
40217    # argument.
40218    path="$complete"
40219    arguments="EOL"
40220    new_path=`$CYGPATH -u "$path"`
40221    new_path=`$WHICH "$new_path" 2> /dev/null`
40222    # bat and cmd files are not always considered executable in cygwin causing which
40223    # to not find them
40224    if test "x$new_path" = x \
40225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40227      new_path=`$CYGPATH -u "$path"`
40228    fi
40229    if test "x$new_path" = x; then
40230      # It's still not found. Now this is an unrecoverable error.
40231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40232$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40233      has_space=`$ECHO "$complete" | $GREP " "`
40234      if test "x$has_space" != x; then
40235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40237      fi
40238      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40239    fi
40240  fi
40241
40242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40245  # "foo.exe" is OK but "foo" is an error.
40246  #
40247  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40248  # It is also a way to make sure we got the proper file name for the real test later on.
40249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40250  if test "x$test_shortpath" = x; then
40251    # Short path failed, file does not exist as specified.
40252    # Try adding .exe or .cmd
40253    if test -f "${new_path}.exe"; then
40254      input_to_shortpath="${new_path}.exe"
40255    elif test -f "${new_path}.cmd"; then
40256      input_to_shortpath="${new_path}.cmd"
40257    else
40258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40259$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40260      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40262      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40263    fi
40264  else
40265    input_to_shortpath="$new_path"
40266  fi
40267
40268  # Call helper function which possibly converts this using DOS-style short mode.
40269  # If so, the updated path is stored in $new_path.
40270  new_path="$input_to_shortpath"
40271
40272  input_path="$input_to_shortpath"
40273  # Check if we need to convert this using DOS-style short mode. If the path
40274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40275  # take no chances and rewrite it.
40276  # Note: m4 eats our [], so we need to use [ and ] instead.
40277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40278  if test "x$has_forbidden_chars" != x; then
40279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40283      # Going to short mode and back again did indeed matter. Since short mode is
40284      # case insensitive, let's make it lowercase to improve readability.
40285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40286      # Now convert it back to Unix-style (cygpath)
40287      input_path=`$CYGPATH -u "$shortmode_path"`
40288      new_path="$input_path"
40289    fi
40290  fi
40291
40292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40293  if test "x$test_cygdrive_prefix" = x; then
40294    # As a simple fix, exclude /usr/bin since it's not a real path.
40295    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40297      # a path prefixed by /cygdrive for fixpath to work.
40298      new_path="$CYGWIN_ROOT_PATH$input_path"
40299    fi
40300  fi
40301
40302  # remove trailing .exe if any
40303  new_path="${new_path/%.exe/}"
40304
40305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40306
40307  # First separate the path from the arguments. This will split at the first
40308  # space.
40309  complete="$DUMPBIN"
40310  path="${complete%% *}"
40311  tmp="$complete EOL"
40312  arguments="${tmp#* }"
40313
40314  # Input might be given as Windows format, start by converting to
40315  # unix format.
40316  new_path="$path"
40317
40318  windows_path="$new_path"
40319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40320    unix_path=`$CYGPATH -u "$windows_path"`
40321    new_path="$unix_path"
40322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40324    new_path="$unix_path"
40325  fi
40326
40327
40328  # Now try to locate executable using which
40329  new_path=`$WHICH "$new_path" 2> /dev/null`
40330
40331  if test "x$new_path" = x; then
40332    # Oops. Which didn't find the executable.
40333    # The splitting of arguments from the executable at a space might have been incorrect,
40334    # since paths with space are more likely in Windows. Give it another try with the whole
40335    # argument.
40336    path="$complete"
40337    arguments="EOL"
40338    new_path="$path"
40339
40340  windows_path="$new_path"
40341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40342    unix_path=`$CYGPATH -u "$windows_path"`
40343    new_path="$unix_path"
40344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40346    new_path="$unix_path"
40347  fi
40348
40349
40350    new_path=`$WHICH "$new_path" 2> /dev/null`
40351    # bat and cmd files are not always considered executable in MSYS causing which
40352    # to not find them
40353    if test "x$new_path" = x \
40354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356      new_path="$path"
40357
40358  windows_path="$new_path"
40359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360    unix_path=`$CYGPATH -u "$windows_path"`
40361    new_path="$unix_path"
40362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40364    new_path="$unix_path"
40365  fi
40366
40367    fi
40368
40369    if test "x$new_path" = x; then
40370      # It's still not found. Now this is an unrecoverable error.
40371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40372$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40373      has_space=`$ECHO "$complete" | $GREP " "`
40374      if test "x$has_space" != x; then
40375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40377      fi
40378      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40379    fi
40380  fi
40381
40382  # Now new_path has a complete unix path to the binary
40383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40384    # Keep paths in /bin as-is, but remove trailing .exe if any
40385    new_path="${new_path/%.exe/}"
40386    # Do not save /bin paths to all_fixpath_prefixes!
40387  else
40388    # Not in mixed or Windows style, start by that.
40389    new_path=`cmd //c echo $new_path`
40390
40391  input_path="$new_path"
40392  # Check if we need to convert this using DOS-style short mode. If the path
40393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40394  # take no chances and rewrite it.
40395  # Note: m4 eats our [], so we need to use [ and ] instead.
40396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40397  if test "x$has_forbidden_chars" != x; then
40398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40400  fi
40401
40402    # Output is in $new_path
40403
40404  windows_path="$new_path"
40405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40406    unix_path=`$CYGPATH -u "$windows_path"`
40407    new_path="$unix_path"
40408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40410    new_path="$unix_path"
40411  fi
40412
40413    # remove trailing .exe if any
40414    new_path="${new_path/%.exe/}"
40415
40416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40418  fi
40419
40420    else
40421      # We're on a unix platform. Hooray! :)
40422      # First separate the path from the arguments. This will split at the first
40423      # space.
40424      complete="$DUMPBIN"
40425      path="${complete%% *}"
40426      tmp="$complete EOL"
40427      arguments="${tmp#* }"
40428
40429      # Cannot rely on the command "which" here since it doesn't always work.
40430      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40431      if test -z "$is_absolute_path"; then
40432        # Path to executable is not absolute. Find it.
40433        IFS_save="$IFS"
40434        IFS=:
40435        for p in $PATH; do
40436          if test -f "$p/$path" && test -x "$p/$path"; then
40437            new_path="$p/$path"
40438            break
40439          fi
40440        done
40441        IFS="$IFS_save"
40442      else
40443        # This is an absolute path, we can use it without further modifications.
40444        new_path="$path"
40445      fi
40446
40447      if test "x$new_path" = x; then
40448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40449$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40450        has_space=`$ECHO "$complete" | $GREP " "`
40451        if test "x$has_space" != x; then
40452          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40454        fi
40455        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40456      fi
40457    fi
40458
40459    # Now join together the path and the arguments once again
40460    if test "x$arguments" != xEOL; then
40461      new_complete="$new_path ${arguments% *}"
40462    else
40463      new_complete="$new_path"
40464    fi
40465
40466    if test "x$complete" != "x$new_complete"; then
40467      DUMPBIN="$new_complete"
40468      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40469$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40470    fi
40471  fi
40472
40473    # We need to check for 'msbuild.exe' because at the place where we expect to
40474    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40475    # won't find the 'msbuild.exe' executable in that case (and the
40476    # 'ac_executable_extensions' is unusable due to performance reasons).
40477    # Notice that we intentionally don't fix up the path to MSBUILD because we
40478    # will call it in a DOS shell during freetype detection on Windows (see
40479    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40480    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40481set dummy msbuild.exe; ac_word=$2
40482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40483$as_echo_n "checking for $ac_word... " >&6; }
40484if ${ac_cv_prog_MSBUILD+:} false; then :
40485  $as_echo_n "(cached) " >&6
40486else
40487  if test -n "$MSBUILD"; then
40488  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40489else
40490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40491for as_dir in $PATH
40492do
40493  IFS=$as_save_IFS
40494  test -z "$as_dir" && as_dir=.
40495    for ac_exec_ext in '' $ac_executable_extensions; do
40496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40497    ac_cv_prog_MSBUILD="msbuild.exe"
40498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40499    break 2
40500  fi
40501done
40502  done
40503IFS=$as_save_IFS
40504
40505fi
40506fi
40507MSBUILD=$ac_cv_prog_MSBUILD
40508if test -n "$MSBUILD"; then
40509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40510$as_echo "$MSBUILD" >&6; }
40511else
40512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40513$as_echo "no" >&6; }
40514fi
40515
40516
40517  fi
40518
40519  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40520
40521
40522  # Publish this variable in the help.
40523
40524
40525  if [ -z "${STRIP+x}" ]; then
40526    # The variable is not set by user, try to locate tool using the code snippet
40527    for ac_prog in strip
40528do
40529  # Extract the first word of "$ac_prog", so it can be a program name with args.
40530set dummy $ac_prog; ac_word=$2
40531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40532$as_echo_n "checking for $ac_word... " >&6; }
40533if ${ac_cv_path_STRIP+:} false; then :
40534  $as_echo_n "(cached) " >&6
40535else
40536  case $STRIP in
40537  [\\/]* | ?:[\\/]*)
40538  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40539  ;;
40540  *)
40541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40542for as_dir in $PATH
40543do
40544  IFS=$as_save_IFS
40545  test -z "$as_dir" && as_dir=.
40546    for ac_exec_ext in '' $ac_executable_extensions; do
40547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40548    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40550    break 2
40551  fi
40552done
40553  done
40554IFS=$as_save_IFS
40555
40556  ;;
40557esac
40558fi
40559STRIP=$ac_cv_path_STRIP
40560if test -n "$STRIP"; then
40561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40562$as_echo "$STRIP" >&6; }
40563else
40564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40565$as_echo "no" >&6; }
40566fi
40567
40568
40569  test -n "$STRIP" && break
40570done
40571
40572  else
40573    # The variable is set, but is it from the command line or the environment?
40574
40575    # Try to remove the string !STRIP! from our list.
40576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40578      # If it failed, the variable was not from the command line. Ignore it,
40579      # but warn the user (except for BASH, which is always set by the calling BASH).
40580      if test "xSTRIP" != xBASH; then
40581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40582$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40583      fi
40584      # Try to locate tool using the code snippet
40585      for ac_prog in strip
40586do
40587  # Extract the first word of "$ac_prog", so it can be a program name with args.
40588set dummy $ac_prog; ac_word=$2
40589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40590$as_echo_n "checking for $ac_word... " >&6; }
40591if ${ac_cv_path_STRIP+:} false; then :
40592  $as_echo_n "(cached) " >&6
40593else
40594  case $STRIP in
40595  [\\/]* | ?:[\\/]*)
40596  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40597  ;;
40598  *)
40599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40600for as_dir in $PATH
40601do
40602  IFS=$as_save_IFS
40603  test -z "$as_dir" && as_dir=.
40604    for ac_exec_ext in '' $ac_executable_extensions; do
40605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40606    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40608    break 2
40609  fi
40610done
40611  done
40612IFS=$as_save_IFS
40613
40614  ;;
40615esac
40616fi
40617STRIP=$ac_cv_path_STRIP
40618if test -n "$STRIP"; then
40619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40620$as_echo "$STRIP" >&6; }
40621else
40622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40623$as_echo "no" >&6; }
40624fi
40625
40626
40627  test -n "$STRIP" && break
40628done
40629
40630    else
40631      # If it succeeded, then it was overridden by the user. We will use it
40632      # for the tool.
40633
40634      # First remove it from the list of overridden variables, so we can test
40635      # for unknown variables in the end.
40636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40637
40638      # Check if we try to supply an empty value
40639      if test "x$STRIP" = x; then
40640        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40641$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40643$as_echo_n "checking for STRIP... " >&6; }
40644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40645$as_echo "disabled" >&6; }
40646      else
40647        # Check if the provided tool contains a complete path.
40648        tool_specified="$STRIP"
40649        tool_basename="${tool_specified##*/}"
40650        if test "x$tool_basename" = "x$tool_specified"; then
40651          # A command without a complete path is provided, search $PATH.
40652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40653$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40654          # Extract the first word of "$tool_basename", so it can be a program name with args.
40655set dummy $tool_basename; ac_word=$2
40656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40657$as_echo_n "checking for $ac_word... " >&6; }
40658if ${ac_cv_path_STRIP+:} false; then :
40659  $as_echo_n "(cached) " >&6
40660else
40661  case $STRIP in
40662  [\\/]* | ?:[\\/]*)
40663  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40664  ;;
40665  *)
40666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40667for as_dir in $PATH
40668do
40669  IFS=$as_save_IFS
40670  test -z "$as_dir" && as_dir=.
40671    for ac_exec_ext in '' $ac_executable_extensions; do
40672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40673    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40675    break 2
40676  fi
40677done
40678  done
40679IFS=$as_save_IFS
40680
40681  ;;
40682esac
40683fi
40684STRIP=$ac_cv_path_STRIP
40685if test -n "$STRIP"; then
40686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40687$as_echo "$STRIP" >&6; }
40688else
40689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40690$as_echo "no" >&6; }
40691fi
40692
40693
40694          if test "x$STRIP" = x; then
40695            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40696          fi
40697        else
40698          # Otherwise we believe it is a complete path. Use it as it is.
40699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40700$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40701          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40702$as_echo_n "checking for STRIP... " >&6; }
40703          if test ! -x "$tool_specified"; then
40704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40705$as_echo "not found" >&6; }
40706            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40707          fi
40708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40709$as_echo "$tool_specified" >&6; }
40710        fi
40711      fi
40712    fi
40713
40714  fi
40715
40716
40717
40718  # Only process if variable expands to non-empty
40719
40720  if test "x$STRIP" != x; then
40721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40722
40723  # First separate the path from the arguments. This will split at the first
40724  # space.
40725  complete="$STRIP"
40726  path="${complete%% *}"
40727  tmp="$complete EOL"
40728  arguments="${tmp#* }"
40729
40730  # Input might be given as Windows format, start by converting to
40731  # unix format.
40732  new_path=`$CYGPATH -u "$path"`
40733
40734  # Now try to locate executable using which
40735  new_path=`$WHICH "$new_path" 2> /dev/null`
40736  # bat and cmd files are not always considered executable in cygwin causing which
40737  # to not find them
40738  if test "x$new_path" = x \
40739      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40740      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40741    new_path=`$CYGPATH -u "$path"`
40742  fi
40743  if test "x$new_path" = x; then
40744    # Oops. Which didn't find the executable.
40745    # The splitting of arguments from the executable at a space might have been incorrect,
40746    # since paths with space are more likely in Windows. Give it another try with the whole
40747    # argument.
40748    path="$complete"
40749    arguments="EOL"
40750    new_path=`$CYGPATH -u "$path"`
40751    new_path=`$WHICH "$new_path" 2> /dev/null`
40752    # bat and cmd files are not always considered executable in cygwin causing which
40753    # to not find them
40754    if test "x$new_path" = x \
40755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40757      new_path=`$CYGPATH -u "$path"`
40758    fi
40759    if test "x$new_path" = x; then
40760      # It's still not found. Now this is an unrecoverable error.
40761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40762$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40763      has_space=`$ECHO "$complete" | $GREP " "`
40764      if test "x$has_space" != x; then
40765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40767      fi
40768      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40769    fi
40770  fi
40771
40772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40775  # "foo.exe" is OK but "foo" is an error.
40776  #
40777  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40778  # It is also a way to make sure we got the proper file name for the real test later on.
40779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40780  if test "x$test_shortpath" = x; then
40781    # Short path failed, file does not exist as specified.
40782    # Try adding .exe or .cmd
40783    if test -f "${new_path}.exe"; then
40784      input_to_shortpath="${new_path}.exe"
40785    elif test -f "${new_path}.cmd"; then
40786      input_to_shortpath="${new_path}.cmd"
40787    else
40788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40789$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40792      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40793    fi
40794  else
40795    input_to_shortpath="$new_path"
40796  fi
40797
40798  # Call helper function which possibly converts this using DOS-style short mode.
40799  # If so, the updated path is stored in $new_path.
40800  new_path="$input_to_shortpath"
40801
40802  input_path="$input_to_shortpath"
40803  # Check if we need to convert this using DOS-style short mode. If the path
40804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40805  # take no chances and rewrite it.
40806  # Note: m4 eats our [], so we need to use [ and ] instead.
40807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40808  if test "x$has_forbidden_chars" != x; then
40809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40813      # Going to short mode and back again did indeed matter. Since short mode is
40814      # case insensitive, let's make it lowercase to improve readability.
40815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40816      # Now convert it back to Unix-style (cygpath)
40817      input_path=`$CYGPATH -u "$shortmode_path"`
40818      new_path="$input_path"
40819    fi
40820  fi
40821
40822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40823  if test "x$test_cygdrive_prefix" = x; then
40824    # As a simple fix, exclude /usr/bin since it's not a real path.
40825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40827      # a path prefixed by /cygdrive for fixpath to work.
40828      new_path="$CYGWIN_ROOT_PATH$input_path"
40829    fi
40830  fi
40831
40832  # remove trailing .exe if any
40833  new_path="${new_path/%.exe/}"
40834
40835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40836
40837  # First separate the path from the arguments. This will split at the first
40838  # space.
40839  complete="$STRIP"
40840  path="${complete%% *}"
40841  tmp="$complete EOL"
40842  arguments="${tmp#* }"
40843
40844  # Input might be given as Windows format, start by converting to
40845  # unix format.
40846  new_path="$path"
40847
40848  windows_path="$new_path"
40849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850    unix_path=`$CYGPATH -u "$windows_path"`
40851    new_path="$unix_path"
40852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40854    new_path="$unix_path"
40855  fi
40856
40857
40858  # Now try to locate executable using which
40859  new_path=`$WHICH "$new_path" 2> /dev/null`
40860
40861  if test "x$new_path" = x; then
40862    # Oops. Which didn't find the executable.
40863    # The splitting of arguments from the executable at a space might have been incorrect,
40864    # since paths with space are more likely in Windows. Give it another try with the whole
40865    # argument.
40866    path="$complete"
40867    arguments="EOL"
40868    new_path="$path"
40869
40870  windows_path="$new_path"
40871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40872    unix_path=`$CYGPATH -u "$windows_path"`
40873    new_path="$unix_path"
40874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40876    new_path="$unix_path"
40877  fi
40878
40879
40880    new_path=`$WHICH "$new_path" 2> /dev/null`
40881    # bat and cmd files are not always considered executable in MSYS causing which
40882    # to not find them
40883    if test "x$new_path" = x \
40884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40886      new_path="$path"
40887
40888  windows_path="$new_path"
40889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40890    unix_path=`$CYGPATH -u "$windows_path"`
40891    new_path="$unix_path"
40892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40894    new_path="$unix_path"
40895  fi
40896
40897    fi
40898
40899    if test "x$new_path" = x; then
40900      # It's still not found. Now this is an unrecoverable error.
40901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40902$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40903      has_space=`$ECHO "$complete" | $GREP " "`
40904      if test "x$has_space" != x; then
40905        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40906$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40907      fi
40908      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40909    fi
40910  fi
40911
40912  # Now new_path has a complete unix path to the binary
40913  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40914    # Keep paths in /bin as-is, but remove trailing .exe if any
40915    new_path="${new_path/%.exe/}"
40916    # Do not save /bin paths to all_fixpath_prefixes!
40917  else
40918    # Not in mixed or Windows style, start by that.
40919    new_path=`cmd //c echo $new_path`
40920
40921  input_path="$new_path"
40922  # Check if we need to convert this using DOS-style short mode. If the path
40923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40924  # take no chances and rewrite it.
40925  # Note: m4 eats our [], so we need to use [ and ] instead.
40926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40927  if test "x$has_forbidden_chars" != x; then
40928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40930  fi
40931
40932    # Output is in $new_path
40933
40934  windows_path="$new_path"
40935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40936    unix_path=`$CYGPATH -u "$windows_path"`
40937    new_path="$unix_path"
40938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40940    new_path="$unix_path"
40941  fi
40942
40943    # remove trailing .exe if any
40944    new_path="${new_path/%.exe/}"
40945
40946    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40947    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40948  fi
40949
40950    else
40951      # We're on a unix platform. Hooray! :)
40952      # First separate the path from the arguments. This will split at the first
40953      # space.
40954      complete="$STRIP"
40955      path="${complete%% *}"
40956      tmp="$complete EOL"
40957      arguments="${tmp#* }"
40958
40959      # Cannot rely on the command "which" here since it doesn't always work.
40960      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40961      if test -z "$is_absolute_path"; then
40962        # Path to executable is not absolute. Find it.
40963        IFS_save="$IFS"
40964        IFS=:
40965        for p in $PATH; do
40966          if test -f "$p/$path" && test -x "$p/$path"; then
40967            new_path="$p/$path"
40968            break
40969          fi
40970        done
40971        IFS="$IFS_save"
40972      else
40973        # This is an absolute path, we can use it without further modifications.
40974        new_path="$path"
40975      fi
40976
40977      if test "x$new_path" = x; then
40978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40979$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40980        has_space=`$ECHO "$complete" | $GREP " "`
40981        if test "x$has_space" != x; then
40982          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40983$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40984        fi
40985        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40986      fi
40987    fi
40988
40989    # Now join together the path and the arguments once again
40990    if test "x$arguments" != xEOL; then
40991      new_complete="$new_path ${arguments% *}"
40992    else
40993      new_complete="$new_path"
40994    fi
40995
40996    if test "x$complete" != "x$new_complete"; then
40997      STRIP="$new_complete"
40998      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40999$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41000    fi
41001  fi
41002
41003
41004
41005  # Publish this variable in the help.
41006
41007
41008  if [ -z "${NM+x}" ]; then
41009    # The variable is not set by user, try to locate tool using the code snippet
41010    for ac_prog in nm
41011do
41012  # Extract the first word of "$ac_prog", so it can be a program name with args.
41013set dummy $ac_prog; ac_word=$2
41014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41015$as_echo_n "checking for $ac_word... " >&6; }
41016if ${ac_cv_path_NM+:} false; then :
41017  $as_echo_n "(cached) " >&6
41018else
41019  case $NM in
41020  [\\/]* | ?:[\\/]*)
41021  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41022  ;;
41023  *)
41024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41025for as_dir in $PATH
41026do
41027  IFS=$as_save_IFS
41028  test -z "$as_dir" && as_dir=.
41029    for ac_exec_ext in '' $ac_executable_extensions; do
41030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41031    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41033    break 2
41034  fi
41035done
41036  done
41037IFS=$as_save_IFS
41038
41039  ;;
41040esac
41041fi
41042NM=$ac_cv_path_NM
41043if test -n "$NM"; then
41044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41045$as_echo "$NM" >&6; }
41046else
41047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41048$as_echo "no" >&6; }
41049fi
41050
41051
41052  test -n "$NM" && break
41053done
41054
41055  else
41056    # The variable is set, but is it from the command line or the environment?
41057
41058    # Try to remove the string !NM! from our list.
41059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41061      # If it failed, the variable was not from the command line. Ignore it,
41062      # but warn the user (except for BASH, which is always set by the calling BASH).
41063      if test "xNM" != xBASH; then
41064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41065$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41066      fi
41067      # Try to locate tool using the code snippet
41068      for ac_prog in nm
41069do
41070  # Extract the first word of "$ac_prog", so it can be a program name with args.
41071set dummy $ac_prog; ac_word=$2
41072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41073$as_echo_n "checking for $ac_word... " >&6; }
41074if ${ac_cv_path_NM+:} false; then :
41075  $as_echo_n "(cached) " >&6
41076else
41077  case $NM in
41078  [\\/]* | ?:[\\/]*)
41079  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41080  ;;
41081  *)
41082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41083for as_dir in $PATH
41084do
41085  IFS=$as_save_IFS
41086  test -z "$as_dir" && as_dir=.
41087    for ac_exec_ext in '' $ac_executable_extensions; do
41088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41089    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41091    break 2
41092  fi
41093done
41094  done
41095IFS=$as_save_IFS
41096
41097  ;;
41098esac
41099fi
41100NM=$ac_cv_path_NM
41101if test -n "$NM"; then
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41103$as_echo "$NM" >&6; }
41104else
41105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41106$as_echo "no" >&6; }
41107fi
41108
41109
41110  test -n "$NM" && break
41111done
41112
41113    else
41114      # If it succeeded, then it was overridden by the user. We will use it
41115      # for the tool.
41116
41117      # First remove it from the list of overridden variables, so we can test
41118      # for unknown variables in the end.
41119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41120
41121      # Check if we try to supply an empty value
41122      if test "x$NM" = x; then
41123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41124$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41126$as_echo_n "checking for NM... " >&6; }
41127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41128$as_echo "disabled" >&6; }
41129      else
41130        # Check if the provided tool contains a complete path.
41131        tool_specified="$NM"
41132        tool_basename="${tool_specified##*/}"
41133        if test "x$tool_basename" = "x$tool_specified"; then
41134          # A command without a complete path is provided, search $PATH.
41135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41136$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41137          # Extract the first word of "$tool_basename", so it can be a program name with args.
41138set dummy $tool_basename; ac_word=$2
41139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41140$as_echo_n "checking for $ac_word... " >&6; }
41141if ${ac_cv_path_NM+:} false; then :
41142  $as_echo_n "(cached) " >&6
41143else
41144  case $NM in
41145  [\\/]* | ?:[\\/]*)
41146  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41147  ;;
41148  *)
41149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41150for as_dir in $PATH
41151do
41152  IFS=$as_save_IFS
41153  test -z "$as_dir" && as_dir=.
41154    for ac_exec_ext in '' $ac_executable_extensions; do
41155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41156    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41158    break 2
41159  fi
41160done
41161  done
41162IFS=$as_save_IFS
41163
41164  ;;
41165esac
41166fi
41167NM=$ac_cv_path_NM
41168if test -n "$NM"; then
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41170$as_echo "$NM" >&6; }
41171else
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41173$as_echo "no" >&6; }
41174fi
41175
41176
41177          if test "x$NM" = x; then
41178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41179          fi
41180        else
41181          # Otherwise we believe it is a complete path. Use it as it is.
41182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41183$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41185$as_echo_n "checking for NM... " >&6; }
41186          if test ! -x "$tool_specified"; then
41187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41188$as_echo "not found" >&6; }
41189            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41190          fi
41191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41192$as_echo "$tool_specified" >&6; }
41193        fi
41194      fi
41195    fi
41196
41197  fi
41198
41199
41200
41201  # Only process if variable expands to non-empty
41202
41203  if test "x$NM" != x; then
41204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41205
41206  # First separate the path from the arguments. This will split at the first
41207  # space.
41208  complete="$NM"
41209  path="${complete%% *}"
41210  tmp="$complete EOL"
41211  arguments="${tmp#* }"
41212
41213  # Input might be given as Windows format, start by converting to
41214  # unix format.
41215  new_path=`$CYGPATH -u "$path"`
41216
41217  # Now try to locate executable using which
41218  new_path=`$WHICH "$new_path" 2> /dev/null`
41219  # bat and cmd files are not always considered executable in cygwin causing which
41220  # to not find them
41221  if test "x$new_path" = x \
41222      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41223      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41224    new_path=`$CYGPATH -u "$path"`
41225  fi
41226  if test "x$new_path" = x; then
41227    # Oops. Which didn't find the executable.
41228    # The splitting of arguments from the executable at a space might have been incorrect,
41229    # since paths with space are more likely in Windows. Give it another try with the whole
41230    # argument.
41231    path="$complete"
41232    arguments="EOL"
41233    new_path=`$CYGPATH -u "$path"`
41234    new_path=`$WHICH "$new_path" 2> /dev/null`
41235    # bat and cmd files are not always considered executable in cygwin causing which
41236    # to not find them
41237    if test "x$new_path" = x \
41238        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41239        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41240      new_path=`$CYGPATH -u "$path"`
41241    fi
41242    if test "x$new_path" = x; then
41243      # It's still not found. Now this is an unrecoverable error.
41244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41245$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41246      has_space=`$ECHO "$complete" | $GREP " "`
41247      if test "x$has_space" != x; then
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41250      fi
41251      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41252    fi
41253  fi
41254
41255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41258  # "foo.exe" is OK but "foo" is an error.
41259  #
41260  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41261  # It is also a way to make sure we got the proper file name for the real test later on.
41262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41263  if test "x$test_shortpath" = x; then
41264    # Short path failed, file does not exist as specified.
41265    # Try adding .exe or .cmd
41266    if test -f "${new_path}.exe"; then
41267      input_to_shortpath="${new_path}.exe"
41268    elif test -f "${new_path}.cmd"; then
41269      input_to_shortpath="${new_path}.cmd"
41270    else
41271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41272$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41275      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41276    fi
41277  else
41278    input_to_shortpath="$new_path"
41279  fi
41280
41281  # Call helper function which possibly converts this using DOS-style short mode.
41282  # If so, the updated path is stored in $new_path.
41283  new_path="$input_to_shortpath"
41284
41285  input_path="$input_to_shortpath"
41286  # Check if we need to convert this using DOS-style short mode. If the path
41287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41288  # take no chances and rewrite it.
41289  # Note: m4 eats our [], so we need to use [ and ] instead.
41290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41291  if test "x$has_forbidden_chars" != x; then
41292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41296      # Going to short mode and back again did indeed matter. Since short mode is
41297      # case insensitive, let's make it lowercase to improve readability.
41298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41299      # Now convert it back to Unix-style (cygpath)
41300      input_path=`$CYGPATH -u "$shortmode_path"`
41301      new_path="$input_path"
41302    fi
41303  fi
41304
41305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41306  if test "x$test_cygdrive_prefix" = x; then
41307    # As a simple fix, exclude /usr/bin since it's not a real path.
41308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41310      # a path prefixed by /cygdrive for fixpath to work.
41311      new_path="$CYGWIN_ROOT_PATH$input_path"
41312    fi
41313  fi
41314
41315  # remove trailing .exe if any
41316  new_path="${new_path/%.exe/}"
41317
41318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41319
41320  # First separate the path from the arguments. This will split at the first
41321  # space.
41322  complete="$NM"
41323  path="${complete%% *}"
41324  tmp="$complete EOL"
41325  arguments="${tmp#* }"
41326
41327  # Input might be given as Windows format, start by converting to
41328  # unix format.
41329  new_path="$path"
41330
41331  windows_path="$new_path"
41332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41333    unix_path=`$CYGPATH -u "$windows_path"`
41334    new_path="$unix_path"
41335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41337    new_path="$unix_path"
41338  fi
41339
41340
41341  # Now try to locate executable using which
41342  new_path=`$WHICH "$new_path" 2> /dev/null`
41343
41344  if test "x$new_path" = x; then
41345    # Oops. Which didn't find the executable.
41346    # The splitting of arguments from the executable at a space might have been incorrect,
41347    # since paths with space are more likely in Windows. Give it another try with the whole
41348    # argument.
41349    path="$complete"
41350    arguments="EOL"
41351    new_path="$path"
41352
41353  windows_path="$new_path"
41354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41355    unix_path=`$CYGPATH -u "$windows_path"`
41356    new_path="$unix_path"
41357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41359    new_path="$unix_path"
41360  fi
41361
41362
41363    new_path=`$WHICH "$new_path" 2> /dev/null`
41364    # bat and cmd files are not always considered executable in MSYS causing which
41365    # to not find them
41366    if test "x$new_path" = x \
41367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41369      new_path="$path"
41370
41371  windows_path="$new_path"
41372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41373    unix_path=`$CYGPATH -u "$windows_path"`
41374    new_path="$unix_path"
41375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41377    new_path="$unix_path"
41378  fi
41379
41380    fi
41381
41382    if test "x$new_path" = x; then
41383      # It's still not found. Now this is an unrecoverable error.
41384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41385$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41386      has_space=`$ECHO "$complete" | $GREP " "`
41387      if test "x$has_space" != x; then
41388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41390      fi
41391      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41392    fi
41393  fi
41394
41395  # Now new_path has a complete unix path to the binary
41396  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41397    # Keep paths in /bin as-is, but remove trailing .exe if any
41398    new_path="${new_path/%.exe/}"
41399    # Do not save /bin paths to all_fixpath_prefixes!
41400  else
41401    # Not in mixed or Windows style, start by that.
41402    new_path=`cmd //c echo $new_path`
41403
41404  input_path="$new_path"
41405  # Check if we need to convert this using DOS-style short mode. If the path
41406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41407  # take no chances and rewrite it.
41408  # Note: m4 eats our [], so we need to use [ and ] instead.
41409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41410  if test "x$has_forbidden_chars" != x; then
41411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41413  fi
41414
41415    # Output is in $new_path
41416
41417  windows_path="$new_path"
41418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41419    unix_path=`$CYGPATH -u "$windows_path"`
41420    new_path="$unix_path"
41421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41423    new_path="$unix_path"
41424  fi
41425
41426    # remove trailing .exe if any
41427    new_path="${new_path/%.exe/}"
41428
41429    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41430    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41431  fi
41432
41433    else
41434      # We're on a unix platform. Hooray! :)
41435      # First separate the path from the arguments. This will split at the first
41436      # space.
41437      complete="$NM"
41438      path="${complete%% *}"
41439      tmp="$complete EOL"
41440      arguments="${tmp#* }"
41441
41442      # Cannot rely on the command "which" here since it doesn't always work.
41443      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41444      if test -z "$is_absolute_path"; then
41445        # Path to executable is not absolute. Find it.
41446        IFS_save="$IFS"
41447        IFS=:
41448        for p in $PATH; do
41449          if test -f "$p/$path" && test -x "$p/$path"; then
41450            new_path="$p/$path"
41451            break
41452          fi
41453        done
41454        IFS="$IFS_save"
41455      else
41456        # This is an absolute path, we can use it without further modifications.
41457        new_path="$path"
41458      fi
41459
41460      if test "x$new_path" = x; then
41461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41462$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41463        has_space=`$ECHO "$complete" | $GREP " "`
41464        if test "x$has_space" != x; then
41465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41467        fi
41468        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41469      fi
41470    fi
41471
41472    # Now join together the path and the arguments once again
41473    if test "x$arguments" != xEOL; then
41474      new_complete="$new_path ${arguments% *}"
41475    else
41476      new_complete="$new_path"
41477    fi
41478
41479    if test "x$complete" != "x$new_complete"; then
41480      NM="$new_complete"
41481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41482$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41483    fi
41484  fi
41485
41486
41487
41488  # Publish this variable in the help.
41489
41490
41491  if [ -z "${GNM+x}" ]; then
41492    # The variable is not set by user, try to locate tool using the code snippet
41493    for ac_prog in gnm
41494do
41495  # Extract the first word of "$ac_prog", so it can be a program name with args.
41496set dummy $ac_prog; ac_word=$2
41497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41498$as_echo_n "checking for $ac_word... " >&6; }
41499if ${ac_cv_path_GNM+:} false; then :
41500  $as_echo_n "(cached) " >&6
41501else
41502  case $GNM in
41503  [\\/]* | ?:[\\/]*)
41504  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41505  ;;
41506  *)
41507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41508for as_dir in $PATH
41509do
41510  IFS=$as_save_IFS
41511  test -z "$as_dir" && as_dir=.
41512    for ac_exec_ext in '' $ac_executable_extensions; do
41513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41514    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41516    break 2
41517  fi
41518done
41519  done
41520IFS=$as_save_IFS
41521
41522  ;;
41523esac
41524fi
41525GNM=$ac_cv_path_GNM
41526if test -n "$GNM"; then
41527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41528$as_echo "$GNM" >&6; }
41529else
41530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41531$as_echo "no" >&6; }
41532fi
41533
41534
41535  test -n "$GNM" && break
41536done
41537
41538  else
41539    # The variable is set, but is it from the command line or the environment?
41540
41541    # Try to remove the string !GNM! from our list.
41542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41544      # If it failed, the variable was not from the command line. Ignore it,
41545      # but warn the user (except for BASH, which is always set by the calling BASH).
41546      if test "xGNM" != xBASH; then
41547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41548$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41549      fi
41550      # Try to locate tool using the code snippet
41551      for ac_prog in gnm
41552do
41553  # Extract the first word of "$ac_prog", so it can be a program name with args.
41554set dummy $ac_prog; ac_word=$2
41555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41556$as_echo_n "checking for $ac_word... " >&6; }
41557if ${ac_cv_path_GNM+:} false; then :
41558  $as_echo_n "(cached) " >&6
41559else
41560  case $GNM in
41561  [\\/]* | ?:[\\/]*)
41562  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41563  ;;
41564  *)
41565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41566for as_dir in $PATH
41567do
41568  IFS=$as_save_IFS
41569  test -z "$as_dir" && as_dir=.
41570    for ac_exec_ext in '' $ac_executable_extensions; do
41571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41572    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41574    break 2
41575  fi
41576done
41577  done
41578IFS=$as_save_IFS
41579
41580  ;;
41581esac
41582fi
41583GNM=$ac_cv_path_GNM
41584if test -n "$GNM"; then
41585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41586$as_echo "$GNM" >&6; }
41587else
41588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41589$as_echo "no" >&6; }
41590fi
41591
41592
41593  test -n "$GNM" && break
41594done
41595
41596    else
41597      # If it succeeded, then it was overridden by the user. We will use it
41598      # for the tool.
41599
41600      # First remove it from the list of overridden variables, so we can test
41601      # for unknown variables in the end.
41602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41603
41604      # Check if we try to supply an empty value
41605      if test "x$GNM" = x; then
41606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41607$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41609$as_echo_n "checking for GNM... " >&6; }
41610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41611$as_echo "disabled" >&6; }
41612      else
41613        # Check if the provided tool contains a complete path.
41614        tool_specified="$GNM"
41615        tool_basename="${tool_specified##*/}"
41616        if test "x$tool_basename" = "x$tool_specified"; then
41617          # A command without a complete path is provided, search $PATH.
41618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41619$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41620          # Extract the first word of "$tool_basename", so it can be a program name with args.
41621set dummy $tool_basename; ac_word=$2
41622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41623$as_echo_n "checking for $ac_word... " >&6; }
41624if ${ac_cv_path_GNM+:} false; then :
41625  $as_echo_n "(cached) " >&6
41626else
41627  case $GNM in
41628  [\\/]* | ?:[\\/]*)
41629  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41630  ;;
41631  *)
41632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41633for as_dir in $PATH
41634do
41635  IFS=$as_save_IFS
41636  test -z "$as_dir" && as_dir=.
41637    for ac_exec_ext in '' $ac_executable_extensions; do
41638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41639    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41641    break 2
41642  fi
41643done
41644  done
41645IFS=$as_save_IFS
41646
41647  ;;
41648esac
41649fi
41650GNM=$ac_cv_path_GNM
41651if test -n "$GNM"; then
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41653$as_echo "$GNM" >&6; }
41654else
41655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41656$as_echo "no" >&6; }
41657fi
41658
41659
41660          if test "x$GNM" = x; then
41661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41662          fi
41663        else
41664          # Otherwise we believe it is a complete path. Use it as it is.
41665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41666$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41668$as_echo_n "checking for GNM... " >&6; }
41669          if test ! -x "$tool_specified"; then
41670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41671$as_echo "not found" >&6; }
41672            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41673          fi
41674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41675$as_echo "$tool_specified" >&6; }
41676        fi
41677      fi
41678    fi
41679
41680  fi
41681
41682
41683
41684  # Only process if variable expands to non-empty
41685
41686  if test "x$GNM" != x; then
41687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41688
41689  # First separate the path from the arguments. This will split at the first
41690  # space.
41691  complete="$GNM"
41692  path="${complete%% *}"
41693  tmp="$complete EOL"
41694  arguments="${tmp#* }"
41695
41696  # Input might be given as Windows format, start by converting to
41697  # unix format.
41698  new_path=`$CYGPATH -u "$path"`
41699
41700  # Now try to locate executable using which
41701  new_path=`$WHICH "$new_path" 2> /dev/null`
41702  # bat and cmd files are not always considered executable in cygwin causing which
41703  # to not find them
41704  if test "x$new_path" = x \
41705      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41706      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41707    new_path=`$CYGPATH -u "$path"`
41708  fi
41709  if test "x$new_path" = x; then
41710    # Oops. Which didn't find the executable.
41711    # The splitting of arguments from the executable at a space might have been incorrect,
41712    # since paths with space are more likely in Windows. Give it another try with the whole
41713    # argument.
41714    path="$complete"
41715    arguments="EOL"
41716    new_path=`$CYGPATH -u "$path"`
41717    new_path=`$WHICH "$new_path" 2> /dev/null`
41718    # bat and cmd files are not always considered executable in cygwin causing which
41719    # to not find them
41720    if test "x$new_path" = x \
41721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41723      new_path=`$CYGPATH -u "$path"`
41724    fi
41725    if test "x$new_path" = x; then
41726      # It's still not found. Now this is an unrecoverable error.
41727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41728$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41729      has_space=`$ECHO "$complete" | $GREP " "`
41730      if test "x$has_space" != x; then
41731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41733      fi
41734      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41735    fi
41736  fi
41737
41738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41741  # "foo.exe" is OK but "foo" is an error.
41742  #
41743  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41744  # It is also a way to make sure we got the proper file name for the real test later on.
41745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41746  if test "x$test_shortpath" = x; then
41747    # Short path failed, file does not exist as specified.
41748    # Try adding .exe or .cmd
41749    if test -f "${new_path}.exe"; then
41750      input_to_shortpath="${new_path}.exe"
41751    elif test -f "${new_path}.cmd"; then
41752      input_to_shortpath="${new_path}.cmd"
41753    else
41754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41755$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41756      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41757$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41758      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41759    fi
41760  else
41761    input_to_shortpath="$new_path"
41762  fi
41763
41764  # Call helper function which possibly converts this using DOS-style short mode.
41765  # If so, the updated path is stored in $new_path.
41766  new_path="$input_to_shortpath"
41767
41768  input_path="$input_to_shortpath"
41769  # Check if we need to convert this using DOS-style short mode. If the path
41770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41771  # take no chances and rewrite it.
41772  # Note: m4 eats our [], so we need to use [ and ] instead.
41773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41774  if test "x$has_forbidden_chars" != x; then
41775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41779      # Going to short mode and back again did indeed matter. Since short mode is
41780      # case insensitive, let's make it lowercase to improve readability.
41781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41782      # Now convert it back to Unix-style (cygpath)
41783      input_path=`$CYGPATH -u "$shortmode_path"`
41784      new_path="$input_path"
41785    fi
41786  fi
41787
41788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41789  if test "x$test_cygdrive_prefix" = x; then
41790    # As a simple fix, exclude /usr/bin since it's not a real path.
41791    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41793      # a path prefixed by /cygdrive for fixpath to work.
41794      new_path="$CYGWIN_ROOT_PATH$input_path"
41795    fi
41796  fi
41797
41798  # remove trailing .exe if any
41799  new_path="${new_path/%.exe/}"
41800
41801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41802
41803  # First separate the path from the arguments. This will split at the first
41804  # space.
41805  complete="$GNM"
41806  path="${complete%% *}"
41807  tmp="$complete EOL"
41808  arguments="${tmp#* }"
41809
41810  # Input might be given as Windows format, start by converting to
41811  # unix format.
41812  new_path="$path"
41813
41814  windows_path="$new_path"
41815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41816    unix_path=`$CYGPATH -u "$windows_path"`
41817    new_path="$unix_path"
41818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41820    new_path="$unix_path"
41821  fi
41822
41823
41824  # Now try to locate executable using which
41825  new_path=`$WHICH "$new_path" 2> /dev/null`
41826
41827  if test "x$new_path" = x; then
41828    # Oops. Which didn't find the executable.
41829    # The splitting of arguments from the executable at a space might have been incorrect,
41830    # since paths with space are more likely in Windows. Give it another try with the whole
41831    # argument.
41832    path="$complete"
41833    arguments="EOL"
41834    new_path="$path"
41835
41836  windows_path="$new_path"
41837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41838    unix_path=`$CYGPATH -u "$windows_path"`
41839    new_path="$unix_path"
41840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41842    new_path="$unix_path"
41843  fi
41844
41845
41846    new_path=`$WHICH "$new_path" 2> /dev/null`
41847    # bat and cmd files are not always considered executable in MSYS causing which
41848    # to not find them
41849    if test "x$new_path" = x \
41850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41852      new_path="$path"
41853
41854  windows_path="$new_path"
41855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41856    unix_path=`$CYGPATH -u "$windows_path"`
41857    new_path="$unix_path"
41858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41860    new_path="$unix_path"
41861  fi
41862
41863    fi
41864
41865    if test "x$new_path" = x; then
41866      # It's still not found. Now this is an unrecoverable error.
41867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41868$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41869      has_space=`$ECHO "$complete" | $GREP " "`
41870      if test "x$has_space" != x; then
41871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41873      fi
41874      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41875    fi
41876  fi
41877
41878  # Now new_path has a complete unix path to the binary
41879  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41880    # Keep paths in /bin as-is, but remove trailing .exe if any
41881    new_path="${new_path/%.exe/}"
41882    # Do not save /bin paths to all_fixpath_prefixes!
41883  else
41884    # Not in mixed or Windows style, start by that.
41885    new_path=`cmd //c echo $new_path`
41886
41887  input_path="$new_path"
41888  # Check if we need to convert this using DOS-style short mode. If the path
41889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41890  # take no chances and rewrite it.
41891  # Note: m4 eats our [], so we need to use [ and ] instead.
41892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41893  if test "x$has_forbidden_chars" != x; then
41894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41896  fi
41897
41898    # Output is in $new_path
41899
41900  windows_path="$new_path"
41901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41902    unix_path=`$CYGPATH -u "$windows_path"`
41903    new_path="$unix_path"
41904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41906    new_path="$unix_path"
41907  fi
41908
41909    # remove trailing .exe if any
41910    new_path="${new_path/%.exe/}"
41911
41912    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41913    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41914  fi
41915
41916    else
41917      # We're on a unix platform. Hooray! :)
41918      # First separate the path from the arguments. This will split at the first
41919      # space.
41920      complete="$GNM"
41921      path="${complete%% *}"
41922      tmp="$complete EOL"
41923      arguments="${tmp#* }"
41924
41925      # Cannot rely on the command "which" here since it doesn't always work.
41926      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41927      if test -z "$is_absolute_path"; then
41928        # Path to executable is not absolute. Find it.
41929        IFS_save="$IFS"
41930        IFS=:
41931        for p in $PATH; do
41932          if test -f "$p/$path" && test -x "$p/$path"; then
41933            new_path="$p/$path"
41934            break
41935          fi
41936        done
41937        IFS="$IFS_save"
41938      else
41939        # This is an absolute path, we can use it without further modifications.
41940        new_path="$path"
41941      fi
41942
41943      if test "x$new_path" = x; then
41944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41945$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41946        has_space=`$ECHO "$complete" | $GREP " "`
41947        if test "x$has_space" != x; then
41948          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41949$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41950        fi
41951        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41952      fi
41953    fi
41954
41955    # Now join together the path and the arguments once again
41956    if test "x$arguments" != xEOL; then
41957      new_complete="$new_path ${arguments% *}"
41958    else
41959      new_complete="$new_path"
41960    fi
41961
41962    if test "x$complete" != "x$new_complete"; then
41963      GNM="$new_complete"
41964      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41965$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41966    fi
41967  fi
41968
41969  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41970    # FIXME: we should unify this with the solaris case above.
41971
41972
41973  # Publish this variable in the help.
41974
41975
41976  if [ -z "${STRIP+x}" ]; then
41977    # The variable is not set by user, try to locate tool using the code snippet
41978    if test -n "$ac_tool_prefix"; then
41979  for ac_prog in strip
41980  do
41981    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41982set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41984$as_echo_n "checking for $ac_word... " >&6; }
41985if ${ac_cv_prog_STRIP+:} false; then :
41986  $as_echo_n "(cached) " >&6
41987else
41988  if test -n "$STRIP"; then
41989  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41990else
41991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41992for as_dir in $PATH
41993do
41994  IFS=$as_save_IFS
41995  test -z "$as_dir" && as_dir=.
41996    for ac_exec_ext in '' $ac_executable_extensions; do
41997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41998    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42000    break 2
42001  fi
42002done
42003  done
42004IFS=$as_save_IFS
42005
42006fi
42007fi
42008STRIP=$ac_cv_prog_STRIP
42009if test -n "$STRIP"; then
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42011$as_echo "$STRIP" >&6; }
42012else
42013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42014$as_echo "no" >&6; }
42015fi
42016
42017
42018    test -n "$STRIP" && break
42019  done
42020fi
42021if test -z "$STRIP"; then
42022  ac_ct_STRIP=$STRIP
42023  for ac_prog in strip
42024do
42025  # Extract the first word of "$ac_prog", so it can be a program name with args.
42026set dummy $ac_prog; ac_word=$2
42027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42028$as_echo_n "checking for $ac_word... " >&6; }
42029if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42030  $as_echo_n "(cached) " >&6
42031else
42032  if test -n "$ac_ct_STRIP"; then
42033  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42034else
42035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42036for as_dir in $PATH
42037do
42038  IFS=$as_save_IFS
42039  test -z "$as_dir" && as_dir=.
42040    for ac_exec_ext in '' $ac_executable_extensions; do
42041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42042    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42044    break 2
42045  fi
42046done
42047  done
42048IFS=$as_save_IFS
42049
42050fi
42051fi
42052ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42053if test -n "$ac_ct_STRIP"; then
42054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42055$as_echo "$ac_ct_STRIP" >&6; }
42056else
42057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42058$as_echo "no" >&6; }
42059fi
42060
42061
42062  test -n "$ac_ct_STRIP" && break
42063done
42064
42065  if test "x$ac_ct_STRIP" = x; then
42066    STRIP=""
42067  else
42068    case $cross_compiling:$ac_tool_warned in
42069yes:)
42070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42072ac_tool_warned=yes ;;
42073esac
42074    STRIP=$ac_ct_STRIP
42075  fi
42076fi
42077
42078  else
42079    # The variable is set, but is it from the command line or the environment?
42080
42081    # Try to remove the string !STRIP! from our list.
42082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42084      # If it failed, the variable was not from the command line. Ignore it,
42085      # but warn the user (except for BASH, which is always set by the calling BASH).
42086      if test "xSTRIP" != xBASH; then
42087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42088$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42089      fi
42090      # Try to locate tool using the code snippet
42091      if test -n "$ac_tool_prefix"; then
42092  for ac_prog in strip
42093  do
42094    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42097$as_echo_n "checking for $ac_word... " >&6; }
42098if ${ac_cv_prog_STRIP+:} false; then :
42099  $as_echo_n "(cached) " >&6
42100else
42101  if test -n "$STRIP"; then
42102  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42103else
42104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42105for as_dir in $PATH
42106do
42107  IFS=$as_save_IFS
42108  test -z "$as_dir" && as_dir=.
42109    for ac_exec_ext in '' $ac_executable_extensions; do
42110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42111    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42113    break 2
42114  fi
42115done
42116  done
42117IFS=$as_save_IFS
42118
42119fi
42120fi
42121STRIP=$ac_cv_prog_STRIP
42122if test -n "$STRIP"; then
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42124$as_echo "$STRIP" >&6; }
42125else
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42127$as_echo "no" >&6; }
42128fi
42129
42130
42131    test -n "$STRIP" && break
42132  done
42133fi
42134if test -z "$STRIP"; then
42135  ac_ct_STRIP=$STRIP
42136  for ac_prog in strip
42137do
42138  # Extract the first word of "$ac_prog", so it can be a program name with args.
42139set dummy $ac_prog; ac_word=$2
42140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42141$as_echo_n "checking for $ac_word... " >&6; }
42142if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42143  $as_echo_n "(cached) " >&6
42144else
42145  if test -n "$ac_ct_STRIP"; then
42146  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42147else
42148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42149for as_dir in $PATH
42150do
42151  IFS=$as_save_IFS
42152  test -z "$as_dir" && as_dir=.
42153    for ac_exec_ext in '' $ac_executable_extensions; do
42154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42155    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42157    break 2
42158  fi
42159done
42160  done
42161IFS=$as_save_IFS
42162
42163fi
42164fi
42165ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42166if test -n "$ac_ct_STRIP"; then
42167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42168$as_echo "$ac_ct_STRIP" >&6; }
42169else
42170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42171$as_echo "no" >&6; }
42172fi
42173
42174
42175  test -n "$ac_ct_STRIP" && break
42176done
42177
42178  if test "x$ac_ct_STRIP" = x; then
42179    STRIP=""
42180  else
42181    case $cross_compiling:$ac_tool_warned in
42182yes:)
42183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42185ac_tool_warned=yes ;;
42186esac
42187    STRIP=$ac_ct_STRIP
42188  fi
42189fi
42190
42191    else
42192      # If it succeeded, then it was overridden by the user. We will use it
42193      # for the tool.
42194
42195      # First remove it from the list of overridden variables, so we can test
42196      # for unknown variables in the end.
42197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42198
42199      # Check if we try to supply an empty value
42200      if test "x$STRIP" = x; then
42201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42202$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42204$as_echo_n "checking for STRIP... " >&6; }
42205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42206$as_echo "disabled" >&6; }
42207      else
42208        # Check if the provided tool contains a complete path.
42209        tool_specified="$STRIP"
42210        tool_basename="${tool_specified##*/}"
42211        if test "x$tool_basename" = "x$tool_specified"; then
42212          # A command without a complete path is provided, search $PATH.
42213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42214$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42215          # Extract the first word of "$tool_basename", so it can be a program name with args.
42216set dummy $tool_basename; ac_word=$2
42217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42218$as_echo_n "checking for $ac_word... " >&6; }
42219if ${ac_cv_path_STRIP+:} false; then :
42220  $as_echo_n "(cached) " >&6
42221else
42222  case $STRIP in
42223  [\\/]* | ?:[\\/]*)
42224  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42225  ;;
42226  *)
42227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42228for as_dir in $PATH
42229do
42230  IFS=$as_save_IFS
42231  test -z "$as_dir" && as_dir=.
42232    for ac_exec_ext in '' $ac_executable_extensions; do
42233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42234    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42236    break 2
42237  fi
42238done
42239  done
42240IFS=$as_save_IFS
42241
42242  ;;
42243esac
42244fi
42245STRIP=$ac_cv_path_STRIP
42246if test -n "$STRIP"; then
42247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42248$as_echo "$STRIP" >&6; }
42249else
42250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42251$as_echo "no" >&6; }
42252fi
42253
42254
42255          if test "x$STRIP" = x; then
42256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42257          fi
42258        else
42259          # Otherwise we believe it is a complete path. Use it as it is.
42260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42261$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42263$as_echo_n "checking for STRIP... " >&6; }
42264          if test ! -x "$tool_specified"; then
42265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42266$as_echo "not found" >&6; }
42267            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42268          fi
42269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42270$as_echo "$tool_specified" >&6; }
42271        fi
42272      fi
42273    fi
42274
42275  fi
42276
42277
42278
42279  # Only process if variable expands to non-empty
42280
42281  if test "x$STRIP" != x; then
42282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42283
42284  # First separate the path from the arguments. This will split at the first
42285  # space.
42286  complete="$STRIP"
42287  path="${complete%% *}"
42288  tmp="$complete EOL"
42289  arguments="${tmp#* }"
42290
42291  # Input might be given as Windows format, start by converting to
42292  # unix format.
42293  new_path=`$CYGPATH -u "$path"`
42294
42295  # Now try to locate executable using which
42296  new_path=`$WHICH "$new_path" 2> /dev/null`
42297  # bat and cmd files are not always considered executable in cygwin causing which
42298  # to not find them
42299  if test "x$new_path" = x \
42300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42302    new_path=`$CYGPATH -u "$path"`
42303  fi
42304  if test "x$new_path" = x; then
42305    # Oops. Which didn't find the executable.
42306    # The splitting of arguments from the executable at a space might have been incorrect,
42307    # since paths with space are more likely in Windows. Give it another try with the whole
42308    # argument.
42309    path="$complete"
42310    arguments="EOL"
42311    new_path=`$CYGPATH -u "$path"`
42312    new_path=`$WHICH "$new_path" 2> /dev/null`
42313    # bat and cmd files are not always considered executable in cygwin causing which
42314    # to not find them
42315    if test "x$new_path" = x \
42316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42318      new_path=`$CYGPATH -u "$path"`
42319    fi
42320    if test "x$new_path" = x; then
42321      # It's still not found. Now this is an unrecoverable error.
42322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42323$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42324      has_space=`$ECHO "$complete" | $GREP " "`
42325      if test "x$has_space" != x; then
42326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42328      fi
42329      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42330    fi
42331  fi
42332
42333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42336  # "foo.exe" is OK but "foo" is an error.
42337  #
42338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42339  # It is also a way to make sure we got the proper file name for the real test later on.
42340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42341  if test "x$test_shortpath" = x; then
42342    # Short path failed, file does not exist as specified.
42343    # Try adding .exe or .cmd
42344    if test -f "${new_path}.exe"; then
42345      input_to_shortpath="${new_path}.exe"
42346    elif test -f "${new_path}.cmd"; then
42347      input_to_shortpath="${new_path}.cmd"
42348    else
42349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42350$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42353      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42354    fi
42355  else
42356    input_to_shortpath="$new_path"
42357  fi
42358
42359  # Call helper function which possibly converts this using DOS-style short mode.
42360  # If so, the updated path is stored in $new_path.
42361  new_path="$input_to_shortpath"
42362
42363  input_path="$input_to_shortpath"
42364  # Check if we need to convert this using DOS-style short mode. If the path
42365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42366  # take no chances and rewrite it.
42367  # Note: m4 eats our [], so we need to use [ and ] instead.
42368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42369  if test "x$has_forbidden_chars" != x; then
42370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42374      # Going to short mode and back again did indeed matter. Since short mode is
42375      # case insensitive, let's make it lowercase to improve readability.
42376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42377      # Now convert it back to Unix-style (cygpath)
42378      input_path=`$CYGPATH -u "$shortmode_path"`
42379      new_path="$input_path"
42380    fi
42381  fi
42382
42383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42384  if test "x$test_cygdrive_prefix" = x; then
42385    # As a simple fix, exclude /usr/bin since it's not a real path.
42386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42388      # a path prefixed by /cygdrive for fixpath to work.
42389      new_path="$CYGWIN_ROOT_PATH$input_path"
42390    fi
42391  fi
42392
42393  # remove trailing .exe if any
42394  new_path="${new_path/%.exe/}"
42395
42396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42397
42398  # First separate the path from the arguments. This will split at the first
42399  # space.
42400  complete="$STRIP"
42401  path="${complete%% *}"
42402  tmp="$complete EOL"
42403  arguments="${tmp#* }"
42404
42405  # Input might be given as Windows format, start by converting to
42406  # unix format.
42407  new_path="$path"
42408
42409  windows_path="$new_path"
42410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42411    unix_path=`$CYGPATH -u "$windows_path"`
42412    new_path="$unix_path"
42413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42415    new_path="$unix_path"
42416  fi
42417
42418
42419  # Now try to locate executable using which
42420  new_path=`$WHICH "$new_path" 2> /dev/null`
42421
42422  if test "x$new_path" = x; then
42423    # Oops. Which didn't find the executable.
42424    # The splitting of arguments from the executable at a space might have been incorrect,
42425    # since paths with space are more likely in Windows. Give it another try with the whole
42426    # argument.
42427    path="$complete"
42428    arguments="EOL"
42429    new_path="$path"
42430
42431  windows_path="$new_path"
42432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42433    unix_path=`$CYGPATH -u "$windows_path"`
42434    new_path="$unix_path"
42435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42437    new_path="$unix_path"
42438  fi
42439
42440
42441    new_path=`$WHICH "$new_path" 2> /dev/null`
42442    # bat and cmd files are not always considered executable in MSYS causing which
42443    # to not find them
42444    if test "x$new_path" = x \
42445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42447      new_path="$path"
42448
42449  windows_path="$new_path"
42450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42451    unix_path=`$CYGPATH -u "$windows_path"`
42452    new_path="$unix_path"
42453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42455    new_path="$unix_path"
42456  fi
42457
42458    fi
42459
42460    if test "x$new_path" = x; then
42461      # It's still not found. Now this is an unrecoverable error.
42462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42463$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42464      has_space=`$ECHO "$complete" | $GREP " "`
42465      if test "x$has_space" != x; then
42466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42468      fi
42469      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42470    fi
42471  fi
42472
42473  # Now new_path has a complete unix path to the binary
42474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42475    # Keep paths in /bin as-is, but remove trailing .exe if any
42476    new_path="${new_path/%.exe/}"
42477    # Do not save /bin paths to all_fixpath_prefixes!
42478  else
42479    # Not in mixed or Windows style, start by that.
42480    new_path=`cmd //c echo $new_path`
42481
42482  input_path="$new_path"
42483  # Check if we need to convert this using DOS-style short mode. If the path
42484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42485  # take no chances and rewrite it.
42486  # Note: m4 eats our [], so we need to use [ and ] instead.
42487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42488  if test "x$has_forbidden_chars" != x; then
42489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42491  fi
42492
42493    # Output is in $new_path
42494
42495  windows_path="$new_path"
42496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42497    unix_path=`$CYGPATH -u "$windows_path"`
42498    new_path="$unix_path"
42499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42501    new_path="$unix_path"
42502  fi
42503
42504    # remove trailing .exe if any
42505    new_path="${new_path/%.exe/}"
42506
42507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42509  fi
42510
42511    else
42512      # We're on a unix platform. Hooray! :)
42513      # First separate the path from the arguments. This will split at the first
42514      # space.
42515      complete="$STRIP"
42516      path="${complete%% *}"
42517      tmp="$complete EOL"
42518      arguments="${tmp#* }"
42519
42520      # Cannot rely on the command "which" here since it doesn't always work.
42521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42522      if test -z "$is_absolute_path"; then
42523        # Path to executable is not absolute. Find it.
42524        IFS_save="$IFS"
42525        IFS=:
42526        for p in $PATH; do
42527          if test -f "$p/$path" && test -x "$p/$path"; then
42528            new_path="$p/$path"
42529            break
42530          fi
42531        done
42532        IFS="$IFS_save"
42533      else
42534        # This is an absolute path, we can use it without further modifications.
42535        new_path="$path"
42536      fi
42537
42538      if test "x$new_path" = x; then
42539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42540$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42541        has_space=`$ECHO "$complete" | $GREP " "`
42542        if test "x$has_space" != x; then
42543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42545        fi
42546        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42547      fi
42548    fi
42549
42550    # Now join together the path and the arguments once again
42551    if test "x$arguments" != xEOL; then
42552      new_complete="$new_path ${arguments% *}"
42553    else
42554      new_complete="$new_path"
42555    fi
42556
42557    if test "x$complete" != "x$new_complete"; then
42558      STRIP="$new_complete"
42559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42560$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42561    fi
42562  fi
42563
42564    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42565
42566
42567  # Publish this variable in the help.
42568
42569
42570  if [ -z "${NM+x}" ]; then
42571    # The variable is not set by user, try to locate tool using the code snippet
42572    if test -n "$ac_tool_prefix"; then
42573  for ac_prog in nm gcc-nm
42574  do
42575    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42578$as_echo_n "checking for $ac_word... " >&6; }
42579if ${ac_cv_prog_NM+:} false; then :
42580  $as_echo_n "(cached) " >&6
42581else
42582  if test -n "$NM"; then
42583  ac_cv_prog_NM="$NM" # Let the user override the test.
42584else
42585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42586for as_dir in $PATH
42587do
42588  IFS=$as_save_IFS
42589  test -z "$as_dir" && as_dir=.
42590    for ac_exec_ext in '' $ac_executable_extensions; do
42591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42592    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42594    break 2
42595  fi
42596done
42597  done
42598IFS=$as_save_IFS
42599
42600fi
42601fi
42602NM=$ac_cv_prog_NM
42603if test -n "$NM"; then
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42605$as_echo "$NM" >&6; }
42606else
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42608$as_echo "no" >&6; }
42609fi
42610
42611
42612    test -n "$NM" && break
42613  done
42614fi
42615if test -z "$NM"; then
42616  ac_ct_NM=$NM
42617  for ac_prog in nm gcc-nm
42618do
42619  # Extract the first word of "$ac_prog", so it can be a program name with args.
42620set dummy $ac_prog; ac_word=$2
42621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42622$as_echo_n "checking for $ac_word... " >&6; }
42623if ${ac_cv_prog_ac_ct_NM+:} false; then :
42624  $as_echo_n "(cached) " >&6
42625else
42626  if test -n "$ac_ct_NM"; then
42627  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42628else
42629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42630for as_dir in $PATH
42631do
42632  IFS=$as_save_IFS
42633  test -z "$as_dir" && as_dir=.
42634    for ac_exec_ext in '' $ac_executable_extensions; do
42635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42636    ac_cv_prog_ac_ct_NM="$ac_prog"
42637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42638    break 2
42639  fi
42640done
42641  done
42642IFS=$as_save_IFS
42643
42644fi
42645fi
42646ac_ct_NM=$ac_cv_prog_ac_ct_NM
42647if test -n "$ac_ct_NM"; then
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42649$as_echo "$ac_ct_NM" >&6; }
42650else
42651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42652$as_echo "no" >&6; }
42653fi
42654
42655
42656  test -n "$ac_ct_NM" && break
42657done
42658
42659  if test "x$ac_ct_NM" = x; then
42660    NM=""
42661  else
42662    case $cross_compiling:$ac_tool_warned in
42663yes:)
42664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42666ac_tool_warned=yes ;;
42667esac
42668    NM=$ac_ct_NM
42669  fi
42670fi
42671
42672  else
42673    # The variable is set, but is it from the command line or the environment?
42674
42675    # Try to remove the string !NM! from our list.
42676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42678      # If it failed, the variable was not from the command line. Ignore it,
42679      # but warn the user (except for BASH, which is always set by the calling BASH).
42680      if test "xNM" != xBASH; then
42681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42682$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42683      fi
42684      # Try to locate tool using the code snippet
42685      if test -n "$ac_tool_prefix"; then
42686  for ac_prog in nm gcc-nm
42687  do
42688    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42689set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42691$as_echo_n "checking for $ac_word... " >&6; }
42692if ${ac_cv_prog_NM+:} false; then :
42693  $as_echo_n "(cached) " >&6
42694else
42695  if test -n "$NM"; then
42696  ac_cv_prog_NM="$NM" # Let the user override the test.
42697else
42698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42699for as_dir in $PATH
42700do
42701  IFS=$as_save_IFS
42702  test -z "$as_dir" && as_dir=.
42703    for ac_exec_ext in '' $ac_executable_extensions; do
42704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42705    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42707    break 2
42708  fi
42709done
42710  done
42711IFS=$as_save_IFS
42712
42713fi
42714fi
42715NM=$ac_cv_prog_NM
42716if test -n "$NM"; then
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42718$as_echo "$NM" >&6; }
42719else
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42721$as_echo "no" >&6; }
42722fi
42723
42724
42725    test -n "$NM" && break
42726  done
42727fi
42728if test -z "$NM"; then
42729  ac_ct_NM=$NM
42730  for ac_prog in nm gcc-nm
42731do
42732  # Extract the first word of "$ac_prog", so it can be a program name with args.
42733set dummy $ac_prog; ac_word=$2
42734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42735$as_echo_n "checking for $ac_word... " >&6; }
42736if ${ac_cv_prog_ac_ct_NM+:} false; then :
42737  $as_echo_n "(cached) " >&6
42738else
42739  if test -n "$ac_ct_NM"; then
42740  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42741else
42742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42743for as_dir in $PATH
42744do
42745  IFS=$as_save_IFS
42746  test -z "$as_dir" && as_dir=.
42747    for ac_exec_ext in '' $ac_executable_extensions; do
42748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42749    ac_cv_prog_ac_ct_NM="$ac_prog"
42750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42751    break 2
42752  fi
42753done
42754  done
42755IFS=$as_save_IFS
42756
42757fi
42758fi
42759ac_ct_NM=$ac_cv_prog_ac_ct_NM
42760if test -n "$ac_ct_NM"; then
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42762$as_echo "$ac_ct_NM" >&6; }
42763else
42764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42765$as_echo "no" >&6; }
42766fi
42767
42768
42769  test -n "$ac_ct_NM" && break
42770done
42771
42772  if test "x$ac_ct_NM" = x; then
42773    NM=""
42774  else
42775    case $cross_compiling:$ac_tool_warned in
42776yes:)
42777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42779ac_tool_warned=yes ;;
42780esac
42781    NM=$ac_ct_NM
42782  fi
42783fi
42784
42785    else
42786      # If it succeeded, then it was overridden by the user. We will use it
42787      # for the tool.
42788
42789      # First remove it from the list of overridden variables, so we can test
42790      # for unknown variables in the end.
42791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42792
42793      # Check if we try to supply an empty value
42794      if test "x$NM" = x; then
42795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42796$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42798$as_echo_n "checking for NM... " >&6; }
42799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42800$as_echo "disabled" >&6; }
42801      else
42802        # Check if the provided tool contains a complete path.
42803        tool_specified="$NM"
42804        tool_basename="${tool_specified##*/}"
42805        if test "x$tool_basename" = "x$tool_specified"; then
42806          # A command without a complete path is provided, search $PATH.
42807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42808$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42809          # Extract the first word of "$tool_basename", so it can be a program name with args.
42810set dummy $tool_basename; ac_word=$2
42811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42812$as_echo_n "checking for $ac_word... " >&6; }
42813if ${ac_cv_path_NM+:} false; then :
42814  $as_echo_n "(cached) " >&6
42815else
42816  case $NM in
42817  [\\/]* | ?:[\\/]*)
42818  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42819  ;;
42820  *)
42821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42822for as_dir in $PATH
42823do
42824  IFS=$as_save_IFS
42825  test -z "$as_dir" && as_dir=.
42826    for ac_exec_ext in '' $ac_executable_extensions; do
42827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42828    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42830    break 2
42831  fi
42832done
42833  done
42834IFS=$as_save_IFS
42835
42836  ;;
42837esac
42838fi
42839NM=$ac_cv_path_NM
42840if test -n "$NM"; then
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42842$as_echo "$NM" >&6; }
42843else
42844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42845$as_echo "no" >&6; }
42846fi
42847
42848
42849          if test "x$NM" = x; then
42850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42851          fi
42852        else
42853          # Otherwise we believe it is a complete path. Use it as it is.
42854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42855$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42857$as_echo_n "checking for NM... " >&6; }
42858          if test ! -x "$tool_specified"; then
42859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42860$as_echo "not found" >&6; }
42861            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42862          fi
42863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42864$as_echo "$tool_specified" >&6; }
42865        fi
42866      fi
42867    fi
42868
42869  fi
42870
42871
42872    else
42873
42874
42875  # Publish this variable in the help.
42876
42877
42878  if [ -z "${NM+x}" ]; then
42879    # The variable is not set by user, try to locate tool using the code snippet
42880    if test -n "$ac_tool_prefix"; then
42881  for ac_prog in nm
42882  do
42883    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42884set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42886$as_echo_n "checking for $ac_word... " >&6; }
42887if ${ac_cv_prog_NM+:} false; then :
42888  $as_echo_n "(cached) " >&6
42889else
42890  if test -n "$NM"; then
42891  ac_cv_prog_NM="$NM" # Let the user override the test.
42892else
42893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42894for as_dir in $PATH
42895do
42896  IFS=$as_save_IFS
42897  test -z "$as_dir" && as_dir=.
42898    for ac_exec_ext in '' $ac_executable_extensions; do
42899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42900    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42902    break 2
42903  fi
42904done
42905  done
42906IFS=$as_save_IFS
42907
42908fi
42909fi
42910NM=$ac_cv_prog_NM
42911if test -n "$NM"; then
42912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42913$as_echo "$NM" >&6; }
42914else
42915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42916$as_echo "no" >&6; }
42917fi
42918
42919
42920    test -n "$NM" && break
42921  done
42922fi
42923if test -z "$NM"; then
42924  ac_ct_NM=$NM
42925  for ac_prog in nm
42926do
42927  # Extract the first word of "$ac_prog", so it can be a program name with args.
42928set dummy $ac_prog; ac_word=$2
42929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42930$as_echo_n "checking for $ac_word... " >&6; }
42931if ${ac_cv_prog_ac_ct_NM+:} false; then :
42932  $as_echo_n "(cached) " >&6
42933else
42934  if test -n "$ac_ct_NM"; then
42935  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42936else
42937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42938for as_dir in $PATH
42939do
42940  IFS=$as_save_IFS
42941  test -z "$as_dir" && as_dir=.
42942    for ac_exec_ext in '' $ac_executable_extensions; do
42943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42944    ac_cv_prog_ac_ct_NM="$ac_prog"
42945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42946    break 2
42947  fi
42948done
42949  done
42950IFS=$as_save_IFS
42951
42952fi
42953fi
42954ac_ct_NM=$ac_cv_prog_ac_ct_NM
42955if test -n "$ac_ct_NM"; then
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42957$as_echo "$ac_ct_NM" >&6; }
42958else
42959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42960$as_echo "no" >&6; }
42961fi
42962
42963
42964  test -n "$ac_ct_NM" && break
42965done
42966
42967  if test "x$ac_ct_NM" = x; then
42968    NM=""
42969  else
42970    case $cross_compiling:$ac_tool_warned in
42971yes:)
42972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42974ac_tool_warned=yes ;;
42975esac
42976    NM=$ac_ct_NM
42977  fi
42978fi
42979
42980  else
42981    # The variable is set, but is it from the command line or the environment?
42982
42983    # Try to remove the string !NM! from our list.
42984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42986      # If it failed, the variable was not from the command line. Ignore it,
42987      # but warn the user (except for BASH, which is always set by the calling BASH).
42988      if test "xNM" != xBASH; then
42989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42990$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42991      fi
42992      # Try to locate tool using the code snippet
42993      if test -n "$ac_tool_prefix"; then
42994  for ac_prog in nm
42995  do
42996    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42997set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42999$as_echo_n "checking for $ac_word... " >&6; }
43000if ${ac_cv_prog_NM+:} false; then :
43001  $as_echo_n "(cached) " >&6
43002else
43003  if test -n "$NM"; then
43004  ac_cv_prog_NM="$NM" # Let the user override the test.
43005else
43006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43007for as_dir in $PATH
43008do
43009  IFS=$as_save_IFS
43010  test -z "$as_dir" && as_dir=.
43011    for ac_exec_ext in '' $ac_executable_extensions; do
43012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43013    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43015    break 2
43016  fi
43017done
43018  done
43019IFS=$as_save_IFS
43020
43021fi
43022fi
43023NM=$ac_cv_prog_NM
43024if test -n "$NM"; then
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43026$as_echo "$NM" >&6; }
43027else
43028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43029$as_echo "no" >&6; }
43030fi
43031
43032
43033    test -n "$NM" && break
43034  done
43035fi
43036if test -z "$NM"; then
43037  ac_ct_NM=$NM
43038  for ac_prog in nm
43039do
43040  # Extract the first word of "$ac_prog", so it can be a program name with args.
43041set dummy $ac_prog; ac_word=$2
43042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43043$as_echo_n "checking for $ac_word... " >&6; }
43044if ${ac_cv_prog_ac_ct_NM+:} false; then :
43045  $as_echo_n "(cached) " >&6
43046else
43047  if test -n "$ac_ct_NM"; then
43048  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43049else
43050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43051for as_dir in $PATH
43052do
43053  IFS=$as_save_IFS
43054  test -z "$as_dir" && as_dir=.
43055    for ac_exec_ext in '' $ac_executable_extensions; do
43056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43057    ac_cv_prog_ac_ct_NM="$ac_prog"
43058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43059    break 2
43060  fi
43061done
43062  done
43063IFS=$as_save_IFS
43064
43065fi
43066fi
43067ac_ct_NM=$ac_cv_prog_ac_ct_NM
43068if test -n "$ac_ct_NM"; then
43069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43070$as_echo "$ac_ct_NM" >&6; }
43071else
43072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43073$as_echo "no" >&6; }
43074fi
43075
43076
43077  test -n "$ac_ct_NM" && break
43078done
43079
43080  if test "x$ac_ct_NM" = x; then
43081    NM=""
43082  else
43083    case $cross_compiling:$ac_tool_warned in
43084yes:)
43085{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43086$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43087ac_tool_warned=yes ;;
43088esac
43089    NM=$ac_ct_NM
43090  fi
43091fi
43092
43093    else
43094      # If it succeeded, then it was overridden by the user. We will use it
43095      # for the tool.
43096
43097      # First remove it from the list of overridden variables, so we can test
43098      # for unknown variables in the end.
43099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43100
43101      # Check if we try to supply an empty value
43102      if test "x$NM" = x; then
43103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43104$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43106$as_echo_n "checking for NM... " >&6; }
43107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43108$as_echo "disabled" >&6; }
43109      else
43110        # Check if the provided tool contains a complete path.
43111        tool_specified="$NM"
43112        tool_basename="${tool_specified##*/}"
43113        if test "x$tool_basename" = "x$tool_specified"; then
43114          # A command without a complete path is provided, search $PATH.
43115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43116$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43117          # Extract the first word of "$tool_basename", so it can be a program name with args.
43118set dummy $tool_basename; ac_word=$2
43119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43120$as_echo_n "checking for $ac_word... " >&6; }
43121if ${ac_cv_path_NM+:} false; then :
43122  $as_echo_n "(cached) " >&6
43123else
43124  case $NM in
43125  [\\/]* | ?:[\\/]*)
43126  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43127  ;;
43128  *)
43129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43130for as_dir in $PATH
43131do
43132  IFS=$as_save_IFS
43133  test -z "$as_dir" && as_dir=.
43134    for ac_exec_ext in '' $ac_executable_extensions; do
43135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43136    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43138    break 2
43139  fi
43140done
43141  done
43142IFS=$as_save_IFS
43143
43144  ;;
43145esac
43146fi
43147NM=$ac_cv_path_NM
43148if test -n "$NM"; then
43149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43150$as_echo "$NM" >&6; }
43151else
43152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43153$as_echo "no" >&6; }
43154fi
43155
43156
43157          if test "x$NM" = x; then
43158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43159          fi
43160        else
43161          # Otherwise we believe it is a complete path. Use it as it is.
43162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43163$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43165$as_echo_n "checking for NM... " >&6; }
43166          if test ! -x "$tool_specified"; then
43167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43168$as_echo "not found" >&6; }
43169            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43170          fi
43171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43172$as_echo "$tool_specified" >&6; }
43173        fi
43174      fi
43175    fi
43176
43177  fi
43178
43179
43180    fi
43181
43182  # Only process if variable expands to non-empty
43183
43184  if test "x$NM" != x; then
43185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43186
43187  # First separate the path from the arguments. This will split at the first
43188  # space.
43189  complete="$NM"
43190  path="${complete%% *}"
43191  tmp="$complete EOL"
43192  arguments="${tmp#* }"
43193
43194  # Input might be given as Windows format, start by converting to
43195  # unix format.
43196  new_path=`$CYGPATH -u "$path"`
43197
43198  # Now try to locate executable using which
43199  new_path=`$WHICH "$new_path" 2> /dev/null`
43200  # bat and cmd files are not always considered executable in cygwin causing which
43201  # to not find them
43202  if test "x$new_path" = x \
43203      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43204      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43205    new_path=`$CYGPATH -u "$path"`
43206  fi
43207  if test "x$new_path" = x; then
43208    # Oops. Which didn't find the executable.
43209    # The splitting of arguments from the executable at a space might have been incorrect,
43210    # since paths with space are more likely in Windows. Give it another try with the whole
43211    # argument.
43212    path="$complete"
43213    arguments="EOL"
43214    new_path=`$CYGPATH -u "$path"`
43215    new_path=`$WHICH "$new_path" 2> /dev/null`
43216    # bat and cmd files are not always considered executable in cygwin causing which
43217    # to not find them
43218    if test "x$new_path" = x \
43219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43221      new_path=`$CYGPATH -u "$path"`
43222    fi
43223    if test "x$new_path" = x; then
43224      # It's still not found. Now this is an unrecoverable error.
43225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43226$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43227      has_space=`$ECHO "$complete" | $GREP " "`
43228      if test "x$has_space" != x; then
43229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43231      fi
43232      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43233    fi
43234  fi
43235
43236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43239  # "foo.exe" is OK but "foo" is an error.
43240  #
43241  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43242  # It is also a way to make sure we got the proper file name for the real test later on.
43243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43244  if test "x$test_shortpath" = x; then
43245    # Short path failed, file does not exist as specified.
43246    # Try adding .exe or .cmd
43247    if test -f "${new_path}.exe"; then
43248      input_to_shortpath="${new_path}.exe"
43249    elif test -f "${new_path}.cmd"; then
43250      input_to_shortpath="${new_path}.cmd"
43251    else
43252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43253$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43256      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43257    fi
43258  else
43259    input_to_shortpath="$new_path"
43260  fi
43261
43262  # Call helper function which possibly converts this using DOS-style short mode.
43263  # If so, the updated path is stored in $new_path.
43264  new_path="$input_to_shortpath"
43265
43266  input_path="$input_to_shortpath"
43267  # Check if we need to convert this using DOS-style short mode. If the path
43268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43269  # take no chances and rewrite it.
43270  # Note: m4 eats our [], so we need to use [ and ] instead.
43271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43272  if test "x$has_forbidden_chars" != x; then
43273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43277      # Going to short mode and back again did indeed matter. Since short mode is
43278      # case insensitive, let's make it lowercase to improve readability.
43279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43280      # Now convert it back to Unix-style (cygpath)
43281      input_path=`$CYGPATH -u "$shortmode_path"`
43282      new_path="$input_path"
43283    fi
43284  fi
43285
43286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43287  if test "x$test_cygdrive_prefix" = x; then
43288    # As a simple fix, exclude /usr/bin since it's not a real path.
43289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43291      # a path prefixed by /cygdrive for fixpath to work.
43292      new_path="$CYGWIN_ROOT_PATH$input_path"
43293    fi
43294  fi
43295
43296  # remove trailing .exe if any
43297  new_path="${new_path/%.exe/}"
43298
43299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43300
43301  # First separate the path from the arguments. This will split at the first
43302  # space.
43303  complete="$NM"
43304  path="${complete%% *}"
43305  tmp="$complete EOL"
43306  arguments="${tmp#* }"
43307
43308  # Input might be given as Windows format, start by converting to
43309  # unix format.
43310  new_path="$path"
43311
43312  windows_path="$new_path"
43313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43314    unix_path=`$CYGPATH -u "$windows_path"`
43315    new_path="$unix_path"
43316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43318    new_path="$unix_path"
43319  fi
43320
43321
43322  # Now try to locate executable using which
43323  new_path=`$WHICH "$new_path" 2> /dev/null`
43324
43325  if test "x$new_path" = x; then
43326    # Oops. Which didn't find the executable.
43327    # The splitting of arguments from the executable at a space might have been incorrect,
43328    # since paths with space are more likely in Windows. Give it another try with the whole
43329    # argument.
43330    path="$complete"
43331    arguments="EOL"
43332    new_path="$path"
43333
43334  windows_path="$new_path"
43335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43336    unix_path=`$CYGPATH -u "$windows_path"`
43337    new_path="$unix_path"
43338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43340    new_path="$unix_path"
43341  fi
43342
43343
43344    new_path=`$WHICH "$new_path" 2> /dev/null`
43345    # bat and cmd files are not always considered executable in MSYS causing which
43346    # to not find them
43347    if test "x$new_path" = x \
43348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43350      new_path="$path"
43351
43352  windows_path="$new_path"
43353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43354    unix_path=`$CYGPATH -u "$windows_path"`
43355    new_path="$unix_path"
43356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43358    new_path="$unix_path"
43359  fi
43360
43361    fi
43362
43363    if test "x$new_path" = x; then
43364      # It's still not found. Now this is an unrecoverable error.
43365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43366$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43367      has_space=`$ECHO "$complete" | $GREP " "`
43368      if test "x$has_space" != x; then
43369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43371      fi
43372      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43373    fi
43374  fi
43375
43376  # Now new_path has a complete unix path to the binary
43377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43378    # Keep paths in /bin as-is, but remove trailing .exe if any
43379    new_path="${new_path/%.exe/}"
43380    # Do not save /bin paths to all_fixpath_prefixes!
43381  else
43382    # Not in mixed or Windows style, start by that.
43383    new_path=`cmd //c echo $new_path`
43384
43385  input_path="$new_path"
43386  # Check if we need to convert this using DOS-style short mode. If the path
43387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43388  # take no chances and rewrite it.
43389  # Note: m4 eats our [], so we need to use [ and ] instead.
43390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43391  if test "x$has_forbidden_chars" != x; then
43392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43394  fi
43395
43396    # Output is in $new_path
43397
43398  windows_path="$new_path"
43399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43400    unix_path=`$CYGPATH -u "$windows_path"`
43401    new_path="$unix_path"
43402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43404    new_path="$unix_path"
43405  fi
43406
43407    # remove trailing .exe if any
43408    new_path="${new_path/%.exe/}"
43409
43410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43412  fi
43413
43414    else
43415      # We're on a unix platform. Hooray! :)
43416      # First separate the path from the arguments. This will split at the first
43417      # space.
43418      complete="$NM"
43419      path="${complete%% *}"
43420      tmp="$complete EOL"
43421      arguments="${tmp#* }"
43422
43423      # Cannot rely on the command "which" here since it doesn't always work.
43424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43425      if test -z "$is_absolute_path"; then
43426        # Path to executable is not absolute. Find it.
43427        IFS_save="$IFS"
43428        IFS=:
43429        for p in $PATH; do
43430          if test -f "$p/$path" && test -x "$p/$path"; then
43431            new_path="$p/$path"
43432            break
43433          fi
43434        done
43435        IFS="$IFS_save"
43436      else
43437        # This is an absolute path, we can use it without further modifications.
43438        new_path="$path"
43439      fi
43440
43441      if test "x$new_path" = x; then
43442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43443$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43444        has_space=`$ECHO "$complete" | $GREP " "`
43445        if test "x$has_space" != x; then
43446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43448        fi
43449        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43450      fi
43451    fi
43452
43453    # Now join together the path and the arguments once again
43454    if test "x$arguments" != xEOL; then
43455      new_complete="$new_path ${arguments% *}"
43456    else
43457      new_complete="$new_path"
43458    fi
43459
43460    if test "x$complete" != "x$new_complete"; then
43461      NM="$new_complete"
43462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43463$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43464    fi
43465  fi
43466
43467    GNM="$NM"
43468
43469  fi
43470
43471  # objcopy is used for moving debug symbols to separate files when
43472  # full debug symbols are enabled.
43473  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43474
43475
43476  # Publish this variable in the help.
43477
43478
43479  if [ -z "${OBJCOPY+x}" ]; then
43480    # The variable is not set by user, try to locate tool using the code snippet
43481    if test -n "$ac_tool_prefix"; then
43482  for ac_prog in gobjcopy objcopy
43483  do
43484    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43485set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43487$as_echo_n "checking for $ac_word... " >&6; }
43488if ${ac_cv_prog_OBJCOPY+:} false; then :
43489  $as_echo_n "(cached) " >&6
43490else
43491  if test -n "$OBJCOPY"; then
43492  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43493else
43494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43495for as_dir in $PATH
43496do
43497  IFS=$as_save_IFS
43498  test -z "$as_dir" && as_dir=.
43499    for ac_exec_ext in '' $ac_executable_extensions; do
43500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43501    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43503    break 2
43504  fi
43505done
43506  done
43507IFS=$as_save_IFS
43508
43509fi
43510fi
43511OBJCOPY=$ac_cv_prog_OBJCOPY
43512if test -n "$OBJCOPY"; then
43513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43514$as_echo "$OBJCOPY" >&6; }
43515else
43516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43517$as_echo "no" >&6; }
43518fi
43519
43520
43521    test -n "$OBJCOPY" && break
43522  done
43523fi
43524if test -z "$OBJCOPY"; then
43525  ac_ct_OBJCOPY=$OBJCOPY
43526  for ac_prog in gobjcopy objcopy
43527do
43528  # Extract the first word of "$ac_prog", so it can be a program name with args.
43529set dummy $ac_prog; ac_word=$2
43530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43531$as_echo_n "checking for $ac_word... " >&6; }
43532if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43533  $as_echo_n "(cached) " >&6
43534else
43535  if test -n "$ac_ct_OBJCOPY"; then
43536  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43537else
43538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43539for as_dir in $PATH
43540do
43541  IFS=$as_save_IFS
43542  test -z "$as_dir" && as_dir=.
43543    for ac_exec_ext in '' $ac_executable_extensions; do
43544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43545    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43547    break 2
43548  fi
43549done
43550  done
43551IFS=$as_save_IFS
43552
43553fi
43554fi
43555ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43556if test -n "$ac_ct_OBJCOPY"; then
43557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43558$as_echo "$ac_ct_OBJCOPY" >&6; }
43559else
43560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43561$as_echo "no" >&6; }
43562fi
43563
43564
43565  test -n "$ac_ct_OBJCOPY" && break
43566done
43567
43568  if test "x$ac_ct_OBJCOPY" = x; then
43569    OBJCOPY=""
43570  else
43571    case $cross_compiling:$ac_tool_warned in
43572yes:)
43573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43575ac_tool_warned=yes ;;
43576esac
43577    OBJCOPY=$ac_ct_OBJCOPY
43578  fi
43579fi
43580
43581  else
43582    # The variable is set, but is it from the command line or the environment?
43583
43584    # Try to remove the string !OBJCOPY! from our list.
43585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43587      # If it failed, the variable was not from the command line. Ignore it,
43588      # but warn the user (except for BASH, which is always set by the calling BASH).
43589      if test "xOBJCOPY" != xBASH; then
43590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43591$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43592      fi
43593      # Try to locate tool using the code snippet
43594      if test -n "$ac_tool_prefix"; then
43595  for ac_prog in gobjcopy objcopy
43596  do
43597    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43598set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43600$as_echo_n "checking for $ac_word... " >&6; }
43601if ${ac_cv_prog_OBJCOPY+:} false; then :
43602  $as_echo_n "(cached) " >&6
43603else
43604  if test -n "$OBJCOPY"; then
43605  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43606else
43607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43608for as_dir in $PATH
43609do
43610  IFS=$as_save_IFS
43611  test -z "$as_dir" && as_dir=.
43612    for ac_exec_ext in '' $ac_executable_extensions; do
43613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43614    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43616    break 2
43617  fi
43618done
43619  done
43620IFS=$as_save_IFS
43621
43622fi
43623fi
43624OBJCOPY=$ac_cv_prog_OBJCOPY
43625if test -n "$OBJCOPY"; then
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43627$as_echo "$OBJCOPY" >&6; }
43628else
43629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43630$as_echo "no" >&6; }
43631fi
43632
43633
43634    test -n "$OBJCOPY" && break
43635  done
43636fi
43637if test -z "$OBJCOPY"; then
43638  ac_ct_OBJCOPY=$OBJCOPY
43639  for ac_prog in gobjcopy objcopy
43640do
43641  # Extract the first word of "$ac_prog", so it can be a program name with args.
43642set dummy $ac_prog; ac_word=$2
43643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43644$as_echo_n "checking for $ac_word... " >&6; }
43645if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43646  $as_echo_n "(cached) " >&6
43647else
43648  if test -n "$ac_ct_OBJCOPY"; then
43649  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43650else
43651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43652for as_dir in $PATH
43653do
43654  IFS=$as_save_IFS
43655  test -z "$as_dir" && as_dir=.
43656    for ac_exec_ext in '' $ac_executable_extensions; do
43657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43658    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43660    break 2
43661  fi
43662done
43663  done
43664IFS=$as_save_IFS
43665
43666fi
43667fi
43668ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43669if test -n "$ac_ct_OBJCOPY"; then
43670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43671$as_echo "$ac_ct_OBJCOPY" >&6; }
43672else
43673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43674$as_echo "no" >&6; }
43675fi
43676
43677
43678  test -n "$ac_ct_OBJCOPY" && break
43679done
43680
43681  if test "x$ac_ct_OBJCOPY" = x; then
43682    OBJCOPY=""
43683  else
43684    case $cross_compiling:$ac_tool_warned in
43685yes:)
43686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43688ac_tool_warned=yes ;;
43689esac
43690    OBJCOPY=$ac_ct_OBJCOPY
43691  fi
43692fi
43693
43694    else
43695      # If it succeeded, then it was overridden by the user. We will use it
43696      # for the tool.
43697
43698      # First remove it from the list of overridden variables, so we can test
43699      # for unknown variables in the end.
43700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43701
43702      # Check if we try to supply an empty value
43703      if test "x$OBJCOPY" = x; then
43704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43705$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43707$as_echo_n "checking for OBJCOPY... " >&6; }
43708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43709$as_echo "disabled" >&6; }
43710      else
43711        # Check if the provided tool contains a complete path.
43712        tool_specified="$OBJCOPY"
43713        tool_basename="${tool_specified##*/}"
43714        if test "x$tool_basename" = "x$tool_specified"; then
43715          # A command without a complete path is provided, search $PATH.
43716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43717$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43718          # Extract the first word of "$tool_basename", so it can be a program name with args.
43719set dummy $tool_basename; ac_word=$2
43720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43721$as_echo_n "checking for $ac_word... " >&6; }
43722if ${ac_cv_path_OBJCOPY+:} false; then :
43723  $as_echo_n "(cached) " >&6
43724else
43725  case $OBJCOPY in
43726  [\\/]* | ?:[\\/]*)
43727  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43728  ;;
43729  *)
43730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43731for as_dir in $PATH
43732do
43733  IFS=$as_save_IFS
43734  test -z "$as_dir" && as_dir=.
43735    for ac_exec_ext in '' $ac_executable_extensions; do
43736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43737    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43739    break 2
43740  fi
43741done
43742  done
43743IFS=$as_save_IFS
43744
43745  ;;
43746esac
43747fi
43748OBJCOPY=$ac_cv_path_OBJCOPY
43749if test -n "$OBJCOPY"; then
43750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43751$as_echo "$OBJCOPY" >&6; }
43752else
43753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43754$as_echo "no" >&6; }
43755fi
43756
43757
43758          if test "x$OBJCOPY" = x; then
43759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43760          fi
43761        else
43762          # Otherwise we believe it is a complete path. Use it as it is.
43763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43764$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43766$as_echo_n "checking for OBJCOPY... " >&6; }
43767          if test ! -x "$tool_specified"; then
43768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43769$as_echo "not found" >&6; }
43770            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43771          fi
43772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43773$as_echo "$tool_specified" >&6; }
43774        fi
43775      fi
43776    fi
43777
43778  fi
43779
43780
43781    # Only call fixup if objcopy was found.
43782    if test -n "$OBJCOPY"; then
43783
43784  # Only process if variable expands to non-empty
43785
43786  if test "x$OBJCOPY" != x; then
43787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43788
43789  # First separate the path from the arguments. This will split at the first
43790  # space.
43791  complete="$OBJCOPY"
43792  path="${complete%% *}"
43793  tmp="$complete EOL"
43794  arguments="${tmp#* }"
43795
43796  # Input might be given as Windows format, start by converting to
43797  # unix format.
43798  new_path=`$CYGPATH -u "$path"`
43799
43800  # Now try to locate executable using which
43801  new_path=`$WHICH "$new_path" 2> /dev/null`
43802  # bat and cmd files are not always considered executable in cygwin causing which
43803  # to not find them
43804  if test "x$new_path" = x \
43805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43807    new_path=`$CYGPATH -u "$path"`
43808  fi
43809  if test "x$new_path" = x; then
43810    # Oops. Which didn't find the executable.
43811    # The splitting of arguments from the executable at a space might have been incorrect,
43812    # since paths with space are more likely in Windows. Give it another try with the whole
43813    # argument.
43814    path="$complete"
43815    arguments="EOL"
43816    new_path=`$CYGPATH -u "$path"`
43817    new_path=`$WHICH "$new_path" 2> /dev/null`
43818    # bat and cmd files are not always considered executable in cygwin causing which
43819    # to not find them
43820    if test "x$new_path" = x \
43821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43823      new_path=`$CYGPATH -u "$path"`
43824    fi
43825    if test "x$new_path" = x; then
43826      # It's still not found. Now this is an unrecoverable error.
43827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43828$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43829      has_space=`$ECHO "$complete" | $GREP " "`
43830      if test "x$has_space" != x; then
43831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43833      fi
43834      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43835    fi
43836  fi
43837
43838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43841  # "foo.exe" is OK but "foo" is an error.
43842  #
43843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43844  # It is also a way to make sure we got the proper file name for the real test later on.
43845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43846  if test "x$test_shortpath" = x; then
43847    # Short path failed, file does not exist as specified.
43848    # Try adding .exe or .cmd
43849    if test -f "${new_path}.exe"; then
43850      input_to_shortpath="${new_path}.exe"
43851    elif test -f "${new_path}.cmd"; then
43852      input_to_shortpath="${new_path}.cmd"
43853    else
43854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43855$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43858      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43859    fi
43860  else
43861    input_to_shortpath="$new_path"
43862  fi
43863
43864  # Call helper function which possibly converts this using DOS-style short mode.
43865  # If so, the updated path is stored in $new_path.
43866  new_path="$input_to_shortpath"
43867
43868  input_path="$input_to_shortpath"
43869  # Check if we need to convert this using DOS-style short mode. If the path
43870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43871  # take no chances and rewrite it.
43872  # Note: m4 eats our [], so we need to use [ and ] instead.
43873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43874  if test "x$has_forbidden_chars" != x; then
43875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43879      # Going to short mode and back again did indeed matter. Since short mode is
43880      # case insensitive, let's make it lowercase to improve readability.
43881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43882      # Now convert it back to Unix-style (cygpath)
43883      input_path=`$CYGPATH -u "$shortmode_path"`
43884      new_path="$input_path"
43885    fi
43886  fi
43887
43888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43889  if test "x$test_cygdrive_prefix" = x; then
43890    # As a simple fix, exclude /usr/bin since it's not a real path.
43891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43893      # a path prefixed by /cygdrive for fixpath to work.
43894      new_path="$CYGWIN_ROOT_PATH$input_path"
43895    fi
43896  fi
43897
43898  # remove trailing .exe if any
43899  new_path="${new_path/%.exe/}"
43900
43901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43902
43903  # First separate the path from the arguments. This will split at the first
43904  # space.
43905  complete="$OBJCOPY"
43906  path="${complete%% *}"
43907  tmp="$complete EOL"
43908  arguments="${tmp#* }"
43909
43910  # Input might be given as Windows format, start by converting to
43911  # unix format.
43912  new_path="$path"
43913
43914  windows_path="$new_path"
43915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43916    unix_path=`$CYGPATH -u "$windows_path"`
43917    new_path="$unix_path"
43918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43920    new_path="$unix_path"
43921  fi
43922
43923
43924  # Now try to locate executable using which
43925  new_path=`$WHICH "$new_path" 2> /dev/null`
43926
43927  if test "x$new_path" = x; then
43928    # Oops. Which didn't find the executable.
43929    # The splitting of arguments from the executable at a space might have been incorrect,
43930    # since paths with space are more likely in Windows. Give it another try with the whole
43931    # argument.
43932    path="$complete"
43933    arguments="EOL"
43934    new_path="$path"
43935
43936  windows_path="$new_path"
43937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43938    unix_path=`$CYGPATH -u "$windows_path"`
43939    new_path="$unix_path"
43940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43942    new_path="$unix_path"
43943  fi
43944
43945
43946    new_path=`$WHICH "$new_path" 2> /dev/null`
43947    # bat and cmd files are not always considered executable in MSYS causing which
43948    # to not find them
43949    if test "x$new_path" = x \
43950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43952      new_path="$path"
43953
43954  windows_path="$new_path"
43955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43956    unix_path=`$CYGPATH -u "$windows_path"`
43957    new_path="$unix_path"
43958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43960    new_path="$unix_path"
43961  fi
43962
43963    fi
43964
43965    if test "x$new_path" = x; then
43966      # It's still not found. Now this is an unrecoverable error.
43967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43968$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43969      has_space=`$ECHO "$complete" | $GREP " "`
43970      if test "x$has_space" != x; then
43971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43973      fi
43974      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43975    fi
43976  fi
43977
43978  # Now new_path has a complete unix path to the binary
43979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43980    # Keep paths in /bin as-is, but remove trailing .exe if any
43981    new_path="${new_path/%.exe/}"
43982    # Do not save /bin paths to all_fixpath_prefixes!
43983  else
43984    # Not in mixed or Windows style, start by that.
43985    new_path=`cmd //c echo $new_path`
43986
43987  input_path="$new_path"
43988  # Check if we need to convert this using DOS-style short mode. If the path
43989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43990  # take no chances and rewrite it.
43991  # Note: m4 eats our [], so we need to use [ and ] instead.
43992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43993  if test "x$has_forbidden_chars" != x; then
43994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43996  fi
43997
43998    # Output is in $new_path
43999
44000  windows_path="$new_path"
44001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44002    unix_path=`$CYGPATH -u "$windows_path"`
44003    new_path="$unix_path"
44004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44006    new_path="$unix_path"
44007  fi
44008
44009    # remove trailing .exe if any
44010    new_path="${new_path/%.exe/}"
44011
44012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44014  fi
44015
44016    else
44017      # We're on a unix platform. Hooray! :)
44018      # First separate the path from the arguments. This will split at the first
44019      # space.
44020      complete="$OBJCOPY"
44021      path="${complete%% *}"
44022      tmp="$complete EOL"
44023      arguments="${tmp#* }"
44024
44025      # Cannot rely on the command "which" here since it doesn't always work.
44026      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44027      if test -z "$is_absolute_path"; then
44028        # Path to executable is not absolute. Find it.
44029        IFS_save="$IFS"
44030        IFS=:
44031        for p in $PATH; do
44032          if test -f "$p/$path" && test -x "$p/$path"; then
44033            new_path="$p/$path"
44034            break
44035          fi
44036        done
44037        IFS="$IFS_save"
44038      else
44039        # This is an absolute path, we can use it without further modifications.
44040        new_path="$path"
44041      fi
44042
44043      if test "x$new_path" = x; then
44044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44045$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44046        has_space=`$ECHO "$complete" | $GREP " "`
44047        if test "x$has_space" != x; then
44048          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44050        fi
44051        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44052      fi
44053    fi
44054
44055    # Now join together the path and the arguments once again
44056    if test "x$arguments" != xEOL; then
44057      new_complete="$new_path ${arguments% *}"
44058    else
44059      new_complete="$new_path"
44060    fi
44061
44062    if test "x$complete" != "x$new_complete"; then
44063      OBJCOPY="$new_complete"
44064      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44065$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44066    fi
44067  fi
44068
44069      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44070        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44071        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44072        # - version number is last blank separate word on first line
44073        # - version number formats that have been seen:
44074        #   - <major>.<minor>
44075        #   - <major>.<minor>.<micro>
44076        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44077        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44078         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44079              -e 's/.* //' \
44080              -e '/^[01]\./b bad' \
44081              -e '/^2\./{' \
44082              -e '  s/^2\.//' \
44083              -e '  /^[0-9]$/b bad' \
44084              -e '  /^[0-9]\./b bad' \
44085              -e '  /^1[0-9]$/b bad' \
44086              -e '  /^1[0-9]\./b bad' \
44087              -e '  /^20\./b bad' \
44088              -e '  /^21\.0$/b bad' \
44089              -e '  /^21\.0\./b bad' \
44090              -e '}' \
44091              -e ':good' \
44092              -e 's/.*/VALID_VERSION/p' \
44093              -e 'q' \
44094              -e ':bad' \
44095              -e 's/.*/BAD_VERSION/p' \
44096              -e 'q'`
44097        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44098          OBJCOPY=
44099          { $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
44100$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44101          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44102$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44103          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44104$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44105          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44106$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44107          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44108$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44109        fi
44110      fi
44111    fi
44112  fi
44113
44114
44115
44116  # Publish this variable in the help.
44117
44118
44119  if [ -z "${OBJDUMP+x}" ]; then
44120    # The variable is not set by user, try to locate tool using the code snippet
44121    if test -n "$ac_tool_prefix"; then
44122  for ac_prog in gobjdump objdump
44123  do
44124    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44125set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44127$as_echo_n "checking for $ac_word... " >&6; }
44128if ${ac_cv_prog_OBJDUMP+:} false; then :
44129  $as_echo_n "(cached) " >&6
44130else
44131  if test -n "$OBJDUMP"; then
44132  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44133else
44134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44135for as_dir in $PATH
44136do
44137  IFS=$as_save_IFS
44138  test -z "$as_dir" && as_dir=.
44139    for ac_exec_ext in '' $ac_executable_extensions; do
44140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44141    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44143    break 2
44144  fi
44145done
44146  done
44147IFS=$as_save_IFS
44148
44149fi
44150fi
44151OBJDUMP=$ac_cv_prog_OBJDUMP
44152if test -n "$OBJDUMP"; then
44153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44154$as_echo "$OBJDUMP" >&6; }
44155else
44156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44157$as_echo "no" >&6; }
44158fi
44159
44160
44161    test -n "$OBJDUMP" && break
44162  done
44163fi
44164if test -z "$OBJDUMP"; then
44165  ac_ct_OBJDUMP=$OBJDUMP
44166  for ac_prog in gobjdump objdump
44167do
44168  # Extract the first word of "$ac_prog", so it can be a program name with args.
44169set dummy $ac_prog; ac_word=$2
44170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44171$as_echo_n "checking for $ac_word... " >&6; }
44172if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44173  $as_echo_n "(cached) " >&6
44174else
44175  if test -n "$ac_ct_OBJDUMP"; then
44176  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44177else
44178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44179for as_dir in $PATH
44180do
44181  IFS=$as_save_IFS
44182  test -z "$as_dir" && as_dir=.
44183    for ac_exec_ext in '' $ac_executable_extensions; do
44184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44185    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44187    break 2
44188  fi
44189done
44190  done
44191IFS=$as_save_IFS
44192
44193fi
44194fi
44195ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44196if test -n "$ac_ct_OBJDUMP"; then
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44198$as_echo "$ac_ct_OBJDUMP" >&6; }
44199else
44200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44201$as_echo "no" >&6; }
44202fi
44203
44204
44205  test -n "$ac_ct_OBJDUMP" && break
44206done
44207
44208  if test "x$ac_ct_OBJDUMP" = x; then
44209    OBJDUMP=""
44210  else
44211    case $cross_compiling:$ac_tool_warned in
44212yes:)
44213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44215ac_tool_warned=yes ;;
44216esac
44217    OBJDUMP=$ac_ct_OBJDUMP
44218  fi
44219fi
44220
44221  else
44222    # The variable is set, but is it from the command line or the environment?
44223
44224    # Try to remove the string !OBJDUMP! from our list.
44225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44227      # If it failed, the variable was not from the command line. Ignore it,
44228      # but warn the user (except for BASH, which is always set by the calling BASH).
44229      if test "xOBJDUMP" != xBASH; then
44230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44231$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44232      fi
44233      # Try to locate tool using the code snippet
44234      if test -n "$ac_tool_prefix"; then
44235  for ac_prog in gobjdump objdump
44236  do
44237    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44238set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44240$as_echo_n "checking for $ac_word... " >&6; }
44241if ${ac_cv_prog_OBJDUMP+:} false; then :
44242  $as_echo_n "(cached) " >&6
44243else
44244  if test -n "$OBJDUMP"; then
44245  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44246else
44247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44248for as_dir in $PATH
44249do
44250  IFS=$as_save_IFS
44251  test -z "$as_dir" && as_dir=.
44252    for ac_exec_ext in '' $ac_executable_extensions; do
44253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44254    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44256    break 2
44257  fi
44258done
44259  done
44260IFS=$as_save_IFS
44261
44262fi
44263fi
44264OBJDUMP=$ac_cv_prog_OBJDUMP
44265if test -n "$OBJDUMP"; then
44266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44267$as_echo "$OBJDUMP" >&6; }
44268else
44269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44270$as_echo "no" >&6; }
44271fi
44272
44273
44274    test -n "$OBJDUMP" && break
44275  done
44276fi
44277if test -z "$OBJDUMP"; then
44278  ac_ct_OBJDUMP=$OBJDUMP
44279  for ac_prog in gobjdump objdump
44280do
44281  # Extract the first word of "$ac_prog", so it can be a program name with args.
44282set dummy $ac_prog; ac_word=$2
44283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44284$as_echo_n "checking for $ac_word... " >&6; }
44285if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44286  $as_echo_n "(cached) " >&6
44287else
44288  if test -n "$ac_ct_OBJDUMP"; then
44289  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44290else
44291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44292for as_dir in $PATH
44293do
44294  IFS=$as_save_IFS
44295  test -z "$as_dir" && as_dir=.
44296    for ac_exec_ext in '' $ac_executable_extensions; do
44297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44298    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44300    break 2
44301  fi
44302done
44303  done
44304IFS=$as_save_IFS
44305
44306fi
44307fi
44308ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44309if test -n "$ac_ct_OBJDUMP"; then
44310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44311$as_echo "$ac_ct_OBJDUMP" >&6; }
44312else
44313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44314$as_echo "no" >&6; }
44315fi
44316
44317
44318  test -n "$ac_ct_OBJDUMP" && break
44319done
44320
44321  if test "x$ac_ct_OBJDUMP" = x; then
44322    OBJDUMP=""
44323  else
44324    case $cross_compiling:$ac_tool_warned in
44325yes:)
44326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44328ac_tool_warned=yes ;;
44329esac
44330    OBJDUMP=$ac_ct_OBJDUMP
44331  fi
44332fi
44333
44334    else
44335      # If it succeeded, then it was overridden by the user. We will use it
44336      # for the tool.
44337
44338      # First remove it from the list of overridden variables, so we can test
44339      # for unknown variables in the end.
44340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44341
44342      # Check if we try to supply an empty value
44343      if test "x$OBJDUMP" = x; then
44344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44345$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44347$as_echo_n "checking for OBJDUMP... " >&6; }
44348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44349$as_echo "disabled" >&6; }
44350      else
44351        # Check if the provided tool contains a complete path.
44352        tool_specified="$OBJDUMP"
44353        tool_basename="${tool_specified##*/}"
44354        if test "x$tool_basename" = "x$tool_specified"; then
44355          # A command without a complete path is provided, search $PATH.
44356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44357$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44358          # Extract the first word of "$tool_basename", so it can be a program name with args.
44359set dummy $tool_basename; ac_word=$2
44360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44361$as_echo_n "checking for $ac_word... " >&6; }
44362if ${ac_cv_path_OBJDUMP+:} false; then :
44363  $as_echo_n "(cached) " >&6
44364else
44365  case $OBJDUMP in
44366  [\\/]* | ?:[\\/]*)
44367  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44368  ;;
44369  *)
44370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44371for as_dir in $PATH
44372do
44373  IFS=$as_save_IFS
44374  test -z "$as_dir" && as_dir=.
44375    for ac_exec_ext in '' $ac_executable_extensions; do
44376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44377    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44379    break 2
44380  fi
44381done
44382  done
44383IFS=$as_save_IFS
44384
44385  ;;
44386esac
44387fi
44388OBJDUMP=$ac_cv_path_OBJDUMP
44389if test -n "$OBJDUMP"; then
44390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44391$as_echo "$OBJDUMP" >&6; }
44392else
44393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44394$as_echo "no" >&6; }
44395fi
44396
44397
44398          if test "x$OBJDUMP" = x; then
44399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44400          fi
44401        else
44402          # Otherwise we believe it is a complete path. Use it as it is.
44403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44404$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44406$as_echo_n "checking for OBJDUMP... " >&6; }
44407          if test ! -x "$tool_specified"; then
44408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44409$as_echo "not found" >&6; }
44410            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44411          fi
44412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44413$as_echo "$tool_specified" >&6; }
44414        fi
44415      fi
44416    fi
44417
44418  fi
44419
44420
44421  if test "x$OBJDUMP" != x; then
44422    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44423    # bails if argument is missing.
44424
44425  # Only process if variable expands to non-empty
44426
44427  if test "x$OBJDUMP" != x; then
44428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429
44430  # First separate the path from the arguments. This will split at the first
44431  # space.
44432  complete="$OBJDUMP"
44433  path="${complete%% *}"
44434  tmp="$complete EOL"
44435  arguments="${tmp#* }"
44436
44437  # Input might be given as Windows format, start by converting to
44438  # unix format.
44439  new_path=`$CYGPATH -u "$path"`
44440
44441  # Now try to locate executable using which
44442  new_path=`$WHICH "$new_path" 2> /dev/null`
44443  # bat and cmd files are not always considered executable in cygwin causing which
44444  # to not find them
44445  if test "x$new_path" = x \
44446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44448    new_path=`$CYGPATH -u "$path"`
44449  fi
44450  if test "x$new_path" = x; then
44451    # Oops. Which didn't find the executable.
44452    # The splitting of arguments from the executable at a space might have been incorrect,
44453    # since paths with space are more likely in Windows. Give it another try with the whole
44454    # argument.
44455    path="$complete"
44456    arguments="EOL"
44457    new_path=`$CYGPATH -u "$path"`
44458    new_path=`$WHICH "$new_path" 2> /dev/null`
44459    # bat and cmd files are not always considered executable in cygwin causing which
44460    # to not find them
44461    if test "x$new_path" = x \
44462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44464      new_path=`$CYGPATH -u "$path"`
44465    fi
44466    if test "x$new_path" = x; then
44467      # It's still not found. Now this is an unrecoverable error.
44468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44469$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44470      has_space=`$ECHO "$complete" | $GREP " "`
44471      if test "x$has_space" != x; then
44472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44474      fi
44475      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44476    fi
44477  fi
44478
44479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44482  # "foo.exe" is OK but "foo" is an error.
44483  #
44484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44485  # It is also a way to make sure we got the proper file name for the real test later on.
44486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44487  if test "x$test_shortpath" = x; then
44488    # Short path failed, file does not exist as specified.
44489    # Try adding .exe or .cmd
44490    if test -f "${new_path}.exe"; then
44491      input_to_shortpath="${new_path}.exe"
44492    elif test -f "${new_path}.cmd"; then
44493      input_to_shortpath="${new_path}.cmd"
44494    else
44495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44496$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44499      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44500    fi
44501  else
44502    input_to_shortpath="$new_path"
44503  fi
44504
44505  # Call helper function which possibly converts this using DOS-style short mode.
44506  # If so, the updated path is stored in $new_path.
44507  new_path="$input_to_shortpath"
44508
44509  input_path="$input_to_shortpath"
44510  # Check if we need to convert this using DOS-style short mode. If the path
44511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44512  # take no chances and rewrite it.
44513  # Note: m4 eats our [], so we need to use [ and ] instead.
44514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44515  if test "x$has_forbidden_chars" != x; then
44516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44520      # Going to short mode and back again did indeed matter. Since short mode is
44521      # case insensitive, let's make it lowercase to improve readability.
44522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44523      # Now convert it back to Unix-style (cygpath)
44524      input_path=`$CYGPATH -u "$shortmode_path"`
44525      new_path="$input_path"
44526    fi
44527  fi
44528
44529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44530  if test "x$test_cygdrive_prefix" = x; then
44531    # As a simple fix, exclude /usr/bin since it's not a real path.
44532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44534      # a path prefixed by /cygdrive for fixpath to work.
44535      new_path="$CYGWIN_ROOT_PATH$input_path"
44536    fi
44537  fi
44538
44539  # remove trailing .exe if any
44540  new_path="${new_path/%.exe/}"
44541
44542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44543
44544  # First separate the path from the arguments. This will split at the first
44545  # space.
44546  complete="$OBJDUMP"
44547  path="${complete%% *}"
44548  tmp="$complete EOL"
44549  arguments="${tmp#* }"
44550
44551  # Input might be given as Windows format, start by converting to
44552  # unix format.
44553  new_path="$path"
44554
44555  windows_path="$new_path"
44556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44557    unix_path=`$CYGPATH -u "$windows_path"`
44558    new_path="$unix_path"
44559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44561    new_path="$unix_path"
44562  fi
44563
44564
44565  # Now try to locate executable using which
44566  new_path=`$WHICH "$new_path" 2> /dev/null`
44567
44568  if test "x$new_path" = x; then
44569    # Oops. Which didn't find the executable.
44570    # The splitting of arguments from the executable at a space might have been incorrect,
44571    # since paths with space are more likely in Windows. Give it another try with the whole
44572    # argument.
44573    path="$complete"
44574    arguments="EOL"
44575    new_path="$path"
44576
44577  windows_path="$new_path"
44578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44579    unix_path=`$CYGPATH -u "$windows_path"`
44580    new_path="$unix_path"
44581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44583    new_path="$unix_path"
44584  fi
44585
44586
44587    new_path=`$WHICH "$new_path" 2> /dev/null`
44588    # bat and cmd files are not always considered executable in MSYS causing which
44589    # to not find them
44590    if test "x$new_path" = x \
44591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44593      new_path="$path"
44594
44595  windows_path="$new_path"
44596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44597    unix_path=`$CYGPATH -u "$windows_path"`
44598    new_path="$unix_path"
44599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44601    new_path="$unix_path"
44602  fi
44603
44604    fi
44605
44606    if test "x$new_path" = x; then
44607      # It's still not found. Now this is an unrecoverable error.
44608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44609$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44610      has_space=`$ECHO "$complete" | $GREP " "`
44611      if test "x$has_space" != x; then
44612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44614      fi
44615      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44616    fi
44617  fi
44618
44619  # Now new_path has a complete unix path to the binary
44620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44621    # Keep paths in /bin as-is, but remove trailing .exe if any
44622    new_path="${new_path/%.exe/}"
44623    # Do not save /bin paths to all_fixpath_prefixes!
44624  else
44625    # Not in mixed or Windows style, start by that.
44626    new_path=`cmd //c echo $new_path`
44627
44628  input_path="$new_path"
44629  # Check if we need to convert this using DOS-style short mode. If the path
44630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44631  # take no chances and rewrite it.
44632  # Note: m4 eats our [], so we need to use [ and ] instead.
44633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44634  if test "x$has_forbidden_chars" != x; then
44635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44637  fi
44638
44639    # Output is in $new_path
44640
44641  windows_path="$new_path"
44642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44643    unix_path=`$CYGPATH -u "$windows_path"`
44644    new_path="$unix_path"
44645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44647    new_path="$unix_path"
44648  fi
44649
44650    # remove trailing .exe if any
44651    new_path="${new_path/%.exe/}"
44652
44653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44655  fi
44656
44657    else
44658      # We're on a unix platform. Hooray! :)
44659      # First separate the path from the arguments. This will split at the first
44660      # space.
44661      complete="$OBJDUMP"
44662      path="${complete%% *}"
44663      tmp="$complete EOL"
44664      arguments="${tmp#* }"
44665
44666      # Cannot rely on the command "which" here since it doesn't always work.
44667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44668      if test -z "$is_absolute_path"; then
44669        # Path to executable is not absolute. Find it.
44670        IFS_save="$IFS"
44671        IFS=:
44672        for p in $PATH; do
44673          if test -f "$p/$path" && test -x "$p/$path"; then
44674            new_path="$p/$path"
44675            break
44676          fi
44677        done
44678        IFS="$IFS_save"
44679      else
44680        # This is an absolute path, we can use it without further modifications.
44681        new_path="$path"
44682      fi
44683
44684      if test "x$new_path" = x; then
44685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44686$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44687        has_space=`$ECHO "$complete" | $GREP " "`
44688        if test "x$has_space" != x; then
44689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44691        fi
44692        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44693      fi
44694    fi
44695
44696    # Now join together the path and the arguments once again
44697    if test "x$arguments" != xEOL; then
44698      new_complete="$new_path ${arguments% *}"
44699    else
44700      new_complete="$new_path"
44701    fi
44702
44703    if test "x$complete" != "x$new_complete"; then
44704      OBJDUMP="$new_complete"
44705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44706$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44707    fi
44708  fi
44709
44710  fi
44711
44712
44713  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44714  # to remain in place. Otherwise the compiler will not work in some siutations
44715  # in later configure checks.
44716  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44717    PATH="$OLD_PATH"
44718  fi
44719
44720  # Restore the flags to the user specified values.
44721  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44722  CFLAGS="$ORG_CFLAGS"
44723  CXXFLAGS="$ORG_CXXFLAGS"
44724
44725
44726# Finally do some processing after the detection phase
44727
44728  if test "x$COMPILE_TYPE" = "xcross"; then
44729    # Now we need to find a C/C++ compiler that can build executables for the
44730    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44731    # used once. Also, we need to do this without adding a tools dir to the
44732    # path, otherwise we might pick up cross-compilers which don't use standard
44733    # naming.
44734
44735    OLDPATH="$PATH"
44736
44737
44738# Check whether --with-build-devkit was given.
44739if test "${with_build_devkit+set}" = set; then :
44740  withval=$with_build_devkit;
44741fi
44742
44743    if test "x$with_build_devkit" = "xyes"; then
44744      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44745    elif test -n "$with_build_devkit"; then
44746      if test ! -d "$with_build_devkit"; then
44747        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44748      else
44749
44750  # Only process if variable expands to non-empty
44751
44752  if test "x$with_build_devkit" != x; then
44753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44754
44755  # Input might be given as Windows format, start by converting to
44756  # unix format.
44757  path="$with_build_devkit"
44758  new_path=`$CYGPATH -u "$path"`
44759
44760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44763  # "foo.exe" is OK but "foo" is an error.
44764  #
44765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44766  # It is also a way to make sure we got the proper file name for the real test later on.
44767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44768  if test "x$test_shortpath" = x; then
44769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44770$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44771    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44772  fi
44773
44774  # Call helper function which possibly converts this using DOS-style short mode.
44775  # If so, the updated path is stored in $new_path.
44776
44777  input_path="$new_path"
44778  # Check if we need to convert this using DOS-style short mode. If the path
44779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44780  # take no chances and rewrite it.
44781  # Note: m4 eats our [], so we need to use [ and ] instead.
44782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44783  if test "x$has_forbidden_chars" != x; then
44784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44788      # Going to short mode and back again did indeed matter. Since short mode is
44789      # case insensitive, let's make it lowercase to improve readability.
44790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44791      # Now convert it back to Unix-style (cygpath)
44792      input_path=`$CYGPATH -u "$shortmode_path"`
44793      new_path="$input_path"
44794    fi
44795  fi
44796
44797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44798  if test "x$test_cygdrive_prefix" = x; then
44799    # As a simple fix, exclude /usr/bin since it's not a real path.
44800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44802      # a path prefixed by /cygdrive for fixpath to work.
44803      new_path="$CYGWIN_ROOT_PATH$input_path"
44804    fi
44805  fi
44806
44807
44808  if test "x$path" != "x$new_path"; then
44809    with_build_devkit="$new_path"
44810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44811$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44812  fi
44813
44814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44815
44816  path="$with_build_devkit"
44817  has_colon=`$ECHO $path | $GREP ^.:`
44818  new_path="$path"
44819  if test "x$has_colon" = x; then
44820    # Not in mixed or Windows style, start by that.
44821    new_path=`cmd //c echo $path`
44822  fi
44823
44824
44825  input_path="$new_path"
44826  # Check if we need to convert this using DOS-style short mode. If the path
44827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44828  # take no chances and rewrite it.
44829  # Note: m4 eats our [], so we need to use [ and ] instead.
44830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44831  if test "x$has_forbidden_chars" != x; then
44832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44834  fi
44835
44836
44837  windows_path="$new_path"
44838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44839    unix_path=`$CYGPATH -u "$windows_path"`
44840    new_path="$unix_path"
44841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44843    new_path="$unix_path"
44844  fi
44845
44846  if test "x$path" != "x$new_path"; then
44847    with_build_devkit="$new_path"
44848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44849$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44850  fi
44851
44852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44854
44855    else
44856      # We're on a unix platform. Hooray! :)
44857      path="$with_build_devkit"
44858      has_space=`$ECHO "$path" | $GREP " "`
44859      if test "x$has_space" != x; then
44860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44861$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44863      fi
44864
44865      # Use eval to expand a potential ~
44866      eval path="$path"
44867      if test ! -f "$path" && test ! -d "$path"; then
44868        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44869      fi
44870
44871      if test -d "$path"; then
44872        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44873      else
44874        dir="`$DIRNAME "$path"`"
44875        base="`$BASENAME "$path"`"
44876        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44877      fi
44878    fi
44879  fi
44880
44881        BUILD_DEVKIT_ROOT="$with_build_devkit"
44882        # Check for a meta data info file in the root of the devkit
44883        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44884          # Process devkit.info so that existing devkit variables are not
44885          # modified by this
44886          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44887              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44888              -e "s/\$host/\$build/g" \
44889              $BUILD_DEVKIT_ROOT/devkit.info \
44890              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44891          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44892          # This potentially sets the following:
44893          # A descriptive name of the devkit
44894
44895  if test "x$BUILD_DEVKIT_NAME" = x; then
44896    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44897  fi
44898
44899          # Corresponds to --with-extra-path
44900
44901  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44902    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44903  fi
44904
44905          # Corresponds to --with-toolchain-path
44906
44907  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44908    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44909  fi
44910
44911          # Corresponds to --with-sysroot
44912
44913  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44914    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44915  fi
44916
44917          # Skip the Window specific parts
44918        fi
44919
44920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44921$as_echo_n "checking for build platform devkit... " >&6; }
44922        if test "x$BUILD_DEVKIT_NAME" != x; then
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44924$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44925        else
44926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44927$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44928        fi
44929
44930        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44931
44932  if test "x$BUILD_SYSROOT" != "x"; then
44933    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44934      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44935        # Solaris Studio does not have a concept of sysroot. Instead we must
44936        # make sure the default include and lib dirs are appended to each
44937        # compile and link command line. Must also add -I-xbuiltin to enable
44938        # inlining of system functions and intrinsics.
44939        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44940        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44941            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44942      fi
44943    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44944      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44945      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44946    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44947      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44948      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44949    fi
44950    # The global CFLAGS and LDFLAGS variables need these for configure to function
44951    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44952    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44953    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44954    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44955  fi
44956
44957  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44958    # We also need -iframework<path>/System/Library/Frameworks
44959    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44960    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44961    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44962    # set this here so it doesn't have to be peppered throughout the forest
44963    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44964    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44965  fi
44966
44967
44968
44969
44970
44971         # Fallback default of just /bin if DEVKIT_PATH is not defined
44972        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44973          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44974        fi
44975        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44976      fi
44977    fi
44978
44979    # FIXME: we should list the discovered compilers as an exclude pattern!
44980    # If we do that, we can do this detection before POST_DETECTION, and still
44981    # find the build compilers in the tools dir, if needed.
44982
44983
44984
44985  # Publish this variable in the help.
44986
44987
44988  if [ -z "${BUILD_CC+x}" ]; then
44989    # The variable is not set by user, try to locate tool using the code snippet
44990    for ac_prog in cl cc gcc
44991do
44992  # Extract the first word of "$ac_prog", so it can be a program name with args.
44993set dummy $ac_prog; ac_word=$2
44994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44995$as_echo_n "checking for $ac_word... " >&6; }
44996if ${ac_cv_path_BUILD_CC+:} false; then :
44997  $as_echo_n "(cached) " >&6
44998else
44999  case $BUILD_CC in
45000  [\\/]* | ?:[\\/]*)
45001  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45002  ;;
45003  *)
45004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45005for as_dir in $PATH
45006do
45007  IFS=$as_save_IFS
45008  test -z "$as_dir" && as_dir=.
45009    for ac_exec_ext in '' $ac_executable_extensions; do
45010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45011    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45013    break 2
45014  fi
45015done
45016  done
45017IFS=$as_save_IFS
45018
45019  ;;
45020esac
45021fi
45022BUILD_CC=$ac_cv_path_BUILD_CC
45023if test -n "$BUILD_CC"; then
45024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45025$as_echo "$BUILD_CC" >&6; }
45026else
45027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45028$as_echo "no" >&6; }
45029fi
45030
45031
45032  test -n "$BUILD_CC" && break
45033done
45034
45035  else
45036    # The variable is set, but is it from the command line or the environment?
45037
45038    # Try to remove the string !BUILD_CC! from our list.
45039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45041      # If it failed, the variable was not from the command line. Ignore it,
45042      # but warn the user (except for BASH, which is always set by the calling BASH).
45043      if test "xBUILD_CC" != xBASH; then
45044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45045$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45046      fi
45047      # Try to locate tool using the code snippet
45048      for ac_prog in cl cc gcc
45049do
45050  # Extract the first word of "$ac_prog", so it can be a program name with args.
45051set dummy $ac_prog; ac_word=$2
45052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45053$as_echo_n "checking for $ac_word... " >&6; }
45054if ${ac_cv_path_BUILD_CC+:} false; then :
45055  $as_echo_n "(cached) " >&6
45056else
45057  case $BUILD_CC in
45058  [\\/]* | ?:[\\/]*)
45059  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45060  ;;
45061  *)
45062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45063for as_dir in $PATH
45064do
45065  IFS=$as_save_IFS
45066  test -z "$as_dir" && as_dir=.
45067    for ac_exec_ext in '' $ac_executable_extensions; do
45068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45069    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45071    break 2
45072  fi
45073done
45074  done
45075IFS=$as_save_IFS
45076
45077  ;;
45078esac
45079fi
45080BUILD_CC=$ac_cv_path_BUILD_CC
45081if test -n "$BUILD_CC"; then
45082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45083$as_echo "$BUILD_CC" >&6; }
45084else
45085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45086$as_echo "no" >&6; }
45087fi
45088
45089
45090  test -n "$BUILD_CC" && break
45091done
45092
45093    else
45094      # If it succeeded, then it was overridden by the user. We will use it
45095      # for the tool.
45096
45097      # First remove it from the list of overridden variables, so we can test
45098      # for unknown variables in the end.
45099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45100
45101      # Check if we try to supply an empty value
45102      if test "x$BUILD_CC" = x; then
45103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45104$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45106$as_echo_n "checking for BUILD_CC... " >&6; }
45107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45108$as_echo "disabled" >&6; }
45109      else
45110        # Check if the provided tool contains a complete path.
45111        tool_specified="$BUILD_CC"
45112        tool_basename="${tool_specified##*/}"
45113        if test "x$tool_basename" = "x$tool_specified"; then
45114          # A command without a complete path is provided, search $PATH.
45115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45116$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45117          # Extract the first word of "$tool_basename", so it can be a program name with args.
45118set dummy $tool_basename; ac_word=$2
45119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45120$as_echo_n "checking for $ac_word... " >&6; }
45121if ${ac_cv_path_BUILD_CC+:} false; then :
45122  $as_echo_n "(cached) " >&6
45123else
45124  case $BUILD_CC in
45125  [\\/]* | ?:[\\/]*)
45126  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45127  ;;
45128  *)
45129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45130for as_dir in $PATH
45131do
45132  IFS=$as_save_IFS
45133  test -z "$as_dir" && as_dir=.
45134    for ac_exec_ext in '' $ac_executable_extensions; do
45135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45136    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45138    break 2
45139  fi
45140done
45141  done
45142IFS=$as_save_IFS
45143
45144  ;;
45145esac
45146fi
45147BUILD_CC=$ac_cv_path_BUILD_CC
45148if test -n "$BUILD_CC"; then
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45150$as_echo "$BUILD_CC" >&6; }
45151else
45152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45153$as_echo "no" >&6; }
45154fi
45155
45156
45157          if test "x$BUILD_CC" = x; then
45158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45159          fi
45160        else
45161          # Otherwise we believe it is a complete path. Use it as it is.
45162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45163$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45165$as_echo_n "checking for BUILD_CC... " >&6; }
45166          if test ! -x "$tool_specified"; then
45167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45168$as_echo "not found" >&6; }
45169            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45170          fi
45171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45172$as_echo "$tool_specified" >&6; }
45173        fi
45174      fi
45175    fi
45176
45177  fi
45178
45179
45180
45181  if test "x$BUILD_CC" = x; then
45182    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45183  fi
45184
45185
45186
45187  # Only process if variable expands to non-empty
45188
45189  if test "x$BUILD_CC" != x; then
45190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45191
45192  # First separate the path from the arguments. This will split at the first
45193  # space.
45194  complete="$BUILD_CC"
45195  path="${complete%% *}"
45196  tmp="$complete EOL"
45197  arguments="${tmp#* }"
45198
45199  # Input might be given as Windows format, start by converting to
45200  # unix format.
45201  new_path=`$CYGPATH -u "$path"`
45202
45203  # Now try to locate executable using which
45204  new_path=`$WHICH "$new_path" 2> /dev/null`
45205  # bat and cmd files are not always considered executable in cygwin causing which
45206  # to not find them
45207  if test "x$new_path" = x \
45208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45210    new_path=`$CYGPATH -u "$path"`
45211  fi
45212  if test "x$new_path" = x; then
45213    # Oops. Which didn't find the executable.
45214    # The splitting of arguments from the executable at a space might have been incorrect,
45215    # since paths with space are more likely in Windows. Give it another try with the whole
45216    # argument.
45217    path="$complete"
45218    arguments="EOL"
45219    new_path=`$CYGPATH -u "$path"`
45220    new_path=`$WHICH "$new_path" 2> /dev/null`
45221    # bat and cmd files are not always considered executable in cygwin causing which
45222    # to not find them
45223    if test "x$new_path" = x \
45224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45226      new_path=`$CYGPATH -u "$path"`
45227    fi
45228    if test "x$new_path" = x; then
45229      # It's still not found. Now this is an unrecoverable error.
45230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45231$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45232      has_space=`$ECHO "$complete" | $GREP " "`
45233      if test "x$has_space" != x; then
45234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45236      fi
45237      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45238    fi
45239  fi
45240
45241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45244  # "foo.exe" is OK but "foo" is an error.
45245  #
45246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45247  # It is also a way to make sure we got the proper file name for the real test later on.
45248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45249  if test "x$test_shortpath" = x; then
45250    # Short path failed, file does not exist as specified.
45251    # Try adding .exe or .cmd
45252    if test -f "${new_path}.exe"; then
45253      input_to_shortpath="${new_path}.exe"
45254    elif test -f "${new_path}.cmd"; then
45255      input_to_shortpath="${new_path}.cmd"
45256    else
45257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45258$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45261      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45262    fi
45263  else
45264    input_to_shortpath="$new_path"
45265  fi
45266
45267  # Call helper function which possibly converts this using DOS-style short mode.
45268  # If so, the updated path is stored in $new_path.
45269  new_path="$input_to_shortpath"
45270
45271  input_path="$input_to_shortpath"
45272  # Check if we need to convert this using DOS-style short mode. If the path
45273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45274  # take no chances and rewrite it.
45275  # Note: m4 eats our [], so we need to use [ and ] instead.
45276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45277  if test "x$has_forbidden_chars" != x; then
45278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45282      # Going to short mode and back again did indeed matter. Since short mode is
45283      # case insensitive, let's make it lowercase to improve readability.
45284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45285      # Now convert it back to Unix-style (cygpath)
45286      input_path=`$CYGPATH -u "$shortmode_path"`
45287      new_path="$input_path"
45288    fi
45289  fi
45290
45291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45292  if test "x$test_cygdrive_prefix" = x; then
45293    # As a simple fix, exclude /usr/bin since it's not a real path.
45294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45296      # a path prefixed by /cygdrive for fixpath to work.
45297      new_path="$CYGWIN_ROOT_PATH$input_path"
45298    fi
45299  fi
45300
45301  # remove trailing .exe if any
45302  new_path="${new_path/%.exe/}"
45303
45304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45305
45306  # First separate the path from the arguments. This will split at the first
45307  # space.
45308  complete="$BUILD_CC"
45309  path="${complete%% *}"
45310  tmp="$complete EOL"
45311  arguments="${tmp#* }"
45312
45313  # Input might be given as Windows format, start by converting to
45314  # unix format.
45315  new_path="$path"
45316
45317  windows_path="$new_path"
45318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45319    unix_path=`$CYGPATH -u "$windows_path"`
45320    new_path="$unix_path"
45321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45323    new_path="$unix_path"
45324  fi
45325
45326
45327  # Now try to locate executable using which
45328  new_path=`$WHICH "$new_path" 2> /dev/null`
45329
45330  if test "x$new_path" = x; then
45331    # Oops. Which didn't find the executable.
45332    # The splitting of arguments from the executable at a space might have been incorrect,
45333    # since paths with space are more likely in Windows. Give it another try with the whole
45334    # argument.
45335    path="$complete"
45336    arguments="EOL"
45337    new_path="$path"
45338
45339  windows_path="$new_path"
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341    unix_path=`$CYGPATH -u "$windows_path"`
45342    new_path="$unix_path"
45343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45345    new_path="$unix_path"
45346  fi
45347
45348
45349    new_path=`$WHICH "$new_path" 2> /dev/null`
45350    # bat and cmd files are not always considered executable in MSYS causing which
45351    # to not find them
45352    if test "x$new_path" = x \
45353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45355      new_path="$path"
45356
45357  windows_path="$new_path"
45358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45359    unix_path=`$CYGPATH -u "$windows_path"`
45360    new_path="$unix_path"
45361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45363    new_path="$unix_path"
45364  fi
45365
45366    fi
45367
45368    if test "x$new_path" = x; then
45369      # It's still not found. Now this is an unrecoverable error.
45370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45371$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45372      has_space=`$ECHO "$complete" | $GREP " "`
45373      if test "x$has_space" != x; then
45374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45376      fi
45377      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45378    fi
45379  fi
45380
45381  # Now new_path has a complete unix path to the binary
45382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45383    # Keep paths in /bin as-is, but remove trailing .exe if any
45384    new_path="${new_path/%.exe/}"
45385    # Do not save /bin paths to all_fixpath_prefixes!
45386  else
45387    # Not in mixed or Windows style, start by that.
45388    new_path=`cmd //c echo $new_path`
45389
45390  input_path="$new_path"
45391  # Check if we need to convert this using DOS-style short mode. If the path
45392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45393  # take no chances and rewrite it.
45394  # Note: m4 eats our [], so we need to use [ and ] instead.
45395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45396  if test "x$has_forbidden_chars" != x; then
45397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45399  fi
45400
45401    # Output is in $new_path
45402
45403  windows_path="$new_path"
45404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45405    unix_path=`$CYGPATH -u "$windows_path"`
45406    new_path="$unix_path"
45407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45409    new_path="$unix_path"
45410  fi
45411
45412    # remove trailing .exe if any
45413    new_path="${new_path/%.exe/}"
45414
45415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45417  fi
45418
45419    else
45420      # We're on a unix platform. Hooray! :)
45421      # First separate the path from the arguments. This will split at the first
45422      # space.
45423      complete="$BUILD_CC"
45424      path="${complete%% *}"
45425      tmp="$complete EOL"
45426      arguments="${tmp#* }"
45427
45428      # Cannot rely on the command "which" here since it doesn't always work.
45429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45430      if test -z "$is_absolute_path"; then
45431        # Path to executable is not absolute. Find it.
45432        IFS_save="$IFS"
45433        IFS=:
45434        for p in $PATH; do
45435          if test -f "$p/$path" && test -x "$p/$path"; then
45436            new_path="$p/$path"
45437            break
45438          fi
45439        done
45440        IFS="$IFS_save"
45441      else
45442        # This is an absolute path, we can use it without further modifications.
45443        new_path="$path"
45444      fi
45445
45446      if test "x$new_path" = x; then
45447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45448$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45449        has_space=`$ECHO "$complete" | $GREP " "`
45450        if test "x$has_space" != x; then
45451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45453        fi
45454        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45455      fi
45456    fi
45457
45458    # Now join together the path and the arguments once again
45459    if test "x$arguments" != xEOL; then
45460      new_complete="$new_path ${arguments% *}"
45461    else
45462      new_complete="$new_path"
45463    fi
45464
45465    if test "x$complete" != "x$new_complete"; then
45466      BUILD_CC="$new_complete"
45467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45468$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45469    fi
45470  fi
45471
45472
45473
45474
45475  # Publish this variable in the help.
45476
45477
45478  if [ -z "${BUILD_CXX+x}" ]; then
45479    # The variable is not set by user, try to locate tool using the code snippet
45480    for ac_prog in cl CC g++
45481do
45482  # Extract the first word of "$ac_prog", so it can be a program name with args.
45483set dummy $ac_prog; ac_word=$2
45484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45485$as_echo_n "checking for $ac_word... " >&6; }
45486if ${ac_cv_path_BUILD_CXX+:} false; then :
45487  $as_echo_n "(cached) " >&6
45488else
45489  case $BUILD_CXX in
45490  [\\/]* | ?:[\\/]*)
45491  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45492  ;;
45493  *)
45494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45495for as_dir in $PATH
45496do
45497  IFS=$as_save_IFS
45498  test -z "$as_dir" && as_dir=.
45499    for ac_exec_ext in '' $ac_executable_extensions; do
45500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45501    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45503    break 2
45504  fi
45505done
45506  done
45507IFS=$as_save_IFS
45508
45509  ;;
45510esac
45511fi
45512BUILD_CXX=$ac_cv_path_BUILD_CXX
45513if test -n "$BUILD_CXX"; then
45514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45515$as_echo "$BUILD_CXX" >&6; }
45516else
45517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45518$as_echo "no" >&6; }
45519fi
45520
45521
45522  test -n "$BUILD_CXX" && break
45523done
45524
45525  else
45526    # The variable is set, but is it from the command line or the environment?
45527
45528    # Try to remove the string !BUILD_CXX! from our list.
45529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45531      # If it failed, the variable was not from the command line. Ignore it,
45532      # but warn the user (except for BASH, which is always set by the calling BASH).
45533      if test "xBUILD_CXX" != xBASH; then
45534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45535$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45536      fi
45537      # Try to locate tool using the code snippet
45538      for ac_prog in cl CC g++
45539do
45540  # Extract the first word of "$ac_prog", so it can be a program name with args.
45541set dummy $ac_prog; ac_word=$2
45542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45543$as_echo_n "checking for $ac_word... " >&6; }
45544if ${ac_cv_path_BUILD_CXX+:} false; then :
45545  $as_echo_n "(cached) " >&6
45546else
45547  case $BUILD_CXX in
45548  [\\/]* | ?:[\\/]*)
45549  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45550  ;;
45551  *)
45552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45553for as_dir in $PATH
45554do
45555  IFS=$as_save_IFS
45556  test -z "$as_dir" && as_dir=.
45557    for ac_exec_ext in '' $ac_executable_extensions; do
45558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45559    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45561    break 2
45562  fi
45563done
45564  done
45565IFS=$as_save_IFS
45566
45567  ;;
45568esac
45569fi
45570BUILD_CXX=$ac_cv_path_BUILD_CXX
45571if test -n "$BUILD_CXX"; then
45572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45573$as_echo "$BUILD_CXX" >&6; }
45574else
45575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45576$as_echo "no" >&6; }
45577fi
45578
45579
45580  test -n "$BUILD_CXX" && break
45581done
45582
45583    else
45584      # If it succeeded, then it was overridden by the user. We will use it
45585      # for the tool.
45586
45587      # First remove it from the list of overridden variables, so we can test
45588      # for unknown variables in the end.
45589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45590
45591      # Check if we try to supply an empty value
45592      if test "x$BUILD_CXX" = x; then
45593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45594$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45596$as_echo_n "checking for BUILD_CXX... " >&6; }
45597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45598$as_echo "disabled" >&6; }
45599      else
45600        # Check if the provided tool contains a complete path.
45601        tool_specified="$BUILD_CXX"
45602        tool_basename="${tool_specified##*/}"
45603        if test "x$tool_basename" = "x$tool_specified"; then
45604          # A command without a complete path is provided, search $PATH.
45605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45606$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45607          # Extract the first word of "$tool_basename", so it can be a program name with args.
45608set dummy $tool_basename; ac_word=$2
45609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45610$as_echo_n "checking for $ac_word... " >&6; }
45611if ${ac_cv_path_BUILD_CXX+:} false; then :
45612  $as_echo_n "(cached) " >&6
45613else
45614  case $BUILD_CXX in
45615  [\\/]* | ?:[\\/]*)
45616  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45617  ;;
45618  *)
45619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45620for as_dir in $PATH
45621do
45622  IFS=$as_save_IFS
45623  test -z "$as_dir" && as_dir=.
45624    for ac_exec_ext in '' $ac_executable_extensions; do
45625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45626    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45628    break 2
45629  fi
45630done
45631  done
45632IFS=$as_save_IFS
45633
45634  ;;
45635esac
45636fi
45637BUILD_CXX=$ac_cv_path_BUILD_CXX
45638if test -n "$BUILD_CXX"; then
45639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45640$as_echo "$BUILD_CXX" >&6; }
45641else
45642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45643$as_echo "no" >&6; }
45644fi
45645
45646
45647          if test "x$BUILD_CXX" = x; then
45648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45649          fi
45650        else
45651          # Otherwise we believe it is a complete path. Use it as it is.
45652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45653$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45655$as_echo_n "checking for BUILD_CXX... " >&6; }
45656          if test ! -x "$tool_specified"; then
45657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45658$as_echo "not found" >&6; }
45659            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45660          fi
45661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45662$as_echo "$tool_specified" >&6; }
45663        fi
45664      fi
45665    fi
45666
45667  fi
45668
45669
45670
45671  if test "x$BUILD_CXX" = x; then
45672    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45673  fi
45674
45675
45676
45677  # Only process if variable expands to non-empty
45678
45679  if test "x$BUILD_CXX" != x; then
45680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45681
45682  # First separate the path from the arguments. This will split at the first
45683  # space.
45684  complete="$BUILD_CXX"
45685  path="${complete%% *}"
45686  tmp="$complete EOL"
45687  arguments="${tmp#* }"
45688
45689  # Input might be given as Windows format, start by converting to
45690  # unix format.
45691  new_path=`$CYGPATH -u "$path"`
45692
45693  # Now try to locate executable using which
45694  new_path=`$WHICH "$new_path" 2> /dev/null`
45695  # bat and cmd files are not always considered executable in cygwin causing which
45696  # to not find them
45697  if test "x$new_path" = x \
45698      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45699      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45700    new_path=`$CYGPATH -u "$path"`
45701  fi
45702  if test "x$new_path" = x; then
45703    # Oops. Which didn't find the executable.
45704    # The splitting of arguments from the executable at a space might have been incorrect,
45705    # since paths with space are more likely in Windows. Give it another try with the whole
45706    # argument.
45707    path="$complete"
45708    arguments="EOL"
45709    new_path=`$CYGPATH -u "$path"`
45710    new_path=`$WHICH "$new_path" 2> /dev/null`
45711    # bat and cmd files are not always considered executable in cygwin causing which
45712    # to not find them
45713    if test "x$new_path" = x \
45714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45716      new_path=`$CYGPATH -u "$path"`
45717    fi
45718    if test "x$new_path" = x; then
45719      # It's still not found. Now this is an unrecoverable error.
45720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45721$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45722      has_space=`$ECHO "$complete" | $GREP " "`
45723      if test "x$has_space" != x; then
45724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45726      fi
45727      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45728    fi
45729  fi
45730
45731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45734  # "foo.exe" is OK but "foo" is an error.
45735  #
45736  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45737  # It is also a way to make sure we got the proper file name for the real test later on.
45738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45739  if test "x$test_shortpath" = x; then
45740    # Short path failed, file does not exist as specified.
45741    # Try adding .exe or .cmd
45742    if test -f "${new_path}.exe"; then
45743      input_to_shortpath="${new_path}.exe"
45744    elif test -f "${new_path}.cmd"; then
45745      input_to_shortpath="${new_path}.cmd"
45746    else
45747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45748$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45751      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45752    fi
45753  else
45754    input_to_shortpath="$new_path"
45755  fi
45756
45757  # Call helper function which possibly converts this using DOS-style short mode.
45758  # If so, the updated path is stored in $new_path.
45759  new_path="$input_to_shortpath"
45760
45761  input_path="$input_to_shortpath"
45762  # Check if we need to convert this using DOS-style short mode. If the path
45763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45764  # take no chances and rewrite it.
45765  # Note: m4 eats our [], so we need to use [ and ] instead.
45766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45767  if test "x$has_forbidden_chars" != x; then
45768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45772      # Going to short mode and back again did indeed matter. Since short mode is
45773      # case insensitive, let's make it lowercase to improve readability.
45774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45775      # Now convert it back to Unix-style (cygpath)
45776      input_path=`$CYGPATH -u "$shortmode_path"`
45777      new_path="$input_path"
45778    fi
45779  fi
45780
45781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45782  if test "x$test_cygdrive_prefix" = x; then
45783    # As a simple fix, exclude /usr/bin since it's not a real path.
45784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45786      # a path prefixed by /cygdrive for fixpath to work.
45787      new_path="$CYGWIN_ROOT_PATH$input_path"
45788    fi
45789  fi
45790
45791  # remove trailing .exe if any
45792  new_path="${new_path/%.exe/}"
45793
45794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45795
45796  # First separate the path from the arguments. This will split at the first
45797  # space.
45798  complete="$BUILD_CXX"
45799  path="${complete%% *}"
45800  tmp="$complete EOL"
45801  arguments="${tmp#* }"
45802
45803  # Input might be given as Windows format, start by converting to
45804  # unix format.
45805  new_path="$path"
45806
45807  windows_path="$new_path"
45808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45809    unix_path=`$CYGPATH -u "$windows_path"`
45810    new_path="$unix_path"
45811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45813    new_path="$unix_path"
45814  fi
45815
45816
45817  # Now try to locate executable using which
45818  new_path=`$WHICH "$new_path" 2> /dev/null`
45819
45820  if test "x$new_path" = x; then
45821    # Oops. Which didn't find the executable.
45822    # The splitting of arguments from the executable at a space might have been incorrect,
45823    # since paths with space are more likely in Windows. Give it another try with the whole
45824    # argument.
45825    path="$complete"
45826    arguments="EOL"
45827    new_path="$path"
45828
45829  windows_path="$new_path"
45830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45831    unix_path=`$CYGPATH -u "$windows_path"`
45832    new_path="$unix_path"
45833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45835    new_path="$unix_path"
45836  fi
45837
45838
45839    new_path=`$WHICH "$new_path" 2> /dev/null`
45840    # bat and cmd files are not always considered executable in MSYS causing which
45841    # to not find them
45842    if test "x$new_path" = x \
45843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45845      new_path="$path"
45846
45847  windows_path="$new_path"
45848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45849    unix_path=`$CYGPATH -u "$windows_path"`
45850    new_path="$unix_path"
45851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45853    new_path="$unix_path"
45854  fi
45855
45856    fi
45857
45858    if test "x$new_path" = x; then
45859      # It's still not found. Now this is an unrecoverable error.
45860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45861$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45862      has_space=`$ECHO "$complete" | $GREP " "`
45863      if test "x$has_space" != x; then
45864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45866      fi
45867      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45868    fi
45869  fi
45870
45871  # Now new_path has a complete unix path to the binary
45872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45873    # Keep paths in /bin as-is, but remove trailing .exe if any
45874    new_path="${new_path/%.exe/}"
45875    # Do not save /bin paths to all_fixpath_prefixes!
45876  else
45877    # Not in mixed or Windows style, start by that.
45878    new_path=`cmd //c echo $new_path`
45879
45880  input_path="$new_path"
45881  # Check if we need to convert this using DOS-style short mode. If the path
45882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45883  # take no chances and rewrite it.
45884  # Note: m4 eats our [], so we need to use [ and ] instead.
45885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45886  if test "x$has_forbidden_chars" != x; then
45887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45889  fi
45890
45891    # Output is in $new_path
45892
45893  windows_path="$new_path"
45894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45895    unix_path=`$CYGPATH -u "$windows_path"`
45896    new_path="$unix_path"
45897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45899    new_path="$unix_path"
45900  fi
45901
45902    # remove trailing .exe if any
45903    new_path="${new_path/%.exe/}"
45904
45905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45907  fi
45908
45909    else
45910      # We're on a unix platform. Hooray! :)
45911      # First separate the path from the arguments. This will split at the first
45912      # space.
45913      complete="$BUILD_CXX"
45914      path="${complete%% *}"
45915      tmp="$complete EOL"
45916      arguments="${tmp#* }"
45917
45918      # Cannot rely on the command "which" here since it doesn't always work.
45919      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45920      if test -z "$is_absolute_path"; then
45921        # Path to executable is not absolute. Find it.
45922        IFS_save="$IFS"
45923        IFS=:
45924        for p in $PATH; do
45925          if test -f "$p/$path" && test -x "$p/$path"; then
45926            new_path="$p/$path"
45927            break
45928          fi
45929        done
45930        IFS="$IFS_save"
45931      else
45932        # This is an absolute path, we can use it without further modifications.
45933        new_path="$path"
45934      fi
45935
45936      if test "x$new_path" = x; then
45937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45938$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45939        has_space=`$ECHO "$complete" | $GREP " "`
45940        if test "x$has_space" != x; then
45941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45943        fi
45944        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45945      fi
45946    fi
45947
45948    # Now join together the path and the arguments once again
45949    if test "x$arguments" != xEOL; then
45950      new_complete="$new_path ${arguments% *}"
45951    else
45952      new_complete="$new_path"
45953    fi
45954
45955    if test "x$complete" != "x$new_complete"; then
45956      BUILD_CXX="$new_complete"
45957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45958$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45959    fi
45960  fi
45961
45962
45963
45964  # Publish this variable in the help.
45965
45966
45967  if [ -z "${BUILD_NM+x}" ]; then
45968    # The variable is not set by user, try to locate tool using the code snippet
45969    for ac_prog in nm gcc-nm
45970do
45971  # Extract the first word of "$ac_prog", so it can be a program name with args.
45972set dummy $ac_prog; ac_word=$2
45973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45974$as_echo_n "checking for $ac_word... " >&6; }
45975if ${ac_cv_path_BUILD_NM+:} false; then :
45976  $as_echo_n "(cached) " >&6
45977else
45978  case $BUILD_NM in
45979  [\\/]* | ?:[\\/]*)
45980  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45981  ;;
45982  *)
45983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45984for as_dir in $PATH
45985do
45986  IFS=$as_save_IFS
45987  test -z "$as_dir" && as_dir=.
45988    for ac_exec_ext in '' $ac_executable_extensions; do
45989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45990    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45992    break 2
45993  fi
45994done
45995  done
45996IFS=$as_save_IFS
45997
45998  ;;
45999esac
46000fi
46001BUILD_NM=$ac_cv_path_BUILD_NM
46002if test -n "$BUILD_NM"; then
46003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46004$as_echo "$BUILD_NM" >&6; }
46005else
46006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46007$as_echo "no" >&6; }
46008fi
46009
46010
46011  test -n "$BUILD_NM" && break
46012done
46013
46014  else
46015    # The variable is set, but is it from the command line or the environment?
46016
46017    # Try to remove the string !BUILD_NM! from our list.
46018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46020      # If it failed, the variable was not from the command line. Ignore it,
46021      # but warn the user (except for BASH, which is always set by the calling BASH).
46022      if test "xBUILD_NM" != xBASH; then
46023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46024$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46025      fi
46026      # Try to locate tool using the code snippet
46027      for ac_prog in nm gcc-nm
46028do
46029  # Extract the first word of "$ac_prog", so it can be a program name with args.
46030set dummy $ac_prog; ac_word=$2
46031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46032$as_echo_n "checking for $ac_word... " >&6; }
46033if ${ac_cv_path_BUILD_NM+:} false; then :
46034  $as_echo_n "(cached) " >&6
46035else
46036  case $BUILD_NM in
46037  [\\/]* | ?:[\\/]*)
46038  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46039  ;;
46040  *)
46041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46042for as_dir in $PATH
46043do
46044  IFS=$as_save_IFS
46045  test -z "$as_dir" && as_dir=.
46046    for ac_exec_ext in '' $ac_executable_extensions; do
46047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46048    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46050    break 2
46051  fi
46052done
46053  done
46054IFS=$as_save_IFS
46055
46056  ;;
46057esac
46058fi
46059BUILD_NM=$ac_cv_path_BUILD_NM
46060if test -n "$BUILD_NM"; then
46061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46062$as_echo "$BUILD_NM" >&6; }
46063else
46064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46065$as_echo "no" >&6; }
46066fi
46067
46068
46069  test -n "$BUILD_NM" && break
46070done
46071
46072    else
46073      # If it succeeded, then it was overridden by the user. We will use it
46074      # for the tool.
46075
46076      # First remove it from the list of overridden variables, so we can test
46077      # for unknown variables in the end.
46078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46079
46080      # Check if we try to supply an empty value
46081      if test "x$BUILD_NM" = x; then
46082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46083$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46085$as_echo_n "checking for BUILD_NM... " >&6; }
46086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46087$as_echo "disabled" >&6; }
46088      else
46089        # Check if the provided tool contains a complete path.
46090        tool_specified="$BUILD_NM"
46091        tool_basename="${tool_specified##*/}"
46092        if test "x$tool_basename" = "x$tool_specified"; then
46093          # A command without a complete path is provided, search $PATH.
46094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46095$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46096          # Extract the first word of "$tool_basename", so it can be a program name with args.
46097set dummy $tool_basename; ac_word=$2
46098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46099$as_echo_n "checking for $ac_word... " >&6; }
46100if ${ac_cv_path_BUILD_NM+:} false; then :
46101  $as_echo_n "(cached) " >&6
46102else
46103  case $BUILD_NM in
46104  [\\/]* | ?:[\\/]*)
46105  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46106  ;;
46107  *)
46108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46109for as_dir in $PATH
46110do
46111  IFS=$as_save_IFS
46112  test -z "$as_dir" && as_dir=.
46113    for ac_exec_ext in '' $ac_executable_extensions; do
46114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46115    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46117    break 2
46118  fi
46119done
46120  done
46121IFS=$as_save_IFS
46122
46123  ;;
46124esac
46125fi
46126BUILD_NM=$ac_cv_path_BUILD_NM
46127if test -n "$BUILD_NM"; then
46128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46129$as_echo "$BUILD_NM" >&6; }
46130else
46131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46132$as_echo "no" >&6; }
46133fi
46134
46135
46136          if test "x$BUILD_NM" = x; then
46137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46138          fi
46139        else
46140          # Otherwise we believe it is a complete path. Use it as it is.
46141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46142$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46144$as_echo_n "checking for BUILD_NM... " >&6; }
46145          if test ! -x "$tool_specified"; then
46146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46147$as_echo "not found" >&6; }
46148            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46149          fi
46150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46151$as_echo "$tool_specified" >&6; }
46152        fi
46153      fi
46154    fi
46155
46156  fi
46157
46158
46159
46160  # Only process if variable expands to non-empty
46161
46162  if test "x$BUILD_NM" != x; then
46163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46164
46165  # First separate the path from the arguments. This will split at the first
46166  # space.
46167  complete="$BUILD_NM"
46168  path="${complete%% *}"
46169  tmp="$complete EOL"
46170  arguments="${tmp#* }"
46171
46172  # Input might be given as Windows format, start by converting to
46173  # unix format.
46174  new_path=`$CYGPATH -u "$path"`
46175
46176  # Now try to locate executable using which
46177  new_path=`$WHICH "$new_path" 2> /dev/null`
46178  # bat and cmd files are not always considered executable in cygwin causing which
46179  # to not find them
46180  if test "x$new_path" = x \
46181      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46182      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46183    new_path=`$CYGPATH -u "$path"`
46184  fi
46185  if test "x$new_path" = x; then
46186    # Oops. Which didn't find the executable.
46187    # The splitting of arguments from the executable at a space might have been incorrect,
46188    # since paths with space are more likely in Windows. Give it another try with the whole
46189    # argument.
46190    path="$complete"
46191    arguments="EOL"
46192    new_path=`$CYGPATH -u "$path"`
46193    new_path=`$WHICH "$new_path" 2> /dev/null`
46194    # bat and cmd files are not always considered executable in cygwin causing which
46195    # to not find them
46196    if test "x$new_path" = x \
46197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46199      new_path=`$CYGPATH -u "$path"`
46200    fi
46201    if test "x$new_path" = x; then
46202      # It's still not found. Now this is an unrecoverable error.
46203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46204$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46205      has_space=`$ECHO "$complete" | $GREP " "`
46206      if test "x$has_space" != x; then
46207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46209      fi
46210      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46211    fi
46212  fi
46213
46214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46217  # "foo.exe" is OK but "foo" is an error.
46218  #
46219  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46220  # It is also a way to make sure we got the proper file name for the real test later on.
46221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46222  if test "x$test_shortpath" = x; then
46223    # Short path failed, file does not exist as specified.
46224    # Try adding .exe or .cmd
46225    if test -f "${new_path}.exe"; then
46226      input_to_shortpath="${new_path}.exe"
46227    elif test -f "${new_path}.cmd"; then
46228      input_to_shortpath="${new_path}.cmd"
46229    else
46230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46231$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46232      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46233$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46234      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46235    fi
46236  else
46237    input_to_shortpath="$new_path"
46238  fi
46239
46240  # Call helper function which possibly converts this using DOS-style short mode.
46241  # If so, the updated path is stored in $new_path.
46242  new_path="$input_to_shortpath"
46243
46244  input_path="$input_to_shortpath"
46245  # Check if we need to convert this using DOS-style short mode. If the path
46246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46247  # take no chances and rewrite it.
46248  # Note: m4 eats our [], so we need to use [ and ] instead.
46249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46250  if test "x$has_forbidden_chars" != x; then
46251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46255      # Going to short mode and back again did indeed matter. Since short mode is
46256      # case insensitive, let's make it lowercase to improve readability.
46257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46258      # Now convert it back to Unix-style (cygpath)
46259      input_path=`$CYGPATH -u "$shortmode_path"`
46260      new_path="$input_path"
46261    fi
46262  fi
46263
46264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46265  if test "x$test_cygdrive_prefix" = x; then
46266    # As a simple fix, exclude /usr/bin since it's not a real path.
46267    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46269      # a path prefixed by /cygdrive for fixpath to work.
46270      new_path="$CYGWIN_ROOT_PATH$input_path"
46271    fi
46272  fi
46273
46274  # remove trailing .exe if any
46275  new_path="${new_path/%.exe/}"
46276
46277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46278
46279  # First separate the path from the arguments. This will split at the first
46280  # space.
46281  complete="$BUILD_NM"
46282  path="${complete%% *}"
46283  tmp="$complete EOL"
46284  arguments="${tmp#* }"
46285
46286  # Input might be given as Windows format, start by converting to
46287  # unix format.
46288  new_path="$path"
46289
46290  windows_path="$new_path"
46291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46292    unix_path=`$CYGPATH -u "$windows_path"`
46293    new_path="$unix_path"
46294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46296    new_path="$unix_path"
46297  fi
46298
46299
46300  # Now try to locate executable using which
46301  new_path=`$WHICH "$new_path" 2> /dev/null`
46302
46303  if test "x$new_path" = x; then
46304    # Oops. Which didn't find the executable.
46305    # The splitting of arguments from the executable at a space might have been incorrect,
46306    # since paths with space are more likely in Windows. Give it another try with the whole
46307    # argument.
46308    path="$complete"
46309    arguments="EOL"
46310    new_path="$path"
46311
46312  windows_path="$new_path"
46313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46314    unix_path=`$CYGPATH -u "$windows_path"`
46315    new_path="$unix_path"
46316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46318    new_path="$unix_path"
46319  fi
46320
46321
46322    new_path=`$WHICH "$new_path" 2> /dev/null`
46323    # bat and cmd files are not always considered executable in MSYS causing which
46324    # to not find them
46325    if test "x$new_path" = x \
46326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46328      new_path="$path"
46329
46330  windows_path="$new_path"
46331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46332    unix_path=`$CYGPATH -u "$windows_path"`
46333    new_path="$unix_path"
46334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46336    new_path="$unix_path"
46337  fi
46338
46339    fi
46340
46341    if test "x$new_path" = x; then
46342      # It's still not found. Now this is an unrecoverable error.
46343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46344$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46345      has_space=`$ECHO "$complete" | $GREP " "`
46346      if test "x$has_space" != x; then
46347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46349      fi
46350      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46351    fi
46352  fi
46353
46354  # Now new_path has a complete unix path to the binary
46355  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46356    # Keep paths in /bin as-is, but remove trailing .exe if any
46357    new_path="${new_path/%.exe/}"
46358    # Do not save /bin paths to all_fixpath_prefixes!
46359  else
46360    # Not in mixed or Windows style, start by that.
46361    new_path=`cmd //c echo $new_path`
46362
46363  input_path="$new_path"
46364  # Check if we need to convert this using DOS-style short mode. If the path
46365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46366  # take no chances and rewrite it.
46367  # Note: m4 eats our [], so we need to use [ and ] instead.
46368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46369  if test "x$has_forbidden_chars" != x; then
46370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46372  fi
46373
46374    # Output is in $new_path
46375
46376  windows_path="$new_path"
46377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46378    unix_path=`$CYGPATH -u "$windows_path"`
46379    new_path="$unix_path"
46380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46382    new_path="$unix_path"
46383  fi
46384
46385    # remove trailing .exe if any
46386    new_path="${new_path/%.exe/}"
46387
46388    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46389    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46390  fi
46391
46392    else
46393      # We're on a unix platform. Hooray! :)
46394      # First separate the path from the arguments. This will split at the first
46395      # space.
46396      complete="$BUILD_NM"
46397      path="${complete%% *}"
46398      tmp="$complete EOL"
46399      arguments="${tmp#* }"
46400
46401      # Cannot rely on the command "which" here since it doesn't always work.
46402      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46403      if test -z "$is_absolute_path"; then
46404        # Path to executable is not absolute. Find it.
46405        IFS_save="$IFS"
46406        IFS=:
46407        for p in $PATH; do
46408          if test -f "$p/$path" && test -x "$p/$path"; then
46409            new_path="$p/$path"
46410            break
46411          fi
46412        done
46413        IFS="$IFS_save"
46414      else
46415        # This is an absolute path, we can use it without further modifications.
46416        new_path="$path"
46417      fi
46418
46419      if test "x$new_path" = x; then
46420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46421$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46422        has_space=`$ECHO "$complete" | $GREP " "`
46423        if test "x$has_space" != x; then
46424          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46425$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46426        fi
46427        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46428      fi
46429    fi
46430
46431    # Now join together the path and the arguments once again
46432    if test "x$arguments" != xEOL; then
46433      new_complete="$new_path ${arguments% *}"
46434    else
46435      new_complete="$new_path"
46436    fi
46437
46438    if test "x$complete" != "x$new_complete"; then
46439      BUILD_NM="$new_complete"
46440      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46441$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46442    fi
46443  fi
46444
46445
46446
46447  # Publish this variable in the help.
46448
46449
46450  if [ -z "${BUILD_AR+x}" ]; then
46451    # The variable is not set by user, try to locate tool using the code snippet
46452    for ac_prog in ar gcc-ar
46453do
46454  # Extract the first word of "$ac_prog", so it can be a program name with args.
46455set dummy $ac_prog; ac_word=$2
46456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46457$as_echo_n "checking for $ac_word... " >&6; }
46458if ${ac_cv_path_BUILD_AR+:} false; then :
46459  $as_echo_n "(cached) " >&6
46460else
46461  case $BUILD_AR in
46462  [\\/]* | ?:[\\/]*)
46463  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46464  ;;
46465  *)
46466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46467for as_dir in $PATH
46468do
46469  IFS=$as_save_IFS
46470  test -z "$as_dir" && as_dir=.
46471    for ac_exec_ext in '' $ac_executable_extensions; do
46472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46473    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46475    break 2
46476  fi
46477done
46478  done
46479IFS=$as_save_IFS
46480
46481  ;;
46482esac
46483fi
46484BUILD_AR=$ac_cv_path_BUILD_AR
46485if test -n "$BUILD_AR"; then
46486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46487$as_echo "$BUILD_AR" >&6; }
46488else
46489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46490$as_echo "no" >&6; }
46491fi
46492
46493
46494  test -n "$BUILD_AR" && break
46495done
46496
46497  else
46498    # The variable is set, but is it from the command line or the environment?
46499
46500    # Try to remove the string !BUILD_AR! from our list.
46501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46503      # If it failed, the variable was not from the command line. Ignore it,
46504      # but warn the user (except for BASH, which is always set by the calling BASH).
46505      if test "xBUILD_AR" != xBASH; then
46506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46507$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46508      fi
46509      # Try to locate tool using the code snippet
46510      for ac_prog in ar gcc-ar
46511do
46512  # Extract the first word of "$ac_prog", so it can be a program name with args.
46513set dummy $ac_prog; ac_word=$2
46514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46515$as_echo_n "checking for $ac_word... " >&6; }
46516if ${ac_cv_path_BUILD_AR+:} false; then :
46517  $as_echo_n "(cached) " >&6
46518else
46519  case $BUILD_AR in
46520  [\\/]* | ?:[\\/]*)
46521  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46522  ;;
46523  *)
46524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46525for as_dir in $PATH
46526do
46527  IFS=$as_save_IFS
46528  test -z "$as_dir" && as_dir=.
46529    for ac_exec_ext in '' $ac_executable_extensions; do
46530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46531    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46533    break 2
46534  fi
46535done
46536  done
46537IFS=$as_save_IFS
46538
46539  ;;
46540esac
46541fi
46542BUILD_AR=$ac_cv_path_BUILD_AR
46543if test -n "$BUILD_AR"; then
46544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46545$as_echo "$BUILD_AR" >&6; }
46546else
46547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46548$as_echo "no" >&6; }
46549fi
46550
46551
46552  test -n "$BUILD_AR" && break
46553done
46554
46555    else
46556      # If it succeeded, then it was overridden by the user. We will use it
46557      # for the tool.
46558
46559      # First remove it from the list of overridden variables, so we can test
46560      # for unknown variables in the end.
46561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46562
46563      # Check if we try to supply an empty value
46564      if test "x$BUILD_AR" = x; then
46565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46566$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46568$as_echo_n "checking for BUILD_AR... " >&6; }
46569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46570$as_echo "disabled" >&6; }
46571      else
46572        # Check if the provided tool contains a complete path.
46573        tool_specified="$BUILD_AR"
46574        tool_basename="${tool_specified##*/}"
46575        if test "x$tool_basename" = "x$tool_specified"; then
46576          # A command without a complete path is provided, search $PATH.
46577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46578$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46579          # Extract the first word of "$tool_basename", so it can be a program name with args.
46580set dummy $tool_basename; ac_word=$2
46581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46582$as_echo_n "checking for $ac_word... " >&6; }
46583if ${ac_cv_path_BUILD_AR+:} false; then :
46584  $as_echo_n "(cached) " >&6
46585else
46586  case $BUILD_AR in
46587  [\\/]* | ?:[\\/]*)
46588  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46589  ;;
46590  *)
46591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46592for as_dir in $PATH
46593do
46594  IFS=$as_save_IFS
46595  test -z "$as_dir" && as_dir=.
46596    for ac_exec_ext in '' $ac_executable_extensions; do
46597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46598    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46600    break 2
46601  fi
46602done
46603  done
46604IFS=$as_save_IFS
46605
46606  ;;
46607esac
46608fi
46609BUILD_AR=$ac_cv_path_BUILD_AR
46610if test -n "$BUILD_AR"; then
46611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46612$as_echo "$BUILD_AR" >&6; }
46613else
46614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46615$as_echo "no" >&6; }
46616fi
46617
46618
46619          if test "x$BUILD_AR" = x; then
46620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46621          fi
46622        else
46623          # Otherwise we believe it is a complete path. Use it as it is.
46624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46625$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46627$as_echo_n "checking for BUILD_AR... " >&6; }
46628          if test ! -x "$tool_specified"; then
46629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46630$as_echo "not found" >&6; }
46631            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46632          fi
46633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46634$as_echo "$tool_specified" >&6; }
46635        fi
46636      fi
46637    fi
46638
46639  fi
46640
46641
46642
46643  # Only process if variable expands to non-empty
46644
46645  if test "x$BUILD_AR" != x; then
46646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46647
46648  # First separate the path from the arguments. This will split at the first
46649  # space.
46650  complete="$BUILD_AR"
46651  path="${complete%% *}"
46652  tmp="$complete EOL"
46653  arguments="${tmp#* }"
46654
46655  # Input might be given as Windows format, start by converting to
46656  # unix format.
46657  new_path=`$CYGPATH -u "$path"`
46658
46659  # Now try to locate executable using which
46660  new_path=`$WHICH "$new_path" 2> /dev/null`
46661  # bat and cmd files are not always considered executable in cygwin causing which
46662  # to not find them
46663  if test "x$new_path" = x \
46664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46666    new_path=`$CYGPATH -u "$path"`
46667  fi
46668  if test "x$new_path" = x; then
46669    # Oops. Which didn't find the executable.
46670    # The splitting of arguments from the executable at a space might have been incorrect,
46671    # since paths with space are more likely in Windows. Give it another try with the whole
46672    # argument.
46673    path="$complete"
46674    arguments="EOL"
46675    new_path=`$CYGPATH -u "$path"`
46676    new_path=`$WHICH "$new_path" 2> /dev/null`
46677    # bat and cmd files are not always considered executable in cygwin causing which
46678    # to not find them
46679    if test "x$new_path" = x \
46680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46682      new_path=`$CYGPATH -u "$path"`
46683    fi
46684    if test "x$new_path" = x; then
46685      # It's still not found. Now this is an unrecoverable error.
46686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46687$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46688      has_space=`$ECHO "$complete" | $GREP " "`
46689      if test "x$has_space" != x; then
46690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46692      fi
46693      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46694    fi
46695  fi
46696
46697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46700  # "foo.exe" is OK but "foo" is an error.
46701  #
46702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46703  # It is also a way to make sure we got the proper file name for the real test later on.
46704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46705  if test "x$test_shortpath" = x; then
46706    # Short path failed, file does not exist as specified.
46707    # Try adding .exe or .cmd
46708    if test -f "${new_path}.exe"; then
46709      input_to_shortpath="${new_path}.exe"
46710    elif test -f "${new_path}.cmd"; then
46711      input_to_shortpath="${new_path}.cmd"
46712    else
46713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46714$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46717      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46718    fi
46719  else
46720    input_to_shortpath="$new_path"
46721  fi
46722
46723  # Call helper function which possibly converts this using DOS-style short mode.
46724  # If so, the updated path is stored in $new_path.
46725  new_path="$input_to_shortpath"
46726
46727  input_path="$input_to_shortpath"
46728  # Check if we need to convert this using DOS-style short mode. If the path
46729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46730  # take no chances and rewrite it.
46731  # Note: m4 eats our [], so we need to use [ and ] instead.
46732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46733  if test "x$has_forbidden_chars" != x; then
46734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46738      # Going to short mode and back again did indeed matter. Since short mode is
46739      # case insensitive, let's make it lowercase to improve readability.
46740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46741      # Now convert it back to Unix-style (cygpath)
46742      input_path=`$CYGPATH -u "$shortmode_path"`
46743      new_path="$input_path"
46744    fi
46745  fi
46746
46747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46748  if test "x$test_cygdrive_prefix" = x; then
46749    # As a simple fix, exclude /usr/bin since it's not a real path.
46750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46752      # a path prefixed by /cygdrive for fixpath to work.
46753      new_path="$CYGWIN_ROOT_PATH$input_path"
46754    fi
46755  fi
46756
46757  # remove trailing .exe if any
46758  new_path="${new_path/%.exe/}"
46759
46760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46761
46762  # First separate the path from the arguments. This will split at the first
46763  # space.
46764  complete="$BUILD_AR"
46765  path="${complete%% *}"
46766  tmp="$complete EOL"
46767  arguments="${tmp#* }"
46768
46769  # Input might be given as Windows format, start by converting to
46770  # unix format.
46771  new_path="$path"
46772
46773  windows_path="$new_path"
46774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46775    unix_path=`$CYGPATH -u "$windows_path"`
46776    new_path="$unix_path"
46777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46779    new_path="$unix_path"
46780  fi
46781
46782
46783  # Now try to locate executable using which
46784  new_path=`$WHICH "$new_path" 2> /dev/null`
46785
46786  if test "x$new_path" = x; then
46787    # Oops. Which didn't find the executable.
46788    # The splitting of arguments from the executable at a space might have been incorrect,
46789    # since paths with space are more likely in Windows. Give it another try with the whole
46790    # argument.
46791    path="$complete"
46792    arguments="EOL"
46793    new_path="$path"
46794
46795  windows_path="$new_path"
46796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46797    unix_path=`$CYGPATH -u "$windows_path"`
46798    new_path="$unix_path"
46799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46801    new_path="$unix_path"
46802  fi
46803
46804
46805    new_path=`$WHICH "$new_path" 2> /dev/null`
46806    # bat and cmd files are not always considered executable in MSYS causing which
46807    # to not find them
46808    if test "x$new_path" = x \
46809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46811      new_path="$path"
46812
46813  windows_path="$new_path"
46814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46815    unix_path=`$CYGPATH -u "$windows_path"`
46816    new_path="$unix_path"
46817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46819    new_path="$unix_path"
46820  fi
46821
46822    fi
46823
46824    if test "x$new_path" = x; then
46825      # It's still not found. Now this is an unrecoverable error.
46826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46827$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46828      has_space=`$ECHO "$complete" | $GREP " "`
46829      if test "x$has_space" != x; then
46830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46832      fi
46833      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46834    fi
46835  fi
46836
46837  # Now new_path has a complete unix path to the binary
46838  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46839    # Keep paths in /bin as-is, but remove trailing .exe if any
46840    new_path="${new_path/%.exe/}"
46841    # Do not save /bin paths to all_fixpath_prefixes!
46842  else
46843    # Not in mixed or Windows style, start by that.
46844    new_path=`cmd //c echo $new_path`
46845
46846  input_path="$new_path"
46847  # Check if we need to convert this using DOS-style short mode. If the path
46848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46849  # take no chances and rewrite it.
46850  # Note: m4 eats our [], so we need to use [ and ] instead.
46851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46852  if test "x$has_forbidden_chars" != x; then
46853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46855  fi
46856
46857    # Output is in $new_path
46858
46859  windows_path="$new_path"
46860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46861    unix_path=`$CYGPATH -u "$windows_path"`
46862    new_path="$unix_path"
46863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46865    new_path="$unix_path"
46866  fi
46867
46868    # remove trailing .exe if any
46869    new_path="${new_path/%.exe/}"
46870
46871    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46872    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46873  fi
46874
46875    else
46876      # We're on a unix platform. Hooray! :)
46877      # First separate the path from the arguments. This will split at the first
46878      # space.
46879      complete="$BUILD_AR"
46880      path="${complete%% *}"
46881      tmp="$complete EOL"
46882      arguments="${tmp#* }"
46883
46884      # Cannot rely on the command "which" here since it doesn't always work.
46885      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46886      if test -z "$is_absolute_path"; then
46887        # Path to executable is not absolute. Find it.
46888        IFS_save="$IFS"
46889        IFS=:
46890        for p in $PATH; do
46891          if test -f "$p/$path" && test -x "$p/$path"; then
46892            new_path="$p/$path"
46893            break
46894          fi
46895        done
46896        IFS="$IFS_save"
46897      else
46898        # This is an absolute path, we can use it without further modifications.
46899        new_path="$path"
46900      fi
46901
46902      if test "x$new_path" = x; then
46903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46904$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46905        has_space=`$ECHO "$complete" | $GREP " "`
46906        if test "x$has_space" != x; then
46907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46909        fi
46910        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46911      fi
46912    fi
46913
46914    # Now join together the path and the arguments once again
46915    if test "x$arguments" != xEOL; then
46916      new_complete="$new_path ${arguments% *}"
46917    else
46918      new_complete="$new_path"
46919    fi
46920
46921    if test "x$complete" != "x$new_complete"; then
46922      BUILD_AR="$new_complete"
46923      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46924$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46925    fi
46926  fi
46927
46928
46929
46930  # Publish this variable in the help.
46931
46932
46933  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46934    # The variable is not set by user, try to locate tool using the code snippet
46935    for ac_prog in objcopy
46936do
46937  # Extract the first word of "$ac_prog", so it can be a program name with args.
46938set dummy $ac_prog; ac_word=$2
46939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46940$as_echo_n "checking for $ac_word... " >&6; }
46941if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46942  $as_echo_n "(cached) " >&6
46943else
46944  case $BUILD_OBJCOPY in
46945  [\\/]* | ?:[\\/]*)
46946  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46947  ;;
46948  *)
46949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46950for as_dir in $PATH
46951do
46952  IFS=$as_save_IFS
46953  test -z "$as_dir" && as_dir=.
46954    for ac_exec_ext in '' $ac_executable_extensions; do
46955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46956    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46958    break 2
46959  fi
46960done
46961  done
46962IFS=$as_save_IFS
46963
46964  ;;
46965esac
46966fi
46967BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46968if test -n "$BUILD_OBJCOPY"; then
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46970$as_echo "$BUILD_OBJCOPY" >&6; }
46971else
46972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46973$as_echo "no" >&6; }
46974fi
46975
46976
46977  test -n "$BUILD_OBJCOPY" && break
46978done
46979
46980  else
46981    # The variable is set, but is it from the command line or the environment?
46982
46983    # Try to remove the string !BUILD_OBJCOPY! from our list.
46984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46986      # If it failed, the variable was not from the command line. Ignore it,
46987      # but warn the user (except for BASH, which is always set by the calling BASH).
46988      if test "xBUILD_OBJCOPY" != xBASH; then
46989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46990$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46991      fi
46992      # Try to locate tool using the code snippet
46993      for ac_prog in objcopy
46994do
46995  # Extract the first word of "$ac_prog", so it can be a program name with args.
46996set dummy $ac_prog; ac_word=$2
46997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46998$as_echo_n "checking for $ac_word... " >&6; }
46999if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47000  $as_echo_n "(cached) " >&6
47001else
47002  case $BUILD_OBJCOPY in
47003  [\\/]* | ?:[\\/]*)
47004  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47005  ;;
47006  *)
47007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47008for as_dir in $PATH
47009do
47010  IFS=$as_save_IFS
47011  test -z "$as_dir" && as_dir=.
47012    for ac_exec_ext in '' $ac_executable_extensions; do
47013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47014    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47016    break 2
47017  fi
47018done
47019  done
47020IFS=$as_save_IFS
47021
47022  ;;
47023esac
47024fi
47025BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47026if test -n "$BUILD_OBJCOPY"; then
47027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47028$as_echo "$BUILD_OBJCOPY" >&6; }
47029else
47030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47031$as_echo "no" >&6; }
47032fi
47033
47034
47035  test -n "$BUILD_OBJCOPY" && break
47036done
47037
47038    else
47039      # If it succeeded, then it was overridden by the user. We will use it
47040      # for the tool.
47041
47042      # First remove it from the list of overridden variables, so we can test
47043      # for unknown variables in the end.
47044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47045
47046      # Check if we try to supply an empty value
47047      if test "x$BUILD_OBJCOPY" = x; then
47048        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47049$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47051$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47053$as_echo "disabled" >&6; }
47054      else
47055        # Check if the provided tool contains a complete path.
47056        tool_specified="$BUILD_OBJCOPY"
47057        tool_basename="${tool_specified##*/}"
47058        if test "x$tool_basename" = "x$tool_specified"; then
47059          # A command without a complete path is provided, search $PATH.
47060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47061$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47062          # Extract the first word of "$tool_basename", so it can be a program name with args.
47063set dummy $tool_basename; ac_word=$2
47064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47065$as_echo_n "checking for $ac_word... " >&6; }
47066if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47067  $as_echo_n "(cached) " >&6
47068else
47069  case $BUILD_OBJCOPY in
47070  [\\/]* | ?:[\\/]*)
47071  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47072  ;;
47073  *)
47074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47075for as_dir in $PATH
47076do
47077  IFS=$as_save_IFS
47078  test -z "$as_dir" && as_dir=.
47079    for ac_exec_ext in '' $ac_executable_extensions; do
47080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47081    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47083    break 2
47084  fi
47085done
47086  done
47087IFS=$as_save_IFS
47088
47089  ;;
47090esac
47091fi
47092BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47093if test -n "$BUILD_OBJCOPY"; then
47094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47095$as_echo "$BUILD_OBJCOPY" >&6; }
47096else
47097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47098$as_echo "no" >&6; }
47099fi
47100
47101
47102          if test "x$BUILD_OBJCOPY" = x; then
47103            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47104          fi
47105        else
47106          # Otherwise we believe it is a complete path. Use it as it is.
47107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47108$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47109          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47110$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47111          if test ! -x "$tool_specified"; then
47112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47113$as_echo "not found" >&6; }
47114            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47115          fi
47116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47117$as_echo "$tool_specified" >&6; }
47118        fi
47119      fi
47120    fi
47121
47122  fi
47123
47124
47125
47126  # Only process if variable expands to non-empty
47127
47128  if test "x$BUILD_OBJCOPY" != x; then
47129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47130
47131  # First separate the path from the arguments. This will split at the first
47132  # space.
47133  complete="$BUILD_OBJCOPY"
47134  path="${complete%% *}"
47135  tmp="$complete EOL"
47136  arguments="${tmp#* }"
47137
47138  # Input might be given as Windows format, start by converting to
47139  # unix format.
47140  new_path=`$CYGPATH -u "$path"`
47141
47142  # Now try to locate executable using which
47143  new_path=`$WHICH "$new_path" 2> /dev/null`
47144  # bat and cmd files are not always considered executable in cygwin causing which
47145  # to not find them
47146  if test "x$new_path" = x \
47147      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47148      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47149    new_path=`$CYGPATH -u "$path"`
47150  fi
47151  if test "x$new_path" = x; then
47152    # Oops. Which didn't find the executable.
47153    # The splitting of arguments from the executable at a space might have been incorrect,
47154    # since paths with space are more likely in Windows. Give it another try with the whole
47155    # argument.
47156    path="$complete"
47157    arguments="EOL"
47158    new_path=`$CYGPATH -u "$path"`
47159    new_path=`$WHICH "$new_path" 2> /dev/null`
47160    # bat and cmd files are not always considered executable in cygwin causing which
47161    # to not find them
47162    if test "x$new_path" = x \
47163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47165      new_path=`$CYGPATH -u "$path"`
47166    fi
47167    if test "x$new_path" = x; then
47168      # It's still not found. Now this is an unrecoverable error.
47169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47170$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47171      has_space=`$ECHO "$complete" | $GREP " "`
47172      if test "x$has_space" != x; then
47173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47175      fi
47176      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47177    fi
47178  fi
47179
47180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47183  # "foo.exe" is OK but "foo" is an error.
47184  #
47185  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47186  # It is also a way to make sure we got the proper file name for the real test later on.
47187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47188  if test "x$test_shortpath" = x; then
47189    # Short path failed, file does not exist as specified.
47190    # Try adding .exe or .cmd
47191    if test -f "${new_path}.exe"; then
47192      input_to_shortpath="${new_path}.exe"
47193    elif test -f "${new_path}.cmd"; then
47194      input_to_shortpath="${new_path}.cmd"
47195    else
47196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47197$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47200      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47201    fi
47202  else
47203    input_to_shortpath="$new_path"
47204  fi
47205
47206  # Call helper function which possibly converts this using DOS-style short mode.
47207  # If so, the updated path is stored in $new_path.
47208  new_path="$input_to_shortpath"
47209
47210  input_path="$input_to_shortpath"
47211  # Check if we need to convert this using DOS-style short mode. If the path
47212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47213  # take no chances and rewrite it.
47214  # Note: m4 eats our [], so we need to use [ and ] instead.
47215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47216  if test "x$has_forbidden_chars" != x; then
47217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47221      # Going to short mode and back again did indeed matter. Since short mode is
47222      # case insensitive, let's make it lowercase to improve readability.
47223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47224      # Now convert it back to Unix-style (cygpath)
47225      input_path=`$CYGPATH -u "$shortmode_path"`
47226      new_path="$input_path"
47227    fi
47228  fi
47229
47230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47231  if test "x$test_cygdrive_prefix" = x; then
47232    # As a simple fix, exclude /usr/bin since it's not a real path.
47233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47235      # a path prefixed by /cygdrive for fixpath to work.
47236      new_path="$CYGWIN_ROOT_PATH$input_path"
47237    fi
47238  fi
47239
47240  # remove trailing .exe if any
47241  new_path="${new_path/%.exe/}"
47242
47243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47244
47245  # First separate the path from the arguments. This will split at the first
47246  # space.
47247  complete="$BUILD_OBJCOPY"
47248  path="${complete%% *}"
47249  tmp="$complete EOL"
47250  arguments="${tmp#* }"
47251
47252  # Input might be given as Windows format, start by converting to
47253  # unix format.
47254  new_path="$path"
47255
47256  windows_path="$new_path"
47257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47258    unix_path=`$CYGPATH -u "$windows_path"`
47259    new_path="$unix_path"
47260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47262    new_path="$unix_path"
47263  fi
47264
47265
47266  # Now try to locate executable using which
47267  new_path=`$WHICH "$new_path" 2> /dev/null`
47268
47269  if test "x$new_path" = x; then
47270    # Oops. Which didn't find the executable.
47271    # The splitting of arguments from the executable at a space might have been incorrect,
47272    # since paths with space are more likely in Windows. Give it another try with the whole
47273    # argument.
47274    path="$complete"
47275    arguments="EOL"
47276    new_path="$path"
47277
47278  windows_path="$new_path"
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280    unix_path=`$CYGPATH -u "$windows_path"`
47281    new_path="$unix_path"
47282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47284    new_path="$unix_path"
47285  fi
47286
47287
47288    new_path=`$WHICH "$new_path" 2> /dev/null`
47289    # bat and cmd files are not always considered executable in MSYS causing which
47290    # to not find them
47291    if test "x$new_path" = x \
47292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47294      new_path="$path"
47295
47296  windows_path="$new_path"
47297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47298    unix_path=`$CYGPATH -u "$windows_path"`
47299    new_path="$unix_path"
47300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47302    new_path="$unix_path"
47303  fi
47304
47305    fi
47306
47307    if test "x$new_path" = x; then
47308      # It's still not found. Now this is an unrecoverable error.
47309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47310$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47311      has_space=`$ECHO "$complete" | $GREP " "`
47312      if test "x$has_space" != x; then
47313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47315      fi
47316      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47317    fi
47318  fi
47319
47320  # Now new_path has a complete unix path to the binary
47321  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47322    # Keep paths in /bin as-is, but remove trailing .exe if any
47323    new_path="${new_path/%.exe/}"
47324    # Do not save /bin paths to all_fixpath_prefixes!
47325  else
47326    # Not in mixed or Windows style, start by that.
47327    new_path=`cmd //c echo $new_path`
47328
47329  input_path="$new_path"
47330  # Check if we need to convert this using DOS-style short mode. If the path
47331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47332  # take no chances and rewrite it.
47333  # Note: m4 eats our [], so we need to use [ and ] instead.
47334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47335  if test "x$has_forbidden_chars" != x; then
47336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47338  fi
47339
47340    # Output is in $new_path
47341
47342  windows_path="$new_path"
47343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47344    unix_path=`$CYGPATH -u "$windows_path"`
47345    new_path="$unix_path"
47346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47348    new_path="$unix_path"
47349  fi
47350
47351    # remove trailing .exe if any
47352    new_path="${new_path/%.exe/}"
47353
47354    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47355    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47356  fi
47357
47358    else
47359      # We're on a unix platform. Hooray! :)
47360      # First separate the path from the arguments. This will split at the first
47361      # space.
47362      complete="$BUILD_OBJCOPY"
47363      path="${complete%% *}"
47364      tmp="$complete EOL"
47365      arguments="${tmp#* }"
47366
47367      # Cannot rely on the command "which" here since it doesn't always work.
47368      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47369      if test -z "$is_absolute_path"; then
47370        # Path to executable is not absolute. Find it.
47371        IFS_save="$IFS"
47372        IFS=:
47373        for p in $PATH; do
47374          if test -f "$p/$path" && test -x "$p/$path"; then
47375            new_path="$p/$path"
47376            break
47377          fi
47378        done
47379        IFS="$IFS_save"
47380      else
47381        # This is an absolute path, we can use it without further modifications.
47382        new_path="$path"
47383      fi
47384
47385      if test "x$new_path" = x; then
47386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47387$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47388        has_space=`$ECHO "$complete" | $GREP " "`
47389        if test "x$has_space" != x; then
47390          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47392        fi
47393        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47394      fi
47395    fi
47396
47397    # Now join together the path and the arguments once again
47398    if test "x$arguments" != xEOL; then
47399      new_complete="$new_path ${arguments% *}"
47400    else
47401      new_complete="$new_path"
47402    fi
47403
47404    if test "x$complete" != "x$new_complete"; then
47405      BUILD_OBJCOPY="$new_complete"
47406      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47407$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47408    fi
47409  fi
47410
47411
47412
47413  # Publish this variable in the help.
47414
47415
47416  if [ -z "${BUILD_STRIP+x}" ]; then
47417    # The variable is not set by user, try to locate tool using the code snippet
47418    for ac_prog in strip
47419do
47420  # Extract the first word of "$ac_prog", so it can be a program name with args.
47421set dummy $ac_prog; ac_word=$2
47422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47423$as_echo_n "checking for $ac_word... " >&6; }
47424if ${ac_cv_path_BUILD_STRIP+:} false; then :
47425  $as_echo_n "(cached) " >&6
47426else
47427  case $BUILD_STRIP in
47428  [\\/]* | ?:[\\/]*)
47429  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47430  ;;
47431  *)
47432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47433for as_dir in $PATH
47434do
47435  IFS=$as_save_IFS
47436  test -z "$as_dir" && as_dir=.
47437    for ac_exec_ext in '' $ac_executable_extensions; do
47438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47439    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47441    break 2
47442  fi
47443done
47444  done
47445IFS=$as_save_IFS
47446
47447  ;;
47448esac
47449fi
47450BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47451if test -n "$BUILD_STRIP"; then
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47453$as_echo "$BUILD_STRIP" >&6; }
47454else
47455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47456$as_echo "no" >&6; }
47457fi
47458
47459
47460  test -n "$BUILD_STRIP" && break
47461done
47462
47463  else
47464    # The variable is set, but is it from the command line or the environment?
47465
47466    # Try to remove the string !BUILD_STRIP! from our list.
47467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47469      # If it failed, the variable was not from the command line. Ignore it,
47470      # but warn the user (except for BASH, which is always set by the calling BASH).
47471      if test "xBUILD_STRIP" != xBASH; then
47472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47473$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47474      fi
47475      # Try to locate tool using the code snippet
47476      for ac_prog in strip
47477do
47478  # Extract the first word of "$ac_prog", so it can be a program name with args.
47479set dummy $ac_prog; ac_word=$2
47480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47481$as_echo_n "checking for $ac_word... " >&6; }
47482if ${ac_cv_path_BUILD_STRIP+:} false; then :
47483  $as_echo_n "(cached) " >&6
47484else
47485  case $BUILD_STRIP in
47486  [\\/]* | ?:[\\/]*)
47487  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47488  ;;
47489  *)
47490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47491for as_dir in $PATH
47492do
47493  IFS=$as_save_IFS
47494  test -z "$as_dir" && as_dir=.
47495    for ac_exec_ext in '' $ac_executable_extensions; do
47496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47497    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47499    break 2
47500  fi
47501done
47502  done
47503IFS=$as_save_IFS
47504
47505  ;;
47506esac
47507fi
47508BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47509if test -n "$BUILD_STRIP"; then
47510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47511$as_echo "$BUILD_STRIP" >&6; }
47512else
47513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47514$as_echo "no" >&6; }
47515fi
47516
47517
47518  test -n "$BUILD_STRIP" && break
47519done
47520
47521    else
47522      # If it succeeded, then it was overridden by the user. We will use it
47523      # for the tool.
47524
47525      # First remove it from the list of overridden variables, so we can test
47526      # for unknown variables in the end.
47527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47528
47529      # Check if we try to supply an empty value
47530      if test "x$BUILD_STRIP" = x; then
47531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47532$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47534$as_echo_n "checking for BUILD_STRIP... " >&6; }
47535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47536$as_echo "disabled" >&6; }
47537      else
47538        # Check if the provided tool contains a complete path.
47539        tool_specified="$BUILD_STRIP"
47540        tool_basename="${tool_specified##*/}"
47541        if test "x$tool_basename" = "x$tool_specified"; then
47542          # A command without a complete path is provided, search $PATH.
47543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47544$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47545          # Extract the first word of "$tool_basename", so it can be a program name with args.
47546set dummy $tool_basename; ac_word=$2
47547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47548$as_echo_n "checking for $ac_word... " >&6; }
47549if ${ac_cv_path_BUILD_STRIP+:} false; then :
47550  $as_echo_n "(cached) " >&6
47551else
47552  case $BUILD_STRIP in
47553  [\\/]* | ?:[\\/]*)
47554  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47555  ;;
47556  *)
47557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47558for as_dir in $PATH
47559do
47560  IFS=$as_save_IFS
47561  test -z "$as_dir" && as_dir=.
47562    for ac_exec_ext in '' $ac_executable_extensions; do
47563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47564    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47566    break 2
47567  fi
47568done
47569  done
47570IFS=$as_save_IFS
47571
47572  ;;
47573esac
47574fi
47575BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47576if test -n "$BUILD_STRIP"; then
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47578$as_echo "$BUILD_STRIP" >&6; }
47579else
47580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47581$as_echo "no" >&6; }
47582fi
47583
47584
47585          if test "x$BUILD_STRIP" = x; then
47586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47587          fi
47588        else
47589          # Otherwise we believe it is a complete path. Use it as it is.
47590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47591$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47593$as_echo_n "checking for BUILD_STRIP... " >&6; }
47594          if test ! -x "$tool_specified"; then
47595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47596$as_echo "not found" >&6; }
47597            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47598          fi
47599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47600$as_echo "$tool_specified" >&6; }
47601        fi
47602      fi
47603    fi
47604
47605  fi
47606
47607
47608
47609  # Only process if variable expands to non-empty
47610
47611  if test "x$BUILD_STRIP" != x; then
47612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47613
47614  # First separate the path from the arguments. This will split at the first
47615  # space.
47616  complete="$BUILD_STRIP"
47617  path="${complete%% *}"
47618  tmp="$complete EOL"
47619  arguments="${tmp#* }"
47620
47621  # Input might be given as Windows format, start by converting to
47622  # unix format.
47623  new_path=`$CYGPATH -u "$path"`
47624
47625  # Now try to locate executable using which
47626  new_path=`$WHICH "$new_path" 2> /dev/null`
47627  # bat and cmd files are not always considered executable in cygwin causing which
47628  # to not find them
47629  if test "x$new_path" = x \
47630      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47631      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47632    new_path=`$CYGPATH -u "$path"`
47633  fi
47634  if test "x$new_path" = x; then
47635    # Oops. Which didn't find the executable.
47636    # The splitting of arguments from the executable at a space might have been incorrect,
47637    # since paths with space are more likely in Windows. Give it another try with the whole
47638    # argument.
47639    path="$complete"
47640    arguments="EOL"
47641    new_path=`$CYGPATH -u "$path"`
47642    new_path=`$WHICH "$new_path" 2> /dev/null`
47643    # bat and cmd files are not always considered executable in cygwin causing which
47644    # to not find them
47645    if test "x$new_path" = x \
47646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47648      new_path=`$CYGPATH -u "$path"`
47649    fi
47650    if test "x$new_path" = x; then
47651      # It's still not found. Now this is an unrecoverable error.
47652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47653$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47654      has_space=`$ECHO "$complete" | $GREP " "`
47655      if test "x$has_space" != x; then
47656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47658      fi
47659      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47660    fi
47661  fi
47662
47663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47666  # "foo.exe" is OK but "foo" is an error.
47667  #
47668  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47669  # It is also a way to make sure we got the proper file name for the real test later on.
47670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47671  if test "x$test_shortpath" = x; then
47672    # Short path failed, file does not exist as specified.
47673    # Try adding .exe or .cmd
47674    if test -f "${new_path}.exe"; then
47675      input_to_shortpath="${new_path}.exe"
47676    elif test -f "${new_path}.cmd"; then
47677      input_to_shortpath="${new_path}.cmd"
47678    else
47679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47680$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47683      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47684    fi
47685  else
47686    input_to_shortpath="$new_path"
47687  fi
47688
47689  # Call helper function which possibly converts this using DOS-style short mode.
47690  # If so, the updated path is stored in $new_path.
47691  new_path="$input_to_shortpath"
47692
47693  input_path="$input_to_shortpath"
47694  # Check if we need to convert this using DOS-style short mode. If the path
47695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47696  # take no chances and rewrite it.
47697  # Note: m4 eats our [], so we need to use [ and ] instead.
47698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47699  if test "x$has_forbidden_chars" != x; then
47700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47704      # Going to short mode and back again did indeed matter. Since short mode is
47705      # case insensitive, let's make it lowercase to improve readability.
47706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47707      # Now convert it back to Unix-style (cygpath)
47708      input_path=`$CYGPATH -u "$shortmode_path"`
47709      new_path="$input_path"
47710    fi
47711  fi
47712
47713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47714  if test "x$test_cygdrive_prefix" = x; then
47715    # As a simple fix, exclude /usr/bin since it's not a real path.
47716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47718      # a path prefixed by /cygdrive for fixpath to work.
47719      new_path="$CYGWIN_ROOT_PATH$input_path"
47720    fi
47721  fi
47722
47723  # remove trailing .exe if any
47724  new_path="${new_path/%.exe/}"
47725
47726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47727
47728  # First separate the path from the arguments. This will split at the first
47729  # space.
47730  complete="$BUILD_STRIP"
47731  path="${complete%% *}"
47732  tmp="$complete EOL"
47733  arguments="${tmp#* }"
47734
47735  # Input might be given as Windows format, start by converting to
47736  # unix format.
47737  new_path="$path"
47738
47739  windows_path="$new_path"
47740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47741    unix_path=`$CYGPATH -u "$windows_path"`
47742    new_path="$unix_path"
47743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47745    new_path="$unix_path"
47746  fi
47747
47748
47749  # Now try to locate executable using which
47750  new_path=`$WHICH "$new_path" 2> /dev/null`
47751
47752  if test "x$new_path" = x; then
47753    # Oops. Which didn't find the executable.
47754    # The splitting of arguments from the executable at a space might have been incorrect,
47755    # since paths with space are more likely in Windows. Give it another try with the whole
47756    # argument.
47757    path="$complete"
47758    arguments="EOL"
47759    new_path="$path"
47760
47761  windows_path="$new_path"
47762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47763    unix_path=`$CYGPATH -u "$windows_path"`
47764    new_path="$unix_path"
47765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47767    new_path="$unix_path"
47768  fi
47769
47770
47771    new_path=`$WHICH "$new_path" 2> /dev/null`
47772    # bat and cmd files are not always considered executable in MSYS causing which
47773    # to not find them
47774    if test "x$new_path" = x \
47775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47777      new_path="$path"
47778
47779  windows_path="$new_path"
47780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47781    unix_path=`$CYGPATH -u "$windows_path"`
47782    new_path="$unix_path"
47783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47785    new_path="$unix_path"
47786  fi
47787
47788    fi
47789
47790    if test "x$new_path" = x; then
47791      # It's still not found. Now this is an unrecoverable error.
47792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47793$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47794      has_space=`$ECHO "$complete" | $GREP " "`
47795      if test "x$has_space" != x; then
47796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47798      fi
47799      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47800    fi
47801  fi
47802
47803  # Now new_path has a complete unix path to the binary
47804  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47805    # Keep paths in /bin as-is, but remove trailing .exe if any
47806    new_path="${new_path/%.exe/}"
47807    # Do not save /bin paths to all_fixpath_prefixes!
47808  else
47809    # Not in mixed or Windows style, start by that.
47810    new_path=`cmd //c echo $new_path`
47811
47812  input_path="$new_path"
47813  # Check if we need to convert this using DOS-style short mode. If the path
47814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47815  # take no chances and rewrite it.
47816  # Note: m4 eats our [], so we need to use [ and ] instead.
47817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47818  if test "x$has_forbidden_chars" != x; then
47819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47821  fi
47822
47823    # Output is in $new_path
47824
47825  windows_path="$new_path"
47826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47827    unix_path=`$CYGPATH -u "$windows_path"`
47828    new_path="$unix_path"
47829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47831    new_path="$unix_path"
47832  fi
47833
47834    # remove trailing .exe if any
47835    new_path="${new_path/%.exe/}"
47836
47837    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47838    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47839  fi
47840
47841    else
47842      # We're on a unix platform. Hooray! :)
47843      # First separate the path from the arguments. This will split at the first
47844      # space.
47845      complete="$BUILD_STRIP"
47846      path="${complete%% *}"
47847      tmp="$complete EOL"
47848      arguments="${tmp#* }"
47849
47850      # Cannot rely on the command "which" here since it doesn't always work.
47851      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47852      if test -z "$is_absolute_path"; then
47853        # Path to executable is not absolute. Find it.
47854        IFS_save="$IFS"
47855        IFS=:
47856        for p in $PATH; do
47857          if test -f "$p/$path" && test -x "$p/$path"; then
47858            new_path="$p/$path"
47859            break
47860          fi
47861        done
47862        IFS="$IFS_save"
47863      else
47864        # This is an absolute path, we can use it without further modifications.
47865        new_path="$path"
47866      fi
47867
47868      if test "x$new_path" = x; then
47869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47870$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47871        has_space=`$ECHO "$complete" | $GREP " "`
47872        if test "x$has_space" != x; then
47873          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47875        fi
47876        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47877      fi
47878    fi
47879
47880    # Now join together the path and the arguments once again
47881    if test "x$arguments" != xEOL; then
47882      new_complete="$new_path ${arguments% *}"
47883    else
47884      new_complete="$new_path"
47885    fi
47886
47887    if test "x$complete" != "x$new_complete"; then
47888      BUILD_STRIP="$new_complete"
47889      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47890$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47891    fi
47892  fi
47893
47894    # Assume the C compiler is the assembler
47895    BUILD_AS="$BUILD_CC -c"
47896    # Just like for the target compiler, use the compiler as linker
47897    BUILD_LD="$BUILD_CC"
47898    BUILD_LDCXX="$BUILD_CXX"
47899
47900    PATH="$OLDPATH"
47901
47902
47903  COMPILER=$BUILD_CC
47904  COMPILER_NAME=BuildC
47905
47906  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47907    # cc -V output typically looks like
47908    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47909    # or
47910    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47911    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47912    # Check that this is likely to be the Solaris Studio cc.
47913    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47914    if test $? -ne 0; then
47915      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
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 with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47919$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47921$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47922      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47923    fi
47924    # Remove usage instructions (if present), and
47925    # collapse compiler output into a single line
47926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47927        $SED -e 's/ *[Uu]sage:.*//'`
47928    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47929        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47930  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47931    # xlc -qversion output typically looks like
47932    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47933    #     Version: 11.01.0000.0015
47934    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47935    # Check that this is likely to be the IBM XL C compiler.
47936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47937    if test $? -ne 0; then
47938      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47939      { $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
47940$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47941      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47942$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47943      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47944$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47945      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47946    fi
47947    # Collapse compiler output into a single line
47948    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47949    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47950        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47951  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47952    # There is no specific version flag, but all output starts with a version string.
47953    # First line typically looks something like:
47954    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47955    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47956    # Check that this is likely to be Microsoft CL.EXE.
47957    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47958    if test $? -ne 0; then
47959      { $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
47960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47962$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47963      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47964    fi
47965    # Collapse compiler output into a single line
47966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47968        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47969  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47970    # gcc --version output typically looks like
47971    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47972    #     Copyright (C) 2013 Free Software Foundation, Inc.
47973    #     This is free software; see the source for copying conditions.  There is NO
47974    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47975    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47976    # Check that this is likely to be GCC.
47977    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47978    if test $? -ne 0; then
47979      { $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
47980$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47982$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47983      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47984    fi
47985    # Remove Copyright and legalese from version string, and
47986    # collapse into a single line
47987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47988        $SED -e 's/ *Copyright .*//'`
47989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47990        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47991  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47992    # clang --version output typically looks like
47993    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47994    #    clang version 3.3 (tags/RELEASE_33/final)
47995    # or
47996    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47997    #    Target: x86_64-pc-linux-gnu
47998    #    Thread model: posix
47999    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48000    # Check that this is likely to be clang
48001    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48002    if test $? -ne 0; then
48003      { $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
48004$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48005      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48006$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48007      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48008    fi
48009    # Collapse compiler output into a single line
48010    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48011    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48012        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48013  else
48014      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48015  fi
48016  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48017  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48018  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48019  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48020
48021  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48022$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48023
48024
48025  COMPILER=$BUILD_CXX
48026  COMPILER_NAME=BuildC++
48027
48028  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48029    # cc -V output typically looks like
48030    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48031    # or
48032    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48033    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48034    # Check that this is likely to be the Solaris Studio cc.
48035    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48036    if test $? -ne 0; then
48037      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48038      { $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
48039$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48040      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48041$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48042      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48043$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48044      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48045    fi
48046    # Remove usage instructions (if present), and
48047    # collapse compiler output into a single line
48048    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48049        $SED -e 's/ *[Uu]sage:.*//'`
48050    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48051        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48052  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48053    # xlc -qversion output typically looks like
48054    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48055    #     Version: 11.01.0000.0015
48056    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48057    # Check that this is likely to be the IBM XL C compiler.
48058    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48059    if test $? -ne 0; then
48060      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48061      { $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
48062$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48063      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48064$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48065      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48066$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48067      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48068    fi
48069    # Collapse compiler output into a single line
48070    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48071    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48072        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48073  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48074    # There is no specific version flag, but all output starts with a version string.
48075    # First line typically looks something like:
48076    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48077    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48078    # Check that this is likely to be Microsoft CL.EXE.
48079    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48080    if test $? -ne 0; then
48081      { $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
48082$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48083      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48084$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48085      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48086    fi
48087    # Collapse compiler output into a single line
48088    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48089    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48090        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48091  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48092    # gcc --version output typically looks like
48093    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48094    #     Copyright (C) 2013 Free Software Foundation, Inc.
48095    #     This is free software; see the source for copying conditions.  There is NO
48096    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48097    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48098    # Check that this is likely to be GCC.
48099    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48100    if test $? -ne 0; then
48101      { $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
48102$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48103      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48104$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48105      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48106    fi
48107    # Remove Copyright and legalese from version string, and
48108    # collapse into a single line
48109    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48110        $SED -e 's/ *Copyright .*//'`
48111    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48112        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48113  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48114    # clang --version output typically looks like
48115    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48116    #    clang version 3.3 (tags/RELEASE_33/final)
48117    # or
48118    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48119    #    Target: x86_64-pc-linux-gnu
48120    #    Thread model: posix
48121    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48122    # Check that this is likely to be clang
48123    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48124    if test $? -ne 0; then
48125      { $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
48126$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48127      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48128$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48129      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48130    fi
48131    # Collapse compiler output into a single line
48132    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48133    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48134        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48135  else
48136      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48137  fi
48138  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48139  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48140  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48141  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48142
48143  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48144$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48145
48146
48147  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48148    { $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
48149$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48151$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48152  fi
48153
48154  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48155  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48156    { $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
48157$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;}
48158  fi
48159
48160  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48161    { $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
48162$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48163  fi
48164
48165  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48166
48167  else
48168    # If we are not cross compiling, use the normal target compilers for
48169    # building the build platform executables.
48170    BUILD_CC="$CC"
48171    BUILD_CXX="$CXX"
48172    BUILD_LD="$LD"
48173    BUILD_LDCXX="$LDCXX"
48174    BUILD_NM="$NM"
48175    BUILD_AS="$AS"
48176    BUILD_OBJCOPY="$OBJCOPY"
48177    BUILD_STRIP="$STRIP"
48178    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48179    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48180    BUILD_AR="$AR"
48181
48182
48183  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48185$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48186    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48187$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48188  fi
48189
48190  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48191  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48192    { $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
48193$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;}
48194  fi
48195
48196  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48197    { $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
48198$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48199  fi
48200
48201  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48202
48203  fi
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218  # The package path is used only on macosx?
48219  # FIXME: clean this up, and/or move it elsewhere.
48220  PACKAGE_PATH=/opt/local
48221
48222
48223  # Check for extra potential brokenness.
48224  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48225    # On Windows, double-check that we got the right compiler.
48226    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48227    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48228    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48229      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48230        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
48231      fi
48232    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48233      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48234        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48235      fi
48236    fi
48237  fi
48238
48239  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48240    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48241    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48242    # This is later checked when setting flags.
48243
48244    # "-Og" suppported for GCC 4.8 and later
48245    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293    # Execute function body
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342    # Execute function body
48343
48344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48345$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48346  supports=yes
48347
48348  saved_cflags="$CFLAGS"
48349  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48350  ac_ext=c
48351ac_cpp='$CPP $CPPFLAGS'
48352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48354ac_compiler_gnu=$ac_cv_c_compiler_gnu
48355
48356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48357/* end confdefs.h.  */
48358int i;
48359_ACEOF
48360if ac_fn_c_try_compile "$LINENO"; then :
48361
48362else
48363  supports=no
48364fi
48365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48366  ac_ext=cpp
48367ac_cpp='$CXXCPP $CPPFLAGS'
48368ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48369ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48370ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48371
48372  CFLAGS="$saved_cflags"
48373
48374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48375$as_echo "$supports" >&6; }
48376  if test "x$supports" = "xyes" ; then
48377    :
48378    C_COMP_SUPPORTS="yes"
48379  else
48380    :
48381    C_COMP_SUPPORTS="no"
48382  fi
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442    # Execute function body
48443
48444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48445$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48446  supports=yes
48447
48448  saved_cxxflags="$CXXFLAGS"
48449  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48450  ac_ext=cpp
48451ac_cpp='$CXXCPP $CPPFLAGS'
48452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48455
48456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48457/* end confdefs.h.  */
48458int i;
48459_ACEOF
48460if ac_fn_cxx_try_compile "$LINENO"; then :
48461
48462else
48463  supports=no
48464fi
48465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48466  ac_ext=cpp
48467ac_cpp='$CXXCPP $CPPFLAGS'
48468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48471
48472  CXXFLAGS="$saved_cxxflags"
48473
48474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48475$as_echo "$supports" >&6; }
48476  if test "x$supports" = "xyes" ; then
48477    :
48478    CXX_COMP_SUPPORTS="yes"
48479  else
48480    :
48481    CXX_COMP_SUPPORTS="no"
48482  fi
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48497$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48498  supports=no
48499  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48500
48501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48502$as_echo "$supports" >&6; }
48503  if test "x$supports" = "xyes" ; then
48504    :
48505    HAS_CFLAG_OPTIMIZE_DEBUG=true
48506  else
48507    :
48508    HAS_CFLAG_OPTIMIZE_DEBUG=false
48509  fi
48510
48511
48512
48513
48514
48515
48516
48517    # "-z relro" supported in GNU binutils 2.17 and later
48518    LINKER_RELRO_FLAG="-Wl,-z,relro"
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566    # Execute function body
48567
48568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48569$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48570  supports=yes
48571
48572  saved_ldflags="$LDFLAGS"
48573  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48574  ac_ext=c
48575ac_cpp='$CPP $CPPFLAGS'
48576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48578ac_compiler_gnu=$ac_cv_c_compiler_gnu
48579
48580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48581/* end confdefs.h.  */
48582
48583int
48584main ()
48585{
48586
48587  ;
48588  return 0;
48589}
48590_ACEOF
48591if ac_fn_c_try_link "$LINENO"; then :
48592
48593else
48594  supports=no
48595fi
48596rm -f core conftest.err conftest.$ac_objext \
48597    conftest$ac_exeext conftest.$ac_ext
48598  ac_ext=cpp
48599ac_cpp='$CXXCPP $CPPFLAGS'
48600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48603
48604  LDFLAGS="$saved_ldflags"
48605
48606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48607$as_echo "$supports" >&6; }
48608  if test "x$supports" = "xyes" ; then
48609    :
48610    HAS_LINKER_RELRO=true
48611  else
48612    :
48613    HAS_LINKER_RELRO=false
48614  fi
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628    # "-z now" supported in GNU binutils 2.11 and later
48629    LINKER_NOW_FLAG="-Wl,-z,now"
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677    # Execute function body
48678
48679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48680$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48681  supports=yes
48682
48683  saved_ldflags="$LDFLAGS"
48684  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48685  ac_ext=c
48686ac_cpp='$CPP $CPPFLAGS'
48687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48689ac_compiler_gnu=$ac_cv_c_compiler_gnu
48690
48691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48692/* end confdefs.h.  */
48693
48694int
48695main ()
48696{
48697
48698  ;
48699  return 0;
48700}
48701_ACEOF
48702if ac_fn_c_try_link "$LINENO"; then :
48703
48704else
48705  supports=no
48706fi
48707rm -f core conftest.err conftest.$ac_objext \
48708    conftest$ac_exeext conftest.$ac_ext
48709  ac_ext=cpp
48710ac_cpp='$CXXCPP $CPPFLAGS'
48711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48714
48715  LDFLAGS="$saved_ldflags"
48716
48717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48718$as_echo "$supports" >&6; }
48719  if test "x$supports" = "xyes" ; then
48720    :
48721    HAS_LINKER_NOW=true
48722  else
48723    :
48724    HAS_LINKER_NOW=false
48725  fi
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738  fi
48739
48740  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48741  # in executable.'
48742  USING_BROKEN_SUSE_LD=no
48743  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48745$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48746    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48747    $ECHO "int main() { }" > main.c
48748    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48750$as_echo "no" >&6; }
48751      USING_BROKEN_SUSE_LD=no
48752    else
48753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48754$as_echo "yes" >&6; }
48755      USING_BROKEN_SUSE_LD=yes
48756    fi
48757    $RM version-script.map main.c a.out
48758  fi
48759
48760
48761  # Setup hotspot lecagy names for toolchains
48762  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48763  if test "x$TOOLCHAIN_TYPE" = xclang; then
48764    HOTSPOT_TOOLCHAIN_TYPE=gcc
48765  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48766    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48767  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48768    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48769  fi
48770
48771
48772
48773# Setup the JTReg Regression Test Harness.
48774
48775
48776# Check whether --with-jtreg was given.
48777if test "${with_jtreg+set}" = set; then :
48778  withval=$with_jtreg;
48779fi
48780
48781
48782  if test "x$with_jtreg" = xno; then
48783    # jtreg disabled
48784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48785$as_echo_n "checking for jtreg test harness... " >&6; }
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48787$as_echo "no, disabled" >&6; }
48788  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48789    # An explicit path is specified, use it.
48790    JT_HOME="$with_jtreg"
48791    if test ! -d "$JT_HOME"; then
48792      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48793    fi
48794
48795    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48796      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48797    fi
48798
48799    JTREGEXE="$JT_HOME/bin/jtreg"
48800    if test ! -x "$JTREGEXE"; then
48801      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48802    fi
48803
48804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48805$as_echo_n "checking for jtreg test harness... " >&6; }
48806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48807$as_echo "$JT_HOME" >&6; }
48808  else
48809    # Try to locate jtreg
48810    if test "x$JT_HOME" != x; then
48811      # JT_HOME set in environment, use it
48812      if test ! -d "$JT_HOME"; then
48813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48814$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48815        JT_HOME=
48816      else
48817        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48818          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48819$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48820          JT_HOME=
48821        elif test ! -x "$JT_HOME/bin/jtreg"; then
48822          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48823$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48824          JT_HOME=
48825        else
48826          JTREGEXE="$JT_HOME/bin/jtreg"
48827          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48828$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48829        fi
48830      fi
48831    fi
48832
48833    if test "x$JT_HOME" = x; then
48834      # JT_HOME is not set in environment, or was deemed invalid.
48835      # Try to find jtreg on path
48836
48837
48838  # Publish this variable in the help.
48839
48840
48841  if [ -z "${JTREGEXE+x}" ]; then
48842    # The variable is not set by user, try to locate tool using the code snippet
48843    for ac_prog in jtreg
48844do
48845  # Extract the first word of "$ac_prog", so it can be a program name with args.
48846set dummy $ac_prog; ac_word=$2
48847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48848$as_echo_n "checking for $ac_word... " >&6; }
48849if ${ac_cv_path_JTREGEXE+:} false; then :
48850  $as_echo_n "(cached) " >&6
48851else
48852  case $JTREGEXE in
48853  [\\/]* | ?:[\\/]*)
48854  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48855  ;;
48856  *)
48857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48858for as_dir in $PATH
48859do
48860  IFS=$as_save_IFS
48861  test -z "$as_dir" && as_dir=.
48862    for ac_exec_ext in '' $ac_executable_extensions; do
48863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48864    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48866    break 2
48867  fi
48868done
48869  done
48870IFS=$as_save_IFS
48871
48872  ;;
48873esac
48874fi
48875JTREGEXE=$ac_cv_path_JTREGEXE
48876if test -n "$JTREGEXE"; then
48877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48878$as_echo "$JTREGEXE" >&6; }
48879else
48880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48881$as_echo "no" >&6; }
48882fi
48883
48884
48885  test -n "$JTREGEXE" && break
48886done
48887
48888  else
48889    # The variable is set, but is it from the command line or the environment?
48890
48891    # Try to remove the string !JTREGEXE! from our list.
48892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48894      # If it failed, the variable was not from the command line. Ignore it,
48895      # but warn the user (except for BASH, which is always set by the calling BASH).
48896      if test "xJTREGEXE" != xBASH; then
48897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48898$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48899      fi
48900      # Try to locate tool using the code snippet
48901      for ac_prog in jtreg
48902do
48903  # Extract the first word of "$ac_prog", so it can be a program name with args.
48904set dummy $ac_prog; ac_word=$2
48905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48906$as_echo_n "checking for $ac_word... " >&6; }
48907if ${ac_cv_path_JTREGEXE+:} false; then :
48908  $as_echo_n "(cached) " >&6
48909else
48910  case $JTREGEXE in
48911  [\\/]* | ?:[\\/]*)
48912  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48913  ;;
48914  *)
48915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48916for as_dir in $PATH
48917do
48918  IFS=$as_save_IFS
48919  test -z "$as_dir" && as_dir=.
48920    for ac_exec_ext in '' $ac_executable_extensions; do
48921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48922    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48924    break 2
48925  fi
48926done
48927  done
48928IFS=$as_save_IFS
48929
48930  ;;
48931esac
48932fi
48933JTREGEXE=$ac_cv_path_JTREGEXE
48934if test -n "$JTREGEXE"; then
48935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48936$as_echo "$JTREGEXE" >&6; }
48937else
48938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48939$as_echo "no" >&6; }
48940fi
48941
48942
48943  test -n "$JTREGEXE" && break
48944done
48945
48946    else
48947      # If it succeeded, then it was overridden by the user. We will use it
48948      # for the tool.
48949
48950      # First remove it from the list of overridden variables, so we can test
48951      # for unknown variables in the end.
48952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48953
48954      # Check if we try to supply an empty value
48955      if test "x$JTREGEXE" = x; then
48956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48957$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48959$as_echo_n "checking for JTREGEXE... " >&6; }
48960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48961$as_echo "disabled" >&6; }
48962      else
48963        # Check if the provided tool contains a complete path.
48964        tool_specified="$JTREGEXE"
48965        tool_basename="${tool_specified##*/}"
48966        if test "x$tool_basename" = "x$tool_specified"; then
48967          # A command without a complete path is provided, search $PATH.
48968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48969$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48970          # Extract the first word of "$tool_basename", so it can be a program name with args.
48971set dummy $tool_basename; ac_word=$2
48972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48973$as_echo_n "checking for $ac_word... " >&6; }
48974if ${ac_cv_path_JTREGEXE+:} false; then :
48975  $as_echo_n "(cached) " >&6
48976else
48977  case $JTREGEXE in
48978  [\\/]* | ?:[\\/]*)
48979  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48980  ;;
48981  *)
48982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48983for as_dir in $PATH
48984do
48985  IFS=$as_save_IFS
48986  test -z "$as_dir" && as_dir=.
48987    for ac_exec_ext in '' $ac_executable_extensions; do
48988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48989    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48991    break 2
48992  fi
48993done
48994  done
48995IFS=$as_save_IFS
48996
48997  ;;
48998esac
48999fi
49000JTREGEXE=$ac_cv_path_JTREGEXE
49001if test -n "$JTREGEXE"; then
49002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49003$as_echo "$JTREGEXE" >&6; }
49004else
49005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49006$as_echo "no" >&6; }
49007fi
49008
49009
49010          if test "x$JTREGEXE" = x; then
49011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49012          fi
49013        else
49014          # Otherwise we believe it is a complete path. Use it as it is.
49015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49016$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49018$as_echo_n "checking for JTREGEXE... " >&6; }
49019          if test ! -x "$tool_specified"; then
49020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49021$as_echo "not found" >&6; }
49022            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49023          fi
49024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49025$as_echo "$tool_specified" >&6; }
49026        fi
49027      fi
49028    fi
49029
49030  fi
49031
49032
49033      if test "x$JTREGEXE" != x; then
49034        # That's good, now try to derive JT_HOME
49035        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49036        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49037          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49038$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49039          JT_HOME=
49040          JTREGEXE=
49041        else
49042          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49043$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49044        fi
49045      fi
49046    fi
49047
49048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49049$as_echo_n "checking for jtreg test harness... " >&6; }
49050    if test "x$JT_HOME" != x; then
49051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49052$as_echo "$JT_HOME" >&6; }
49053    else
49054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49055$as_echo "no, not found" >&6; }
49056
49057      if test "x$with_jtreg" = xyes; then
49058        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49059      fi
49060    fi
49061  fi
49062
49063
49064  # Only process if variable expands to non-empty
49065
49066  if test "x$JTREGEXE" != x; then
49067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49068
49069  # First separate the path from the arguments. This will split at the first
49070  # space.
49071  complete="$JTREGEXE"
49072  path="${complete%% *}"
49073  tmp="$complete EOL"
49074  arguments="${tmp#* }"
49075
49076  # Input might be given as Windows format, start by converting to
49077  # unix format.
49078  new_path=`$CYGPATH -u "$path"`
49079
49080  # Now try to locate executable using which
49081  new_path=`$WHICH "$new_path" 2> /dev/null`
49082  # bat and cmd files are not always considered executable in cygwin causing which
49083  # to not find them
49084  if test "x$new_path" = x \
49085      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49086      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49087    new_path=`$CYGPATH -u "$path"`
49088  fi
49089  if test "x$new_path" = x; then
49090    # Oops. Which didn't find the executable.
49091    # The splitting of arguments from the executable at a space might have been incorrect,
49092    # since paths with space are more likely in Windows. Give it another try with the whole
49093    # argument.
49094    path="$complete"
49095    arguments="EOL"
49096    new_path=`$CYGPATH -u "$path"`
49097    new_path=`$WHICH "$new_path" 2> /dev/null`
49098    # bat and cmd files are not always considered executable in cygwin causing which
49099    # to not find them
49100    if test "x$new_path" = x \
49101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49103      new_path=`$CYGPATH -u "$path"`
49104    fi
49105    if test "x$new_path" = x; then
49106      # It's still not found. Now this is an unrecoverable error.
49107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49108$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49109      has_space=`$ECHO "$complete" | $GREP " "`
49110      if test "x$has_space" != x; then
49111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49113      fi
49114      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49115    fi
49116  fi
49117
49118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49121  # "foo.exe" is OK but "foo" is an error.
49122  #
49123  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49124  # It is also a way to make sure we got the proper file name for the real test later on.
49125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49126  if test "x$test_shortpath" = x; then
49127    # Short path failed, file does not exist as specified.
49128    # Try adding .exe or .cmd
49129    if test -f "${new_path}.exe"; then
49130      input_to_shortpath="${new_path}.exe"
49131    elif test -f "${new_path}.cmd"; then
49132      input_to_shortpath="${new_path}.cmd"
49133    else
49134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49135$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49138      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49139    fi
49140  else
49141    input_to_shortpath="$new_path"
49142  fi
49143
49144  # Call helper function which possibly converts this using DOS-style short mode.
49145  # If so, the updated path is stored in $new_path.
49146  new_path="$input_to_shortpath"
49147
49148  input_path="$input_to_shortpath"
49149  # Check if we need to convert this using DOS-style short mode. If the path
49150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49151  # take no chances and rewrite it.
49152  # Note: m4 eats our [], so we need to use [ and ] instead.
49153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49154  if test "x$has_forbidden_chars" != x; then
49155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49159      # Going to short mode and back again did indeed matter. Since short mode is
49160      # case insensitive, let's make it lowercase to improve readability.
49161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49162      # Now convert it back to Unix-style (cygpath)
49163      input_path=`$CYGPATH -u "$shortmode_path"`
49164      new_path="$input_path"
49165    fi
49166  fi
49167
49168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49169  if test "x$test_cygdrive_prefix" = x; then
49170    # As a simple fix, exclude /usr/bin since it's not a real path.
49171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49173      # a path prefixed by /cygdrive for fixpath to work.
49174      new_path="$CYGWIN_ROOT_PATH$input_path"
49175    fi
49176  fi
49177
49178  # remove trailing .exe if any
49179  new_path="${new_path/%.exe/}"
49180
49181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49182
49183  # First separate the path from the arguments. This will split at the first
49184  # space.
49185  complete="$JTREGEXE"
49186  path="${complete%% *}"
49187  tmp="$complete EOL"
49188  arguments="${tmp#* }"
49189
49190  # Input might be given as Windows format, start by converting to
49191  # unix format.
49192  new_path="$path"
49193
49194  windows_path="$new_path"
49195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49196    unix_path=`$CYGPATH -u "$windows_path"`
49197    new_path="$unix_path"
49198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49200    new_path="$unix_path"
49201  fi
49202
49203
49204  # Now try to locate executable using which
49205  new_path=`$WHICH "$new_path" 2> /dev/null`
49206
49207  if test "x$new_path" = x; then
49208    # Oops. Which didn't find the executable.
49209    # The splitting of arguments from the executable at a space might have been incorrect,
49210    # since paths with space are more likely in Windows. Give it another try with the whole
49211    # argument.
49212    path="$complete"
49213    arguments="EOL"
49214    new_path="$path"
49215
49216  windows_path="$new_path"
49217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49218    unix_path=`$CYGPATH -u "$windows_path"`
49219    new_path="$unix_path"
49220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49222    new_path="$unix_path"
49223  fi
49224
49225
49226    new_path=`$WHICH "$new_path" 2> /dev/null`
49227    # bat and cmd files are not always considered executable in MSYS causing which
49228    # to not find them
49229    if test "x$new_path" = x \
49230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49232      new_path="$path"
49233
49234  windows_path="$new_path"
49235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49236    unix_path=`$CYGPATH -u "$windows_path"`
49237    new_path="$unix_path"
49238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49240    new_path="$unix_path"
49241  fi
49242
49243    fi
49244
49245    if test "x$new_path" = x; then
49246      # It's still not found. Now this is an unrecoverable error.
49247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49248$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49249      has_space=`$ECHO "$complete" | $GREP " "`
49250      if test "x$has_space" != x; then
49251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49253      fi
49254      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49255    fi
49256  fi
49257
49258  # Now new_path has a complete unix path to the binary
49259  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49260    # Keep paths in /bin as-is, but remove trailing .exe if any
49261    new_path="${new_path/%.exe/}"
49262    # Do not save /bin paths to all_fixpath_prefixes!
49263  else
49264    # Not in mixed or Windows style, start by that.
49265    new_path=`cmd //c echo $new_path`
49266
49267  input_path="$new_path"
49268  # Check if we need to convert this using DOS-style short mode. If the path
49269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49270  # take no chances and rewrite it.
49271  # Note: m4 eats our [], so we need to use [ and ] instead.
49272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49273  if test "x$has_forbidden_chars" != x; then
49274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49276  fi
49277
49278    # Output is in $new_path
49279
49280  windows_path="$new_path"
49281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49282    unix_path=`$CYGPATH -u "$windows_path"`
49283    new_path="$unix_path"
49284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49286    new_path="$unix_path"
49287  fi
49288
49289    # remove trailing .exe if any
49290    new_path="${new_path/%.exe/}"
49291
49292    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49293    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49294  fi
49295
49296    else
49297      # We're on a unix platform. Hooray! :)
49298      # First separate the path from the arguments. This will split at the first
49299      # space.
49300      complete="$JTREGEXE"
49301      path="${complete%% *}"
49302      tmp="$complete EOL"
49303      arguments="${tmp#* }"
49304
49305      # Cannot rely on the command "which" here since it doesn't always work.
49306      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49307      if test -z "$is_absolute_path"; then
49308        # Path to executable is not absolute. Find it.
49309        IFS_save="$IFS"
49310        IFS=:
49311        for p in $PATH; do
49312          if test -f "$p/$path" && test -x "$p/$path"; then
49313            new_path="$p/$path"
49314            break
49315          fi
49316        done
49317        IFS="$IFS_save"
49318      else
49319        # This is an absolute path, we can use it without further modifications.
49320        new_path="$path"
49321      fi
49322
49323      if test "x$new_path" = x; then
49324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49325$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49326        has_space=`$ECHO "$complete" | $GREP " "`
49327        if test "x$has_space" != x; then
49328          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49330        fi
49331        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49332      fi
49333    fi
49334
49335    # Now join together the path and the arguments once again
49336    if test "x$arguments" != xEOL; then
49337      new_complete="$new_path ${arguments% *}"
49338    else
49339      new_complete="$new_path"
49340    fi
49341
49342    if test "x$complete" != "x$new_complete"; then
49343      JTREGEXE="$new_complete"
49344      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49345$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49346    fi
49347  fi
49348
49349
49350  # Only process if variable expands to non-empty
49351
49352  if test "x$JT_HOME" != x; then
49353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49354
49355  # Input might be given as Windows format, start by converting to
49356  # unix format.
49357  path="$JT_HOME"
49358  new_path=`$CYGPATH -u "$path"`
49359
49360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49363  # "foo.exe" is OK but "foo" is an error.
49364  #
49365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49366  # It is also a way to make sure we got the proper file name for the real test later on.
49367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49368  if test "x$test_shortpath" = x; then
49369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49370$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49371    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49372  fi
49373
49374  # Call helper function which possibly converts this using DOS-style short mode.
49375  # If so, the updated path is stored in $new_path.
49376
49377  input_path="$new_path"
49378  # Check if we need to convert this using DOS-style short mode. If the path
49379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49380  # take no chances and rewrite it.
49381  # Note: m4 eats our [], so we need to use [ and ] instead.
49382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49383  if test "x$has_forbidden_chars" != x; then
49384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49388      # Going to short mode and back again did indeed matter. Since short mode is
49389      # case insensitive, let's make it lowercase to improve readability.
49390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49391      # Now convert it back to Unix-style (cygpath)
49392      input_path=`$CYGPATH -u "$shortmode_path"`
49393      new_path="$input_path"
49394    fi
49395  fi
49396
49397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49398  if test "x$test_cygdrive_prefix" = x; then
49399    # As a simple fix, exclude /usr/bin since it's not a real path.
49400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49402      # a path prefixed by /cygdrive for fixpath to work.
49403      new_path="$CYGWIN_ROOT_PATH$input_path"
49404    fi
49405  fi
49406
49407
49408  if test "x$path" != "x$new_path"; then
49409    JT_HOME="$new_path"
49410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49411$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49412  fi
49413
49414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49415
49416  path="$JT_HOME"
49417  has_colon=`$ECHO $path | $GREP ^.:`
49418  new_path="$path"
49419  if test "x$has_colon" = x; then
49420    # Not in mixed or Windows style, start by that.
49421    new_path=`cmd //c echo $path`
49422  fi
49423
49424
49425  input_path="$new_path"
49426  # Check if we need to convert this using DOS-style short mode. If the path
49427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49428  # take no chances and rewrite it.
49429  # Note: m4 eats our [], so we need to use [ and ] instead.
49430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49431  if test "x$has_forbidden_chars" != x; then
49432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49434  fi
49435
49436
49437  windows_path="$new_path"
49438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49439    unix_path=`$CYGPATH -u "$windows_path"`
49440    new_path="$unix_path"
49441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49443    new_path="$unix_path"
49444  fi
49445
49446  if test "x$path" != "x$new_path"; then
49447    JT_HOME="$new_path"
49448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49449$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49450  fi
49451
49452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49454
49455    else
49456      # We're on a unix platform. Hooray! :)
49457      path="$JT_HOME"
49458      has_space=`$ECHO "$path" | $GREP " "`
49459      if test "x$has_space" != x; then
49460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49461$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49463      fi
49464
49465      # Use eval to expand a potential ~
49466      eval path="$path"
49467      if test ! -f "$path" && test ! -d "$path"; then
49468        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49469      fi
49470
49471      if test -d "$path"; then
49472        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49473      else
49474        dir="`$DIRNAME "$path"`"
49475        base="`$BASENAME "$path"`"
49476        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49477      fi
49478    fi
49479  fi
49480
49481
49482
49483
49484
49485# Setup Jib dependency tool
49486
49487
49488# Check whether --with-jib was given.
49489if test "${with_jib+set}" = set; then :
49490  withval=$with_jib;
49491fi
49492
49493
49494  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49495    # jib disabled
49496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49497$as_echo_n "checking for jib... " >&6; }
49498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49499$as_echo "no" >&6; }
49500  elif test "x$with_jib" = xyes; then
49501    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49502  else
49503    JIB_HOME="${with_jib}"
49504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49505$as_echo_n "checking for jib... " >&6; }
49506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49507$as_echo "${JIB_HOME}" >&6; }
49508    if test ! -d "${JIB_HOME}"; then
49509      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49510    fi
49511    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49512    if test ! -f "${JIB_JAR}"; then
49513      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49514    fi
49515  fi
49516
49517
49518
49519
49520
49521  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49522  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49523  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49524  #                              commands produced by the link step (currently AIX only)
49525  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49526    COMPILER_TARGET_BITS_FLAG="-q"
49527    COMPILER_COMMAND_FILE_FLAG="-f"
49528    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49529  else
49530    COMPILER_TARGET_BITS_FLAG="-m"
49531    COMPILER_COMMAND_FILE_FLAG="@"
49532    COMPILER_BINDCMD_FILE_FLAG=""
49533
49534    # The solstudio linker does not support @-files.
49535    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49536      COMPILER_COMMAND_FILE_FLAG=
49537    fi
49538
49539    # Check if @file is supported by gcc
49540    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49542$as_echo_n "checking if @file is supported by gcc... " >&6; }
49543      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49544      $ECHO "" "--version" > command.file
49545      if $CXX @command.file 2>&5 >&5; then
49546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49547$as_echo "yes" >&6; }
49548        COMPILER_COMMAND_FILE_FLAG="@"
49549      else
49550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49551$as_echo "no" >&6; }
49552        COMPILER_COMMAND_FILE_FLAG=
49553      fi
49554      $RM command.file
49555    fi
49556  fi
49557
49558
49559
49560
49561  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49562  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49563    ARFLAGS="-r"
49564  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49565    ARFLAGS="-X64"
49566  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49567    # lib.exe is used as AR to create static libraries.
49568    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49569  else
49570    ARFLAGS=""
49571  fi
49572
49573
49574  ## Setup strip.
49575  # FIXME: should this really be per platform, or should it be per toolchain type?
49576  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49577  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49578  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49579    STRIPFLAGS="-g"
49580  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49581    STRIPFLAGS="-x"
49582  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49583    STRIPFLAGS="-S"
49584  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49585    STRIPFLAGS="-X32_64"
49586  fi
49587
49588
49589
49590  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49591    CC_OUT_OPTION=-Fo
49592    EXE_OUT_OPTION=-out:
49593    LD_OUT_OPTION=-out:
49594    AR_OUT_OPTION=-out:
49595  else
49596    # The option used to specify the target .o,.a or .so file.
49597    # When compiling, how to specify the to be created object file.
49598    CC_OUT_OPTION='-o$(SPACE)'
49599    # When linking, how to specify the to be created executable.
49600    EXE_OUT_OPTION='-o$(SPACE)'
49601    # When linking, how to specify the to be created dynamically linkable library.
49602    LD_OUT_OPTION='-o$(SPACE)'
49603    # When archiving, how to specify the to be create static archive for object files.
49604    AR_OUT_OPTION='rcs$(SPACE)'
49605  fi
49606
49607
49608
49609
49610
49611  # On Windows, we need to set RC flags.
49612  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49613    RC_FLAGS="-nologo -l0x409"
49614    JVM_RCFLAGS="-nologo"
49615    if test "x$DEBUG_LEVEL" = xrelease; then
49616      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49617      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49618    fi
49619
49620    # The version variables used to create RC_FLAGS may be overridden
49621    # in a custom configure script, or possibly the command line.
49622    # Let those variables be expanded at make time in spec.gmk.
49623    # The \$ are escaped to the shell, and the $(...) variables
49624    # are evaluated by make.
49625    RC_FLAGS="$RC_FLAGS \
49626        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49627        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49628        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49629        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49630        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49631        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49632        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49633
49634    JVM_RCFLAGS="$JVM_RCFLAGS \
49635        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49636        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49637        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49638        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49639        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49640        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49641        -D\"HS_FNAME=jvm.dll\" \
49642        -D\"HS_INTERNAL_NAME=jvm\""
49643  fi
49644
49645
49646
49647  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49648    # silence copyright notice and other headers.
49649    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49650  fi
49651
49652
49653# Now we can test some aspects on the target using configure macros.
49654
49655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49656$as_echo_n "checking for ANSI C header files... " >&6; }
49657if ${ac_cv_header_stdc+:} false; then :
49658  $as_echo_n "(cached) " >&6
49659else
49660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49661/* end confdefs.h.  */
49662#include <stdlib.h>
49663#include <stdarg.h>
49664#include <string.h>
49665#include <float.h>
49666
49667int
49668main ()
49669{
49670
49671  ;
49672  return 0;
49673}
49674_ACEOF
49675if ac_fn_cxx_try_compile "$LINENO"; then :
49676  ac_cv_header_stdc=yes
49677else
49678  ac_cv_header_stdc=no
49679fi
49680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49681
49682if test $ac_cv_header_stdc = yes; then
49683  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49685/* end confdefs.h.  */
49686#include <string.h>
49687
49688_ACEOF
49689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49690  $EGREP "memchr" >/dev/null 2>&1; then :
49691
49692else
49693  ac_cv_header_stdc=no
49694fi
49695rm -f conftest*
49696
49697fi
49698
49699if test $ac_cv_header_stdc = yes; then
49700  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49702/* end confdefs.h.  */
49703#include <stdlib.h>
49704
49705_ACEOF
49706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49707  $EGREP "free" >/dev/null 2>&1; then :
49708
49709else
49710  ac_cv_header_stdc=no
49711fi
49712rm -f conftest*
49713
49714fi
49715
49716if test $ac_cv_header_stdc = yes; then
49717  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49718  if test "$cross_compiling" = yes; then :
49719  :
49720else
49721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49722/* end confdefs.h.  */
49723#include <ctype.h>
49724#include <stdlib.h>
49725#if ((' ' & 0x0FF) == 0x020)
49726# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49727# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49728#else
49729# define ISLOWER(c) \
49730		   (('a' <= (c) && (c) <= 'i') \
49731		     || ('j' <= (c) && (c) <= 'r') \
49732		     || ('s' <= (c) && (c) <= 'z'))
49733# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49734#endif
49735
49736#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49737int
49738main ()
49739{
49740  int i;
49741  for (i = 0; i < 256; i++)
49742    if (XOR (islower (i), ISLOWER (i))
49743	|| toupper (i) != TOUPPER (i))
49744      return 2;
49745  return 0;
49746}
49747_ACEOF
49748if ac_fn_cxx_try_run "$LINENO"; then :
49749
49750else
49751  ac_cv_header_stdc=no
49752fi
49753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49754  conftest.$ac_objext conftest.beam conftest.$ac_ext
49755fi
49756
49757fi
49758fi
49759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49760$as_echo "$ac_cv_header_stdc" >&6; }
49761if test $ac_cv_header_stdc = yes; then
49762
49763$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49764
49765fi
49766
49767# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49768for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49769		  inttypes.h stdint.h unistd.h
49770do :
49771  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49772ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49773"
49774if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49775  cat >>confdefs.h <<_ACEOF
49776#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49777_ACEOF
49778
49779fi
49780
49781done
49782
49783
49784
49785  ###############################################################################
49786  #
49787  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49788  # (The JVM can use 32 or 64 bit Java pointers but that decision
49789  # is made at runtime.)
49790  #
49791
49792  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49793    # Always specify -m flag on Solaris
49794    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49795
49796  # When we add flags to the "official" CFLAGS etc, we need to
49797  # keep track of these additions in ADDED_CFLAGS etc. These
49798  # will later be checked to make sure only controlled additions
49799  # have been made to CFLAGS etc.
49800  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49801  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49802  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49803
49804  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49805  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49806  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49807
49808  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49809  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49810  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49811
49812  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49813  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49814  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49815
49816  elif test "x$COMPILE_TYPE" = xreduced; then
49817    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49818      # Specify -m if running reduced on unix platforms
49819
49820  # When we add flags to the "official" CFLAGS etc, we need to
49821  # keep track of these additions in ADDED_CFLAGS etc. These
49822  # will later be checked to make sure only controlled additions
49823  # have been made to CFLAGS etc.
49824  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49825  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49826  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49827
49828  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49829  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49830  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49831
49832  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49833  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49834  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49835
49836  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49837  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49838  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49839
49840    fi
49841  fi
49842  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49843    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49844    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49845    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49846  fi
49847
49848  # Make compilation sanity check
49849  for ac_header in stdio.h
49850do :
49851  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49852if test "x$ac_cv_header_stdio_h" = xyes; then :
49853  cat >>confdefs.h <<_ACEOF
49854#define HAVE_STDIO_H 1
49855_ACEOF
49856
49857else
49858
49859    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49860$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49861    if test "x$COMPILE_TYPE" = xreduced; then
49862
49863  # Print a helpful message on how to acquire the necessary build dependency.
49864  # reduced is the help tag: freetype, cups, alsa etc
49865  MISSING_DEPENDENCY=reduced
49866
49867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49868    cygwin_help $MISSING_DEPENDENCY
49869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49870    msys_help $MISSING_DEPENDENCY
49871  else
49872    PKGHANDLER_COMMAND=
49873
49874    case $PKGHANDLER in
49875      apt-get)
49876        apt_help     $MISSING_DEPENDENCY ;;
49877      yum)
49878        yum_help     $MISSING_DEPENDENCY ;;
49879      brew)
49880        brew_help    $MISSING_DEPENDENCY ;;
49881      port)
49882        port_help    $MISSING_DEPENDENCY ;;
49883      pkgutil)
49884        pkgutil_help $MISSING_DEPENDENCY ;;
49885      pkgadd)
49886        pkgadd_help  $MISSING_DEPENDENCY ;;
49887    esac
49888
49889    if test "x$PKGHANDLER_COMMAND" != x; then
49890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49891    fi
49892  fi
49893
49894      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49895$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49896    elif test "x$COMPILE_TYPE" = xcross; then
49897      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49898$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49899    fi
49900    as_fn_error $? "Cannot continue." "$LINENO" 5
49901
49902fi
49903
49904done
49905
49906
49907  # The cast to long int works around a bug in the HP C Compiler
49908# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49909# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49910# This bug is HP SR number 8606223364.
49911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49912$as_echo_n "checking size of int *... " >&6; }
49913if ${ac_cv_sizeof_int_p+:} false; then :
49914  $as_echo_n "(cached) " >&6
49915else
49916  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49917
49918else
49919  if test "$ac_cv_type_int_p" = yes; then
49920     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49922as_fn_error 77 "cannot compute sizeof (int *)
49923See \`config.log' for more details" "$LINENO" 5; }
49924   else
49925     ac_cv_sizeof_int_p=0
49926   fi
49927fi
49928
49929fi
49930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49931$as_echo "$ac_cv_sizeof_int_p" >&6; }
49932
49933
49934
49935cat >>confdefs.h <<_ACEOF
49936#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49937_ACEOF
49938
49939
49940
49941  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49942  if test "x$ac_cv_sizeof_int_p" = x; then
49943    # The test failed, lets stick to the assumed value.
49944    { $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
49945$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49946  else
49947    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49948
49949    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49950      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49951      # Let's try to implicitely set the compilers target architecture and retry the test
49952      { $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
49953$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;}
49954      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49955$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49956
49957  # When we add flags to the "official" CFLAGS etc, we need to
49958  # keep track of these additions in ADDED_CFLAGS etc. These
49959  # will later be checked to make sure only controlled additions
49960  # have been made to CFLAGS etc.
49961  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49962  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49963  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49964
49965  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49966  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49967  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49968
49969  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49970  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49971  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49972
49973  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49974  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49975  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49976
49977
49978      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49979      unset ac_cv_sizeof_int_p
49980      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49981      cat >>confdefs.h <<_ACEOF
49982#undef SIZEOF_INT_P
49983_ACEOF
49984
49985      # The cast to long int works around a bug in the HP C Compiler
49986# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49987# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49988# This bug is HP SR number 8606223364.
49989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49990$as_echo_n "checking size of int *... " >&6; }
49991if ${ac_cv_sizeof_int_p+:} false; then :
49992  $as_echo_n "(cached) " >&6
49993else
49994  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49995
49996else
49997  if test "$ac_cv_type_int_p" = yes; then
49998     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50000as_fn_error 77 "cannot compute sizeof (int *)
50001See \`config.log' for more details" "$LINENO" 5; }
50002   else
50003     ac_cv_sizeof_int_p=0
50004   fi
50005fi
50006
50007fi
50008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50009$as_echo "$ac_cv_sizeof_int_p" >&6; }
50010
50011
50012
50013cat >>confdefs.h <<_ACEOF
50014#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50015_ACEOF
50016
50017
50018
50019      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50020
50021      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50022        { $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
50023$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;}
50024        if test "x$COMPILE_TYPE" = xreduced; then
50025
50026  # Print a helpful message on how to acquire the necessary build dependency.
50027  # reduced is the help tag: freetype, cups, alsa etc
50028  MISSING_DEPENDENCY=reduced
50029
50030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50031    cygwin_help $MISSING_DEPENDENCY
50032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50033    msys_help $MISSING_DEPENDENCY
50034  else
50035    PKGHANDLER_COMMAND=
50036
50037    case $PKGHANDLER in
50038      apt-get)
50039        apt_help     $MISSING_DEPENDENCY ;;
50040      yum)
50041        yum_help     $MISSING_DEPENDENCY ;;
50042      brew)
50043        brew_help    $MISSING_DEPENDENCY ;;
50044      port)
50045        port_help    $MISSING_DEPENDENCY ;;
50046      pkgutil)
50047        pkgutil_help $MISSING_DEPENDENCY ;;
50048      pkgadd)
50049        pkgadd_help  $MISSING_DEPENDENCY ;;
50050    esac
50051
50052    if test "x$PKGHANDLER_COMMAND" != x; then
50053      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50054    fi
50055  fi
50056
50057          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50058$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50059        elif test "x$COMPILE_TYPE" = xcross; then
50060          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50061$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50062        fi
50063        as_fn_error $? "Cannot continue." "$LINENO" 5
50064      fi
50065    fi
50066  fi
50067
50068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50069$as_echo_n "checking for target address size... " >&6; }
50070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50071$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50072
50073
50074  ###############################################################################
50075  #
50076  # Is the target little of big endian?
50077  #
50078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50079$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50080if ${ac_cv_c_bigendian+:} false; then :
50081  $as_echo_n "(cached) " >&6
50082else
50083  ac_cv_c_bigendian=unknown
50084    # See if we're dealing with a universal compiler.
50085    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50086/* end confdefs.h.  */
50087#ifndef __APPLE_CC__
50088	       not a universal capable compiler
50089	     #endif
50090	     typedef int dummy;
50091
50092_ACEOF
50093if ac_fn_cxx_try_compile "$LINENO"; then :
50094
50095	# Check for potential -arch flags.  It is not universal unless
50096	# there are at least two -arch flags with different values.
50097	ac_arch=
50098	ac_prev=
50099	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50100	 if test -n "$ac_prev"; then
50101	   case $ac_word in
50102	     i?86 | x86_64 | ppc | ppc64)
50103	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50104		 ac_arch=$ac_word
50105	       else
50106		 ac_cv_c_bigendian=universal
50107		 break
50108	       fi
50109	       ;;
50110	   esac
50111	   ac_prev=
50112	 elif test "x$ac_word" = "x-arch"; then
50113	   ac_prev=arch
50114	 fi
50115       done
50116fi
50117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50118    if test $ac_cv_c_bigendian = unknown; then
50119      # See if sys/param.h defines the BYTE_ORDER macro.
50120      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50121/* end confdefs.h.  */
50122#include <sys/types.h>
50123	     #include <sys/param.h>
50124
50125int
50126main ()
50127{
50128#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50129		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50130		     && LITTLE_ENDIAN)
50131	      bogus endian macros
50132	     #endif
50133
50134  ;
50135  return 0;
50136}
50137_ACEOF
50138if ac_fn_cxx_try_compile "$LINENO"; then :
50139  # It does; now see whether it defined to BIG_ENDIAN or not.
50140	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50141/* end confdefs.h.  */
50142#include <sys/types.h>
50143		#include <sys/param.h>
50144
50145int
50146main ()
50147{
50148#if BYTE_ORDER != BIG_ENDIAN
50149		 not big endian
50150		#endif
50151
50152  ;
50153  return 0;
50154}
50155_ACEOF
50156if ac_fn_cxx_try_compile "$LINENO"; then :
50157  ac_cv_c_bigendian=yes
50158else
50159  ac_cv_c_bigendian=no
50160fi
50161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50162fi
50163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50164    fi
50165    if test $ac_cv_c_bigendian = unknown; then
50166      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50167      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50168/* end confdefs.h.  */
50169#include <limits.h>
50170
50171int
50172main ()
50173{
50174#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50175	      bogus endian macros
50176	     #endif
50177
50178  ;
50179  return 0;
50180}
50181_ACEOF
50182if ac_fn_cxx_try_compile "$LINENO"; then :
50183  # It does; now see whether it defined to _BIG_ENDIAN or not.
50184	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50185/* end confdefs.h.  */
50186#include <limits.h>
50187
50188int
50189main ()
50190{
50191#ifndef _BIG_ENDIAN
50192		 not big endian
50193		#endif
50194
50195  ;
50196  return 0;
50197}
50198_ACEOF
50199if ac_fn_cxx_try_compile "$LINENO"; then :
50200  ac_cv_c_bigendian=yes
50201else
50202  ac_cv_c_bigendian=no
50203fi
50204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50205fi
50206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50207    fi
50208    if test $ac_cv_c_bigendian = unknown; then
50209      # Compile a test program.
50210      if test "$cross_compiling" = yes; then :
50211  # Try to guess by grepping values from an object file.
50212	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50213/* end confdefs.h.  */
50214short int ascii_mm[] =
50215		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50216		short int ascii_ii[] =
50217		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50218		int use_ascii (int i) {
50219		  return ascii_mm[i] + ascii_ii[i];
50220		}
50221		short int ebcdic_ii[] =
50222		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50223		short int ebcdic_mm[] =
50224		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50225		int use_ebcdic (int i) {
50226		  return ebcdic_mm[i] + ebcdic_ii[i];
50227		}
50228		extern int foo;
50229
50230int
50231main ()
50232{
50233return use_ascii (foo) == use_ebcdic (foo);
50234  ;
50235  return 0;
50236}
50237_ACEOF
50238if ac_fn_cxx_try_compile "$LINENO"; then :
50239  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50240	      ac_cv_c_bigendian=yes
50241	    fi
50242	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50243	      if test "$ac_cv_c_bigendian" = unknown; then
50244		ac_cv_c_bigendian=no
50245	      else
50246		# finding both strings is unlikely to happen, but who knows?
50247		ac_cv_c_bigendian=unknown
50248	      fi
50249	    fi
50250fi
50251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50252else
50253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50254/* end confdefs.h.  */
50255$ac_includes_default
50256int
50257main ()
50258{
50259
50260	     /* Are we little or big endian?  From Harbison&Steele.  */
50261	     union
50262	     {
50263	       long int l;
50264	       char c[sizeof (long int)];
50265	     } u;
50266	     u.l = 1;
50267	     return u.c[sizeof (long int) - 1] == 1;
50268
50269  ;
50270  return 0;
50271}
50272_ACEOF
50273if ac_fn_cxx_try_run "$LINENO"; then :
50274  ac_cv_c_bigendian=no
50275else
50276  ac_cv_c_bigendian=yes
50277fi
50278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50279  conftest.$ac_objext conftest.beam conftest.$ac_ext
50280fi
50281
50282    fi
50283fi
50284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50285$as_echo "$ac_cv_c_bigendian" >&6; }
50286 case $ac_cv_c_bigendian in #(
50287   yes)
50288     ENDIAN="big";; #(
50289   no)
50290     ENDIAN="little" ;; #(
50291   universal)
50292     ENDIAN="universal_endianness"
50293     ;; #(
50294   *)
50295     ENDIAN="unknown" ;;
50296 esac
50297
50298
50299  if test "x$ENDIAN" = xuniversal_endianness; then
50300    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50301  fi
50302  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50303    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
50304  fi
50305
50306
50307# Configure flags for the tools
50308
50309  ###############################################################################
50310  #
50311  # How to compile shared libraries.
50312  #
50313
50314  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50315    PICFLAG="-fPIC"
50316    C_FLAG_REORDER=''
50317    CXX_FLAG_REORDER=''
50318
50319    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50320      # Linking is different on MacOSX
50321      if test "x$STATIC_BUILD" = xtrue; then
50322        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50323      else
50324        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50325        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50326      fi
50327      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50328      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50329      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50330      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50331    else
50332      # Default works for linux, might work on other platforms as well.
50333      SHARED_LIBRARY_FLAGS='-shared'
50334      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50335      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50336      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50337      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50338    fi
50339  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50340    C_FLAG_REORDER=''
50341    CXX_FLAG_REORDER=''
50342
50343    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50344      # Linking is different on MacOSX
50345      PICFLAG=''
50346      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50347      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50348      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50349      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50350      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50351
50352      if test "x$STATIC_BUILD" = xfalse; then
50353        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50354      fi
50355    else
50356      # Default works for linux, might work on other platforms as well.
50357      PICFLAG='-fPIC'
50358      SHARED_LIBRARY_FLAGS='-shared'
50359      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50360      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50361      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50362
50363      # arm specific settings
50364      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50365        # '-Wl,-z,origin' isn't used on arm.
50366        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50367      else
50368        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50369      fi
50370
50371    fi
50372  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50373    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50374      PICFLAG="-xcode=pic32"
50375    else
50376      PICFLAG="-KPIC"
50377    fi
50378    C_FLAG_REORDER='-xF'
50379    CXX_FLAG_REORDER='-xF'
50380    SHARED_LIBRARY_FLAGS="-G"
50381    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50382    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50383    SET_SHARED_LIBRARY_NAME='-h $1'
50384    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50385  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50386    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50387    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50388    # will have to patch this single instruction with a call to some out-of-order code which
50389    # does the load from the TOC. This is of course slow. But in that case we also would have
50390    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50391    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50392    # can be patched directly by the linker and does not require a jump to out-of-order code.
50393    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50394    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50395    # loads for accessing a global variable). But there are rumors that this may be seen as a
50396    # 'performance feature' because of improved code locality of the symbols used in a
50397    # compilation unit.
50398    PICFLAG="-qpic"
50399    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50400    C_FLAG_REORDER=''
50401    CXX_FLAG_REORDER=''
50402    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50403    SET_EXECUTABLE_ORIGIN=""
50404    SET_SHARED_LIBRARY_ORIGIN=''
50405    SET_SHARED_LIBRARY_NAME=''
50406    SET_SHARED_LIBRARY_MAPFILE=''
50407  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50408    PICFLAG=""
50409    C_FLAG_REORDER=''
50410    CXX_FLAG_REORDER=''
50411    SHARED_LIBRARY_FLAGS="-dll"
50412    SET_EXECUTABLE_ORIGIN=''
50413    SET_SHARED_LIBRARY_ORIGIN=''
50414    SET_SHARED_LIBRARY_NAME=''
50415    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50416  fi
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426  # The (cross) compiler is now configured, we can now test capabilities
50427  # of the target platform.
50428
50429
50430
50431  ###############################################################################
50432  #
50433  # Setup the opt flags for different compilers
50434  # and different operating systems.
50435  #
50436
50437  # FIXME: this was indirectly the old default, but just inherited.
50438  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50439  #   C_FLAG_DEPS="-MMD -MF"
50440  # fi
50441
50442  # Generate make dependency files
50443  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50444    C_FLAG_DEPS="-MMD -MF"
50445  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50446    C_FLAG_DEPS="-MMD -MF"
50447  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50448    C_FLAG_DEPS="-xMMD -xMF"
50449  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50450    C_FLAG_DEPS="-qmakedep=gcc -MF"
50451  fi
50452  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50453
50454
50455
50456  # Debug symbols
50457  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50458    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50459      # reduce from default "-g2" option to save space
50460      CFLAGS_DEBUG_SYMBOLS="-g1"
50461      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50462    else
50463      CFLAGS_DEBUG_SYMBOLS="-g"
50464      CXXFLAGS_DEBUG_SYMBOLS="-g"
50465    fi
50466  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50467    CFLAGS_DEBUG_SYMBOLS="-g"
50468    CXXFLAGS_DEBUG_SYMBOLS="-g"
50469  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50470    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50471    # -g0 enables debug symbols without disabling inlining.
50472    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50473  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50474    CFLAGS_DEBUG_SYMBOLS="-g"
50475    CXXFLAGS_DEBUG_SYMBOLS="-g"
50476  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50477    CFLAGS_DEBUG_SYMBOLS="-Zi"
50478    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50479  fi
50480
50481
50482
50483  # Debug symbols for JVM_CFLAGS
50484  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50485    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50486    if test "x$DEBUG_LEVEL" = xslowdebug; then
50487      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50488    else
50489      # -g0 does not disable inlining, which -g does.
50490      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50491    fi
50492  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50493    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50494  else
50495    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50496  fi
50497
50498
50499  # bounds, memory and behavior checking options
50500  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50501    case $DEBUG_LEVEL in
50502    release )
50503      # no adjustment
50504      ;;
50505    fastdebug )
50506      # no adjustment
50507      ;;
50508    slowdebug )
50509      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50510      # get's added conditionally on whether we produce debug symbols or not.
50511      # This is most likely not really correct.
50512
50513      # Add runtime stack smashing and undefined behavior checks.
50514      # Not all versions of gcc support -fstack-protector
50515      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558    # Execute function body
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607    # Execute function body
50608
50609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50610$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50611  supports=yes
50612
50613  saved_cflags="$CFLAGS"
50614  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50615  ac_ext=c
50616ac_cpp='$CPP $CPPFLAGS'
50617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50619ac_compiler_gnu=$ac_cv_c_compiler_gnu
50620
50621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50622/* end confdefs.h.  */
50623int i;
50624_ACEOF
50625if ac_fn_c_try_compile "$LINENO"; then :
50626
50627else
50628  supports=no
50629fi
50630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50631  ac_ext=cpp
50632ac_cpp='$CXXCPP $CPPFLAGS'
50633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50636
50637  CFLAGS="$saved_cflags"
50638
50639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50640$as_echo "$supports" >&6; }
50641  if test "x$supports" = "xyes" ; then
50642    :
50643    C_COMP_SUPPORTS="yes"
50644  else
50645    :
50646    C_COMP_SUPPORTS="no"
50647  fi
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707    # Execute function body
50708
50709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50710$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50711  supports=yes
50712
50713  saved_cxxflags="$CXXFLAGS"
50714  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50715  ac_ext=cpp
50716ac_cpp='$CXXCPP $CPPFLAGS'
50717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50720
50721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50722/* end confdefs.h.  */
50723int i;
50724_ACEOF
50725if ac_fn_cxx_try_compile "$LINENO"; then :
50726
50727else
50728  supports=no
50729fi
50730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50731  ac_ext=cpp
50732ac_cpp='$CXXCPP $CPPFLAGS'
50733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50736
50737  CXXFLAGS="$saved_cxxflags"
50738
50739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50740$as_echo "$supports" >&6; }
50741  if test "x$supports" = "xyes" ; then
50742    :
50743    CXX_COMP_SUPPORTS="yes"
50744  else
50745    :
50746    CXX_COMP_SUPPORTS="no"
50747  fi
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50762$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50763  supports=no
50764  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50765
50766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50767$as_echo "$supports" >&6; }
50768  if test "x$supports" = "xyes" ; then
50769    :
50770
50771  else
50772    :
50773    STACK_PROTECTOR_CFLAG=""
50774  fi
50775
50776
50777
50778
50779
50780
50781
50782      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50783      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50784      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50785        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50786      fi
50787      ;;
50788    esac
50789  fi
50790
50791  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50792    if test "x$DEBUG_LEVEL" != xrelease; then
50793      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50794        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50795      fi
50796    fi
50797  fi
50798
50799  # Optimization levels
50800  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50801    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50802
50803    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50804      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50805      C_O_FLAG_HIGHEST_JVM="-xO4"
50806      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50807      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50808      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50809      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50810      C_O_FLAG_DEBUG_JVM=""
50811      C_O_FLAG_NONE="-xregs=no%frameptr"
50812      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50813      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50814      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50815      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50816      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50817      CXX_O_FLAG_DEBUG_JVM=""
50818      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50819      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50820        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50821        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50822      fi
50823    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50824      C_O_FLAG_HIGHEST_JVM="-xO4"
50825      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50826      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50827      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50828      C_O_FLAG_DEBUG=""
50829      C_O_FLAG_DEBUG_JVM=""
50830      C_O_FLAG_NONE=""
50831      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50832      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50833      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50834      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50835      CXX_O_FLAG_DEBUG=""
50836      CXX_O_FLAG_DEBUG_JVM=""
50837      CXX_O_FLAG_NONE=""
50838    fi
50839  else
50840    # The remaining toolchains share opt flags between CC and CXX;
50841    # setup for C and duplicate afterwards.
50842    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50843      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50844        # On MacOSX we optimize for size, something
50845        # we should do for all platforms?
50846        C_O_FLAG_HIGHEST_JVM="-Os"
50847        C_O_FLAG_HIGHEST="-Os"
50848        C_O_FLAG_HI="-Os"
50849        C_O_FLAG_NORM="-Os"
50850        C_O_FLAG_SIZE="-Os"
50851      else
50852        C_O_FLAG_HIGHEST_JVM="-O3"
50853        C_O_FLAG_HIGHEST="-O3"
50854        C_O_FLAG_HI="-O3"
50855        C_O_FLAG_NORM="-O2"
50856        C_O_FLAG_SIZE="-Os"
50857      fi
50858      C_O_FLAG_DEBUG="-O0"
50859      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50860        C_O_FLAG_DEBUG_JVM=""
50861      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50862        C_O_FLAG_DEBUG_JVM="-O0"
50863      fi
50864      C_O_FLAG_NONE="-O0"
50865    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50866      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50867        # On MacOSX we optimize for size, something
50868        # we should do for all platforms?
50869        C_O_FLAG_HIGHEST_JVM="-Os"
50870        C_O_FLAG_HIGHEST="-Os"
50871        C_O_FLAG_HI="-Os"
50872        C_O_FLAG_NORM="-Os"
50873        C_O_FLAG_SIZE="-Os"
50874      else
50875        C_O_FLAG_HIGHEST_JVM="-O3"
50876        C_O_FLAG_HIGHEST="-O3"
50877        C_O_FLAG_HI="-O3"
50878        C_O_FLAG_NORM="-O2"
50879        C_O_FLAG_SIZE="-Os"
50880      fi
50881      C_O_FLAG_DEBUG="-O0"
50882      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50883        C_O_FLAG_DEBUG_JVM=""
50884      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50885        C_O_FLAG_DEBUG_JVM="-O0"
50886      fi
50887      C_O_FLAG_NONE="-O0"
50888    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50889      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50890      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50891      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50892      C_O_FLAG_NORM="-O2"
50893      C_O_FLAG_DEBUG="-qnoopt"
50894      # FIXME: Value below not verified.
50895      C_O_FLAG_DEBUG_JVM=""
50896      C_O_FLAG_NONE="-qnoopt"
50897    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50898      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50899      C_O_FLAG_HIGHEST="-O2"
50900      C_O_FLAG_HI="-O1"
50901      C_O_FLAG_NORM="-O1"
50902      C_O_FLAG_DEBUG="-Od"
50903      C_O_FLAG_DEBUG_JVM=""
50904      C_O_FLAG_NONE="-Od"
50905      C_O_FLAG_SIZE="-Os"
50906    fi
50907    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50908    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50909    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50910    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50911    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50912    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50913    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50914    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50915  fi
50916
50917  # Adjust optimization flags according to debug level.
50918  case $DEBUG_LEVEL in
50919    release )
50920      # no adjustment
50921      ;;
50922    fastdebug )
50923      # Not quite so much optimization
50924      C_O_FLAG_HI="$C_O_FLAG_NORM"
50925      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50926      ;;
50927    slowdebug )
50928      # Disable optimization
50929      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50930      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50931      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50932      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50933      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50934      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50935      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50936      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50937      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50938      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50939      ;;
50940  esac
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961# Check whether --with-abi-profile was given.
50962if test "${with_abi_profile+set}" = set; then :
50963  withval=$with_abi_profile;
50964fi
50965
50966
50967  if test "x$with_abi_profile" != x; then
50968    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50969        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50970      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50971    fi
50972
50973    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50975$as_echo_n "checking for ABI profle... " >&6; }
50976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50977$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50978
50979    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50980      ARM_FLOAT_TYPE=vfp-sflt
50981      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50982    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50983      ARM_FLOAT_TYPE=vfp-hflt
50984      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50985    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50986      ARM_FLOAT_TYPE=sflt
50987      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50988    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50989      ARM_FLOAT_TYPE=vfp-sflt
50990      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50991    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50992      ARM_FLOAT_TYPE=vfp-hflt
50993      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50994    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50995      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50996      ARM_FLOAT_TYPE=
50997      ARM_ARCH_TYPE_FLAGS=
50998    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50999      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51000      ARM_FLOAT_TYPE=
51001      ARM_ARCH_TYPE_FLAGS=
51002    else
51003      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51004    fi
51005
51006    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51007      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51008    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51009      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51010    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51011      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51012    fi
51013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51014$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51016$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51017
51018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51019$as_echo_n "checking for arch type flags... " >&6; }
51020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51021$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51022
51023    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51024    # autoconf target triplet.
51025     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51026    # Sanity check that it is a known ABI.
51027    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51028        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51029        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51030          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51031$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51032    fi
51033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51034$as_echo_n "checking for ABI property name... " >&6; }
51035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51036$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51037
51038
51039    # Pass these on to the open part of configure as if they were set using
51040    # --with-extra-c[xx]flags.
51041    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51042    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51043    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51044    # FIXME: This should not really be set using extra_cflags.
51045    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51046        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51047        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51048    fi
51049    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51050    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51051    # And pass the architecture flags to the linker as well
51052    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51053  fi
51054
51055  # When building with an abi profile, the name of that profile is appended on the
51056  # bundle platform, which is used in bundle names.
51057  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51058    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51059  fi
51060
51061
51062  # Optional POSIX functionality needed by the JVM
51063  #
51064  # Check if clock_gettime is available and in which library. This indicates
51065  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51066  # don't let it update LIBS.
51067  save_LIBS="$LIBS"
51068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51069$as_echo_n "checking for library containing clock_gettime... " >&6; }
51070if ${ac_cv_search_clock_gettime+:} false; then :
51071  $as_echo_n "(cached) " >&6
51072else
51073  ac_func_search_save_LIBS=$LIBS
51074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51075/* end confdefs.h.  */
51076
51077/* Override any GCC internal prototype to avoid an error.
51078   Use char because int might match the return type of a GCC
51079   builtin and then its argument prototype would still apply.  */
51080#ifdef __cplusplus
51081extern "C"
51082#endif
51083char clock_gettime ();
51084int
51085main ()
51086{
51087return clock_gettime ();
51088  ;
51089  return 0;
51090}
51091_ACEOF
51092for ac_lib in '' rt; do
51093  if test -z "$ac_lib"; then
51094    ac_res="none required"
51095  else
51096    ac_res=-l$ac_lib
51097    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51098  fi
51099  if ac_fn_cxx_try_link "$LINENO"; then :
51100  ac_cv_search_clock_gettime=$ac_res
51101fi
51102rm -f core conftest.err conftest.$ac_objext \
51103    conftest$ac_exeext
51104  if ${ac_cv_search_clock_gettime+:} false; then :
51105  break
51106fi
51107done
51108if ${ac_cv_search_clock_gettime+:} false; then :
51109
51110else
51111  ac_cv_search_clock_gettime=no
51112fi
51113rm conftest.$ac_ext
51114LIBS=$ac_func_search_save_LIBS
51115fi
51116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51117$as_echo "$ac_cv_search_clock_gettime" >&6; }
51118ac_res=$ac_cv_search_clock_gettime
51119if test "$ac_res" != no; then :
51120  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51121  HAS_CLOCK_GETTIME=true
51122fi
51123
51124  if test "x$LIBS" = "x-lrt "; then
51125    CLOCK_GETTIME_IN_LIBRT=true
51126  fi
51127  LIBS="$save_LIBS"
51128
51129
51130  # Special extras...
51131  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51132    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51133      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51134      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51135    fi
51136    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51137    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51138  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51139    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51140    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51141  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51142    CXXSTD_CXXFLAG="-std=gnu++98"
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185    # Execute function body
51186
51187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51188$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51189  supports=yes
51190
51191  saved_cxxflags="$CXXFLAGS"
51192  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51193  ac_ext=cpp
51194ac_cpp='$CXXCPP $CPPFLAGS'
51195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51198
51199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51200/* end confdefs.h.  */
51201int i;
51202_ACEOF
51203if ac_fn_cxx_try_compile "$LINENO"; then :
51204
51205else
51206  supports=no
51207fi
51208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51209  ac_ext=cpp
51210ac_cpp='$CXXCPP $CPPFLAGS'
51211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51214
51215  CXXFLAGS="$saved_cxxflags"
51216
51217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51218$as_echo "$supports" >&6; }
51219  if test "x$supports" = "xyes" ; then
51220    :
51221
51222  else
51223    :
51224    CXXSTD_CXXFLAG=""
51225  fi
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51239    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51240
51241  fi
51242  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51243    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51244    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51245  fi
51246
51247  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51248  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51249  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51250
51251  ###############################################################################
51252  #
51253  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51254  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51255  #
51256
51257  # Setup compiler/platform specific flags into
51258  #    CFLAGS_JDK    - C Compiler flags
51259  #    CXXFLAGS_JDK  - C++ Compiler flags
51260  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51261  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51262    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51263    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51264    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51265    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51266      # Force compatibility with i586 on 32 bit intel platforms.
51267      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51268      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51269    fi
51270    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51271        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51272    case $OPENJDK_TARGET_CPU_ARCH in
51273      arm )
51274        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51275        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51276        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51277        ;;
51278      ppc )
51279        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51280        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51281        ;;
51282      s390 )
51283        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51284        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51285        ;;
51286      * )
51287        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51288        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51289        ;;
51290    esac
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345    # Execute function body
51346
51347  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51348  REFERENCE_VERSION=6
51349
51350  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51351    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51352  fi
51353
51354  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51355    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51356  fi
51357
51358  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51359  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51360
51361  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51362    :
51363
51364  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51365  # runs afoul of the more aggressive versions of these optimisations.
51366  # Notably, value range propagation now assumes that the this pointer of C++
51367  # member functions is non-null.
51368  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51369        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51370        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51371$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51372  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51373  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51374
51375  else
51376    :
51377
51378  fi
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51394    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51395
51396    # Restrict the debug information created by Clang to avoid
51397    # too big object files and speed the build up a little bit
51398    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51399    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51400    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51401      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51402        # Force compatibility with i586 on 32 bit intel platforms.
51403        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51404        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51405      fi
51406      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51407      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51408          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51409      case $OPENJDK_TARGET_CPU_ARCH in
51410        ppc )
51411          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51412          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51413          ;;
51414        * )
51415          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51416          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51417          ;;
51418      esac
51419    fi
51420  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51421    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51422    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51423    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51424      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51425    fi
51426
51427    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51428    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51429  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51430    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51431    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51432    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51433  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51434    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51435        -MD -Zc:wchar_t- -W3 -wd4800 \
51436        -DWIN32_LEAN_AND_MEAN \
51437        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51438        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51439        -DWIN32 -DIAL"
51440    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51441      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51442    else
51443      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51444    fi
51445    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51446    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51447    # studio.
51448    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51449      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51450      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51451      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51452    fi
51453  fi
51454
51455  ###############################################################################
51456
51457  # Adjust flags according to debug level.
51458  case $DEBUG_LEVEL in
51459    fastdebug | slowdebug )
51460      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51461      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51462      ;;
51463    release )
51464      ;;
51465    * )
51466      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51467      ;;
51468  esac
51469
51470  # Set some common defines. These works for all compilers, but assume
51471  # -D is universally accepted.
51472
51473  # Setup endianness
51474  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51475    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51476    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51477    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51478    #   Note: -Dmacro         is the same as    #define macro 1
51479    #         -Dmacro=        is the same as    #define macro
51480    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51481      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51482    else
51483      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51484    fi
51485  else
51486    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51487    # are defined in the system?
51488    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51489      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51490    else
51491      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51492    fi
51493  fi
51494
51495  # Always enable optional macros for VM.
51496  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51497  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51498  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51499
51500  # Setup target OS define. Use OS target name but in upper case.
51501  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51502  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51503
51504  # Setup target CPU
51505  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51506      $OPENJDK_TARGET_ADD_LP64 \
51507      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51508
51509  # Setup debug/release defines
51510  if test "x$DEBUG_LEVEL" = xrelease; then
51511    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51512    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51513      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51514    fi
51515  else
51516    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51517  fi
51518
51519  # Optional POSIX functionality needed by the VM
51520
51521  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51522    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51523    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51524      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51525    fi
51526  fi
51527
51528
51529  # Set some additional per-OS defines.
51530  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51531    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51532    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51533        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51534  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51535    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51536    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51537        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51538  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51539    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51540    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51541    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51542    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51543        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51544        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51545        -fno-omit-frame-pointer"
51546  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51547    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51548    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51549    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51550        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51551        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51552  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51553    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51554  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51555    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51556    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51557  fi
51558
51559  # Set some additional per-CPU defines.
51560  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51561    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51562  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51563    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51564  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51565    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51566      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51567      # fixes `relocation truncated to fit' error for gcc 4.1.
51568      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51569      # Use ppc64 instructions, but schedule for power5
51570      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51571    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51572      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51573    fi
51574  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51575    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51576      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51577      # Little endian machine uses ELFv2 ABI.
51578      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51579      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51580      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51581    fi
51582  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51583    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51584      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51585    fi
51586  fi
51587
51588  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51589    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51590  fi
51591
51592  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51593    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51594      # Solaris does not have _LP64=1 in the old build.
51595      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51596      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51597    fi
51598  fi
51599
51600  # Set JVM_CFLAGS warning handling
51601  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51602    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51603        -Wunused-value -Woverloaded-virtual"
51604
51605    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660    # Execute function body
51661
51662  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51663  REFERENCE_VERSION=4.8
51664
51665  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51666    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51667  fi
51668
51669  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51670    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51671  fi
51672
51673  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51674  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51675
51676  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51677    :
51678
51679            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51680            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51681
51682
51683  else
51684    :
51685
51686  fi
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701    fi
51702    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51703      # Non-zero builds have stricter warnings
51704      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51705    else
51706      if test "x$TOOLCHAIN_TYPE" = xclang; then
51707        # Some versions of llvm do not like -Wundef
51708        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51709      fi
51710    fi
51711  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51712    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51713        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51714  fi
51715
51716  # Additional macosx handling
51717  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51718    # Setting these parameters makes it an error to link to macosx APIs that are
51719    # newer than the given OS version and makes the linked binaries compatible
51720    # even if built on a newer version of the OS.
51721    # The expected format is X.Y.Z
51722    MACOSX_VERSION_MIN=10.7.0
51723
51724
51725    # The macro takes the version with no dots, ex: 1070
51726    # Let the flags variables get resolved in make for easier override on make
51727    # command line.
51728    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51729    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51730  fi
51731
51732  # Setup some hard coded includes
51733  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51734      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51735      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51736      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51737      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51738      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51739      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51740
51741  # The shared libraries are compiled using the picflag.
51742  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51743      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51744  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51745      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51746
51747  # Executable flags
51748  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51749  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51750
51751
51752
51753
51754
51755
51756  # Setup LDFLAGS et al.
51757  #
51758
51759  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51760    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51761    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51762    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51763    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51764      LDFLAGS_SAFESH="-safeseh"
51765      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51766      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51767      # NOTE: Old build added -machine. Probably not needed.
51768      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51769    else
51770      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51771    fi
51772  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51773      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51774      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51775        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51776        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51777    fi
51778  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51779    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51780    # We have previously set HAS_GNU_HASH if this is the case
51781    if test -n "$HAS_GNU_HASH"; then
51782      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51783      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51784      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51785    fi
51786      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51787        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51788    fi
51789    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51790      # And since we now know that the linker is gnu, then add -z defs, to forbid
51791      # undefined symbols in object files.
51792      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51793      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51794      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51795      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51796      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51797      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51798        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51799      fi
51800      case $DEBUG_LEVEL in
51801        release )
51802          # tell linker to optimize libraries.
51803          # Should this be supplied to the OSS linker as well?
51804          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51805          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51806          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51807          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51808            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51809          fi
51810          ;;
51811        slowdebug )
51812          # Hotspot always let the linker optimize
51813          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51814          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51815            # do relocations at load
51816            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51817            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51818            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51819          fi
51820          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51821            # mark relocations read only
51822            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51823            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51824            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51825          fi
51826          ;;
51827        fastdebug )
51828          # Hotspot always let the linker optimize
51829          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51830          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51831            # mark relocations read only
51832            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51833            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51834            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51835          fi
51836          ;;
51837        * )
51838          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51839          ;;
51840        esac
51841    fi
51842  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51843    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51844    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51845    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51846    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51847    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51848    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51849      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51850    fi
51851  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51852    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51853    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51854    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51855  fi
51856
51857  # Customize LDFLAGS for executables
51858
51859  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51860
51861  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51862    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51863      LDFLAGS_STACK_SIZE=1048576
51864    else
51865      LDFLAGS_STACK_SIZE=327680
51866    fi
51867    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51868  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51869    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51870  fi
51871
51872  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51873
51874  # Customize LDFLAGS for libs
51875  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51876
51877  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51878  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51879    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51880        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51881    JDKLIB_LIBS=""
51882  else
51883    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51884        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51885
51886    if test "xTARGET" = "xTARGET"; then
51887      # On some platforms (mac) the linker warns about non existing -L dirs.
51888      # For any of the variants server, client or minimal, the dir matches the
51889      # variant name. The "main" variant should be used for linking. For the
51890      # rest, the dir is just server.
51891      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51892          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51893        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51894            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51895      else
51896        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51897            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51898      fi
51899    elif test "xTARGET" = "xBUILD"; then
51900      # When building a buildjdk, it's always only the server variant
51901      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51902          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51903    fi
51904
51905    JDKLIB_LIBS="-ljava -ljvm"
51906    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51907      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51908    fi
51909
51910  fi
51911
51912LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51913
51914  # Set JVM_LIBS (per os)
51915  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51916    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51917  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51918    # FIXME: This hard-coded path is not really proper.
51919    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51920      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51921    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51922      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51923    fi
51924    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51925        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51926  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51927    JVM_LIBS="$JVM_LIBS -lm"
51928  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51929    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51930  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51931    JVM_LIBS="$JVM_LIBS -lm"
51932  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51933    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51934        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51935        wsock32.lib winmm.lib version.lib psapi.lib"
51936    fi
51937
51938  # Set JVM_ASFLAGS
51939  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51940    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51941      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51942    fi
51943  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51944    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51945  fi
51946
51947  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963  # Special extras...
51964  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51965    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51966      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51967      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51968    fi
51969    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51970    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51971  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51972    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51973    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51974  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51975    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018    # Execute function body
52019
52020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52021$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52022  supports=yes
52023
52024  saved_cxxflags="$CXXFLAGS"
52025  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52026  ac_ext=cpp
52027ac_cpp='$CXXCPP $CPPFLAGS'
52028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52031
52032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52033/* end confdefs.h.  */
52034int i;
52035_ACEOF
52036if ac_fn_cxx_try_compile "$LINENO"; then :
52037
52038else
52039  supports=no
52040fi
52041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52042  ac_ext=cpp
52043ac_cpp='$CXXCPP $CPPFLAGS'
52044ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52045ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52046ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52047
52048  CXXFLAGS="$saved_cxxflags"
52049
52050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52051$as_echo "$supports" >&6; }
52052  if test "x$supports" = "xyes" ; then
52053    :
52054
52055  else
52056    :
52057    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52058  fi
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52072    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52073
52074  fi
52075  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52076    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52077    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52078  fi
52079
52080  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52081  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52082  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52083
52084  ###############################################################################
52085  #
52086  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52087  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52088  #
52089
52090  # Setup compiler/platform specific flags into
52091  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52092  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52093  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52094  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52095    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52096    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52097    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52098    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52099      # Force compatibility with i586 on 32 bit intel platforms.
52100      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52101      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52102    fi
52103    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52104        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52105    case $OPENJDK_BUILD_CPU_ARCH in
52106      arm )
52107        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52108        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52109        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52110        ;;
52111      ppc )
52112        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52113        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52114        ;;
52115      s390 )
52116        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52117        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52118        ;;
52119      * )
52120        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52121        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52122        ;;
52123    esac
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
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    # Execute function body
52179
52180  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52181  REFERENCE_VERSION=6
52182
52183  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52184    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52185  fi
52186
52187  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52188    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52189  fi
52190
52191  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52192  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52193
52194  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52195    :
52196
52197  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52198  # runs afoul of the more aggressive versions of these optimisations.
52199  # Notably, value range propagation now assumes that the this pointer of C++
52200  # member functions is non-null.
52201  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52202        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52203        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52204$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52205  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52206  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52207
52208  else
52209    :
52210
52211  fi
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52227    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52228
52229    # Restrict the debug information created by Clang to avoid
52230    # too big object files and speed the build up a little bit
52231    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52232    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52233    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52234      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52235        # Force compatibility with i586 on 32 bit intel platforms.
52236        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52237        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52238      fi
52239      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52240      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52241          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52242      case $OPENJDK_BUILD_CPU_ARCH in
52243        ppc )
52244          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52245          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52246          ;;
52247        * )
52248          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52249          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52250          ;;
52251      esac
52252    fi
52253  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52254    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52255    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52256    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52257      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52258    fi
52259
52260    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52261    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52262  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52263    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52264    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52265    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52266  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52267    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52268        -MD -Zc:wchar_t- -W3 -wd4800 \
52269        -DWIN32_LEAN_AND_MEAN \
52270        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52271        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52272        -DWIN32 -DIAL"
52273    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52274      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52275    else
52276      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52277    fi
52278    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52279    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52280    # studio.
52281    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52282      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52283      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52284      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52285    fi
52286  fi
52287
52288  ###############################################################################
52289
52290  # Adjust flags according to debug level.
52291  case $DEBUG_LEVEL in
52292    fastdebug | slowdebug )
52293      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52294      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52295      ;;
52296    release )
52297      ;;
52298    * )
52299      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52300      ;;
52301  esac
52302
52303  # Set some common defines. These works for all compilers, but assume
52304  # -D is universally accepted.
52305
52306  # Setup endianness
52307  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52308    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52309    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52310    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52311    #   Note: -Dmacro         is the same as    #define macro 1
52312    #         -Dmacro=        is the same as    #define macro
52313    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52314      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52315    else
52316      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52317    fi
52318  else
52319    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52320    # are defined in the system?
52321    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52322      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52323    else
52324      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52325    fi
52326  fi
52327
52328  # Always enable optional macros for VM.
52329  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52330  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52331  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52332
52333  # Setup target OS define. Use OS target name but in upper case.
52334  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52335  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52336
52337  # Setup target CPU
52338  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52339      $OPENJDK_BUILD_ADD_LP64 \
52340      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52341
52342  # Setup debug/release defines
52343  if test "x$DEBUG_LEVEL" = xrelease; then
52344    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52345    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52346      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52347    fi
52348  else
52349    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52350  fi
52351
52352  # Optional POSIX functionality needed by the VM
52353
52354  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52355    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52356    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52357      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52358    fi
52359  fi
52360
52361
52362  # Set some additional per-OS defines.
52363  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52364    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52365    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52366        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52367  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52368    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52369    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52370        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52371  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52372    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52373    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52374    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52375    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52376        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52377        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
52378        -fno-omit-frame-pointer"
52379  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52380    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52381    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52382    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52383        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52384        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52385  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52386    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52387  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52388    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52389    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52390  fi
52391
52392  # Set some additional per-CPU defines.
52393  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52394    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52395  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52396    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52397  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52398    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52399      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52400      # fixes `relocation truncated to fit' error for gcc 4.1.
52401      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52402      # Use ppc64 instructions, but schedule for power5
52403      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52404    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52405      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52406    fi
52407  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52408    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52409      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52410      # Little endian machine uses ELFv2 ABI.
52411      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52412      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52413      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52414    fi
52415  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52416    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52417      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52418    fi
52419  fi
52420
52421  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52422    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52423  fi
52424
52425  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52426    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52427      # Solaris does not have _LP64=1 in the old build.
52428      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52429      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52430    fi
52431  fi
52432
52433  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52434  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52435    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52436        -Wunused-value -Woverloaded-virtual"
52437
52438    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493    # Execute function body
52494
52495  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52496  REFERENCE_VERSION=4.8
52497
52498  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52499    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52500  fi
52501
52502  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52503    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52504  fi
52505
52506  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52507  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52508
52509  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52510    :
52511
52512            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52513            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52514
52515
52516  else
52517    :
52518
52519  fi
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534    fi
52535    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52536      # Non-zero builds have stricter warnings
52537      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52538    else
52539      if test "x$TOOLCHAIN_TYPE" = xclang; then
52540        # Some versions of llvm do not like -Wundef
52541        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52542      fi
52543    fi
52544  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52545    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52546        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52547  fi
52548
52549  # Additional macosx handling
52550  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52551    # Setting these parameters makes it an error to link to macosx APIs that are
52552    # newer than the given OS version and makes the linked binaries compatible
52553    # even if built on a newer version of the OS.
52554    # The expected format is X.Y.Z
52555    MACOSX_VERSION_MIN=10.7.0
52556
52557
52558    # The macro takes the version with no dots, ex: 1070
52559    # Let the flags variables get resolved in make for easier override on make
52560    # command line.
52561    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)"
52562    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52563  fi
52564
52565  # Setup some hard coded includes
52566  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52567      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52568      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52569      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52570      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52571      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52572      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52573
52574  # The shared libraries are compiled using the picflag.
52575  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52576      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52577  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52578      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52579
52580  # Executable flags
52581  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52582  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52583
52584
52585
52586
52587
52588
52589  # Setup LDFLAGS et al.
52590  #
52591
52592  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52593    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52594    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52595    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52596    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52597      LDFLAGS_SAFESH="-safeseh"
52598      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52599      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52600      # NOTE: Old build added -machine. Probably not needed.
52601      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52602    else
52603      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52604    fi
52605  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52606      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52607      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52608        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52609        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52610    fi
52611  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52612    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52613    # We have previously set HAS_GNU_HASH if this is the case
52614    if test -n "$HAS_GNU_HASH"; then
52615      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52616      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52617      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52618    fi
52619      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52620        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52621    fi
52622    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52623      # And since we now know that the linker is gnu, then add -z defs, to forbid
52624      # undefined symbols in object files.
52625      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52626      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52627      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52628      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52629      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52630      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52631        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52632      fi
52633      case $DEBUG_LEVEL in
52634        release )
52635          # tell linker to optimize libraries.
52636          # Should this be supplied to the OSS linker as well?
52637          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52638          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52639          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52640          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52641            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52642          fi
52643          ;;
52644        slowdebug )
52645          # Hotspot always let the linker optimize
52646          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52647          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52648            # do relocations at load
52649            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52650            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52651            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52652          fi
52653          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52654            # mark relocations read only
52655            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52656            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52657            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52658          fi
52659          ;;
52660        fastdebug )
52661          # Hotspot always let the linker optimize
52662          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52663          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52664            # mark relocations read only
52665            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52666            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52667            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52668          fi
52669          ;;
52670        * )
52671          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52672          ;;
52673        esac
52674    fi
52675  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52676    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52677    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52678    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52679    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52680    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52681    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52682      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52683    fi
52684  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52685    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52686    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52687    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52688  fi
52689
52690  # Customize LDFLAGS for executables
52691
52692  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52693
52694  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52695    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52696      LDFLAGS_STACK_SIZE=1048576
52697    else
52698      LDFLAGS_STACK_SIZE=327680
52699    fi
52700    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52701  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52702    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52703  fi
52704
52705  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52706
52707  # Customize LDFLAGS for libs
52708  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52709
52710  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52711  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52712    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52713        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52714    OPENJDK_BUILD_JDKLIB_LIBS=""
52715  else
52716    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52717        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52718
52719    if test "xBUILD" = "xTARGET"; then
52720      # On some platforms (mac) the linker warns about non existing -L dirs.
52721      # For any of the variants server, client or minimal, the dir matches the
52722      # variant name. The "main" variant should be used for linking. For the
52723      # rest, the dir is just server.
52724      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52725          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52726        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52727            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52728      else
52729        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52730            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52731      fi
52732    elif test "xBUILD" = "xBUILD"; then
52733      # When building a buildjdk, it's always only the server variant
52734      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52735          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52736    fi
52737
52738    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52739    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52740      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52741    fi
52742
52743  fi
52744
52745OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52746
52747  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52748  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52749    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52750  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52751    # FIXME: This hard-coded path is not really proper.
52752    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52753      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52754    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52755      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52756    fi
52757    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52758        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52759  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52760    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52761  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52762    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52763  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52764    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52765  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52766    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52767        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52768        wsock32.lib winmm.lib version.lib psapi.lib"
52769    fi
52770
52771  # Set OPENJDK_BUILD_JVM_ASFLAGS
52772  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52773    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52774      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52775    fi
52776  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52777    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52778  fi
52779
52780  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796  # Tests are only ever compiled for TARGET
52797  # Flags for compiling test libraries
52798  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52799  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52800
52801  # Flags for compiling test executables
52802  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52803  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52804
52805
52806
52807
52808
52809
52810  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52811  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52812
52813
52814
52815
52816
52817
52818  # Check that the compiler supports -mX (or -qX on AIX) flags
52819  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867    # Execute function body
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
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    # Execute function body
52917
52918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52919$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52920  supports=yes
52921
52922  saved_cflags="$CFLAGS"
52923  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52924  ac_ext=c
52925ac_cpp='$CPP $CPPFLAGS'
52926ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52927ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52928ac_compiler_gnu=$ac_cv_c_compiler_gnu
52929
52930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52931/* end confdefs.h.  */
52932int i;
52933_ACEOF
52934if ac_fn_c_try_compile "$LINENO"; then :
52935
52936else
52937  supports=no
52938fi
52939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52940  ac_ext=cpp
52941ac_cpp='$CXXCPP $CPPFLAGS'
52942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52945
52946  CFLAGS="$saved_cflags"
52947
52948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52949$as_echo "$supports" >&6; }
52950  if test "x$supports" = "xyes" ; then
52951    :
52952    C_COMP_SUPPORTS="yes"
52953  else
52954    :
52955    C_COMP_SUPPORTS="no"
52956  fi
52957
52958
52959
52960
52961
52962
52963
52964
52965
52966
52967
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    # Execute function body
53017
53018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53019$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53020  supports=yes
53021
53022  saved_cxxflags="$CXXFLAGS"
53023  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53024  ac_ext=cpp
53025ac_cpp='$CXXCPP $CPPFLAGS'
53026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53029
53030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53031/* end confdefs.h.  */
53032int i;
53033_ACEOF
53034if ac_fn_cxx_try_compile "$LINENO"; then :
53035
53036else
53037  supports=no
53038fi
53039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53040  ac_ext=cpp
53041ac_cpp='$CXXCPP $CPPFLAGS'
53042ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53043ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53044ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53045
53046  CXXFLAGS="$saved_cxxflags"
53047
53048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53049$as_echo "$supports" >&6; }
53050  if test "x$supports" = "xyes" ; then
53051    :
53052    CXX_COMP_SUPPORTS="yes"
53053  else
53054    :
53055    CXX_COMP_SUPPORTS="no"
53056  fi
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53071$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53072  supports=no
53073  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53074
53075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53076$as_echo "$supports" >&6; }
53077  if test "x$supports" = "xyes" ; then
53078    :
53079    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53080  else
53081    :
53082    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53083  fi
53084
53085
53086
53087
53088
53089
53090
53091
53092  # Check whether --enable-warnings-as-errors was given.
53093if test "${enable_warnings_as_errors+set}" = set; then :
53094  enableval=$enable_warnings_as_errors;
53095fi
53096
53097
53098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53099$as_echo_n "checking if native warnings are errors... " >&6; }
53100  if test "x$enable_warnings_as_errors" = "xyes"; then
53101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53102$as_echo "yes (explicitly set)" >&6; }
53103    WARNINGS_AS_ERRORS=true
53104  elif test "x$enable_warnings_as_errors" = "xno"; then
53105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53106$as_echo "no" >&6; }
53107    WARNINGS_AS_ERRORS=false
53108  elif test "x$enable_warnings_as_errors" = "x"; then
53109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53110$as_echo "yes (default)" >&6; }
53111    WARNINGS_AS_ERRORS=true
53112  else
53113    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53114  fi
53115
53116
53117
53118  case "${TOOLCHAIN_TYPE}" in
53119    microsoft)
53120      DISABLE_WARNING_PREFIX="-wd"
53121      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53122      ;;
53123    solstudio)
53124      DISABLE_WARNING_PREFIX="-erroff="
53125      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53126      ;;
53127    gcc)
53128      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176    # Execute function body
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
53214
53215
53216
53217
53218
53219
53220
53221
53222
53223
53224
53225    # Execute function body
53226
53227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53228$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53229  supports=yes
53230
53231  saved_cflags="$CFLAGS"
53232  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53233  ac_ext=c
53234ac_cpp='$CPP $CPPFLAGS'
53235ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53236ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53237ac_compiler_gnu=$ac_cv_c_compiler_gnu
53238
53239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53240/* end confdefs.h.  */
53241int i;
53242_ACEOF
53243if ac_fn_c_try_compile "$LINENO"; then :
53244
53245else
53246  supports=no
53247fi
53248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53249  ac_ext=cpp
53250ac_cpp='$CXXCPP $CPPFLAGS'
53251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53254
53255  CFLAGS="$saved_cflags"
53256
53257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53258$as_echo "$supports" >&6; }
53259  if test "x$supports" = "xyes" ; then
53260    :
53261    C_COMP_SUPPORTS="yes"
53262  else
53263    :
53264    C_COMP_SUPPORTS="no"
53265  fi
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
53314
53315
53316
53317
53318
53319
53320
53321
53322
53323
53324
53325    # Execute function body
53326
53327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53328$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53329  supports=yes
53330
53331  saved_cxxflags="$CXXFLAGS"
53332  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53333  ac_ext=cpp
53334ac_cpp='$CXXCPP $CPPFLAGS'
53335ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53336ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53337ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53338
53339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53340/* end confdefs.h.  */
53341int i;
53342_ACEOF
53343if ac_fn_cxx_try_compile "$LINENO"; then :
53344
53345else
53346  supports=no
53347fi
53348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53349  ac_ext=cpp
53350ac_cpp='$CXXCPP $CPPFLAGS'
53351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53354
53355  CXXFLAGS="$saved_cxxflags"
53356
53357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53358$as_echo "$supports" >&6; }
53359  if test "x$supports" = "xyes" ; then
53360    :
53361    CXX_COMP_SUPPORTS="yes"
53362  else
53363    :
53364    CXX_COMP_SUPPORTS="no"
53365  fi
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53380$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53381  supports=no
53382  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53383
53384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53385$as_echo "$supports" >&6; }
53386  if test "x$supports" = "xyes" ; then
53387    :
53388    GCC_CAN_DISABLE_WARNINGS=true
53389  else
53390    :
53391    GCC_CAN_DISABLE_WARNINGS=false
53392
53393  fi
53394
53395
53396
53397
53398
53399
53400      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53401        DISABLE_WARNING_PREFIX="-Wno-"
53402      else
53403        DISABLE_WARNING_PREFIX=
53404      fi
53405      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53406      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53407      # CFLAGS since any target specific flags will likely not work with the
53408      # build compiler
53409      CC_OLD="$CC"
53410      CXX_OLD="$CXX"
53411      CC="$BUILD_CC"
53412      CXX="$BUILD_CXX"
53413      CFLAGS_OLD="$CFLAGS"
53414      CFLAGS=""
53415
53416
53417
53418
53419
53420
53421
53422
53423
53424
53425
53426
53427
53428
53429
53430
53431
53432
53433
53434
53435
53436
53437
53438
53439
53440
53441
53442
53443
53444
53445
53446
53447
53448
53449
53450
53451
53452
53453
53454
53455
53456
53457
53458
53459
53460
53461
53462    # Execute function body
53463
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510
53511    # Execute function body
53512
53513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53514$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53515  supports=yes
53516
53517  saved_cflags="$CFLAGS"
53518  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53519  ac_ext=c
53520ac_cpp='$CPP $CPPFLAGS'
53521ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53522ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53523ac_compiler_gnu=$ac_cv_c_compiler_gnu
53524
53525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53526/* end confdefs.h.  */
53527int i;
53528_ACEOF
53529if ac_fn_c_try_compile "$LINENO"; then :
53530
53531else
53532  supports=no
53533fi
53534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53535  ac_ext=cpp
53536ac_cpp='$CXXCPP $CPPFLAGS'
53537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53540
53541  CFLAGS="$saved_cflags"
53542
53543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53544$as_echo "$supports" >&6; }
53545  if test "x$supports" = "xyes" ; then
53546    :
53547    C_COMP_SUPPORTS="yes"
53548  else
53549    :
53550    C_COMP_SUPPORTS="no"
53551  fi
53552
53553
53554
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564
53565
53566
53567
53568
53569
53570
53571
53572
53573
53574
53575
53576
53577
53578
53579
53580
53581
53582
53583
53584
53585
53586
53587
53588
53589
53590
53591
53592
53593
53594
53595
53596
53597
53598
53599
53600
53601
53602
53603
53604
53605
53606
53607
53608
53609
53610
53611    # Execute function body
53612
53613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53614$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53615  supports=yes
53616
53617  saved_cxxflags="$CXXFLAGS"
53618  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53619  ac_ext=cpp
53620ac_cpp='$CXXCPP $CPPFLAGS'
53621ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53622ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53623ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53624
53625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53626/* end confdefs.h.  */
53627int i;
53628_ACEOF
53629if ac_fn_cxx_try_compile "$LINENO"; then :
53630
53631else
53632  supports=no
53633fi
53634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53635  ac_ext=cpp
53636ac_cpp='$CXXCPP $CPPFLAGS'
53637ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53638ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53639ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53640
53641  CXXFLAGS="$saved_cxxflags"
53642
53643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53644$as_echo "$supports" >&6; }
53645  if test "x$supports" = "xyes" ; then
53646    :
53647    CXX_COMP_SUPPORTS="yes"
53648  else
53649    :
53650    CXX_COMP_SUPPORTS="no"
53651  fi
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53666$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53667  supports=no
53668  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53669
53670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53671$as_echo "$supports" >&6; }
53672  if test "x$supports" = "xyes" ; then
53673    :
53674    BUILD_CC_CAN_DISABLE_WARNINGS=true
53675  else
53676    :
53677    BUILD_CC_CAN_DISABLE_WARNINGS=false
53678
53679  fi
53680
53681
53682
53683
53684
53685
53686      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53687        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53688      else
53689        BUILD_CC_DISABLE_WARNING_PREFIX=
53690      fi
53691      CC="$CC_OLD"
53692      CXX="$CXX_OLD"
53693      CFLAGS="$CFLAGS_OLD"
53694      ;;
53695    clang)
53696      DISABLE_WARNING_PREFIX="-Wno-"
53697      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53698      ;;
53699    xlc)
53700      DISABLE_WARNING_PREFIX="-qsuppress="
53701      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53702      ;;
53703  esac
53704
53705
53706
53707
53708
53709# Setup debug symbols (need objcopy from the toolchain for that)
53710
53711  #
53712  # NATIVE_DEBUG_SYMBOLS
53713  # This must be done after the toolchain is setup, since we're looking at objcopy.
53714  #
53715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53716$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53717
53718# Check whether --with-native-debug-symbols was given.
53719if test "${with_native_debug_symbols+set}" = set; then :
53720  withval=$with_native_debug_symbols;
53721        if test "x$OPENJDK_TARGET_OS" = xaix; then
53722          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53723            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53724          fi
53725        fi
53726
53727else
53728
53729        if test "x$OPENJDK_TARGET_OS" = xaix; then
53730          # AIX doesn't support 'zipped' so use 'internal' as default
53731          with_native_debug_symbols="internal"
53732        else
53733          if test "x$STATIC_BUILD" = xtrue; then
53734            with_native_debug_symbols="none"
53735          else
53736            with_native_debug_symbols="zipped"
53737          fi
53738        fi
53739
53740fi
53741
53742  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53744$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53745
53746  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53747
53748    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53749      if test "x$OBJCOPY" = x; then
53750        # enabling of enable-debug-symbols and can't find objcopy
53751        # this is an error
53752        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53753      fi
53754    fi
53755
53756    COMPILE_WITH_DEBUG_SYMBOLS=true
53757    COPY_DEBUG_SYMBOLS=true
53758    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53759  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53760    COMPILE_WITH_DEBUG_SYMBOLS=false
53761    COPY_DEBUG_SYMBOLS=false
53762    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53763  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53764    COMPILE_WITH_DEBUG_SYMBOLS=true
53765    COPY_DEBUG_SYMBOLS=false
53766    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53767  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53768
53769    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53770      if test "x$OBJCOPY" = x; then
53771        # enabling of enable-debug-symbols and can't find objcopy
53772        # this is an error
53773        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53774      fi
53775    fi
53776
53777    COMPILE_WITH_DEBUG_SYMBOLS=true
53778    COPY_DEBUG_SYMBOLS=true
53779    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53780  else
53781    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53782  fi
53783
53784  # --enable-debug-symbols is deprecated.
53785  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53786
53787  # Check whether --enable-debug-symbols was given.
53788if test "${enable_debug_symbols+set}" = set; then :
53789  enableval=$enable_debug_symbols;
53790fi
53791
53792  if test "x$enable_debug_symbols" != x; then
53793    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53794$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53795
53796    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53797      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53798$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53799    fi
53800
53801  fi
53802
53803
53804  # --enable-zip-debug-info is deprecated.
53805  # Please use --with-native-debug-symbols=zipped .
53806
53807  # Check whether --enable-zip-debug-info was given.
53808if test "${enable_zip_debug_info+set}" = set; then :
53809  enableval=$enable_zip_debug_info;
53810fi
53811
53812  if test "x$enable_zip_debug_info" != x; then
53813    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53814$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53815
53816    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53817      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53818$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53819    fi
53820
53821  fi
53822
53823
53824
53825
53826
53827
53828
53829  # Check whether --enable-native-coverage was given.
53830if test "${enable_native_coverage+set}" = set; then :
53831  enableval=$enable_native_coverage;
53832fi
53833
53834  GCOV_ENABLED="false"
53835  if test "x$enable_native_coverage" = "xyes"; then
53836    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53837      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53838$as_echo_n "checking if native coverage is enabled... " >&6; }
53839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53840$as_echo "yes" >&6; }
53841      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53842      GCOV_LDFLAGS="-fprofile-arcs"
53843      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53844      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53845      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53846      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53847      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53848      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53849      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53850      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53851      GCOV_ENABLED="true"
53852    else
53853      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53854    fi
53855  elif test "x$enable_native_coverage" = "xno"; then
53856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53857$as_echo_n "checking if native coverage is enabled... " >&6; }
53858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53859$as_echo "no" >&6; }
53860  elif test "x$enable_native_coverage" != "x"; then
53861    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53862  fi
53863
53864
53865
53866
53867# Need toolchain to setup dtrace
53868
53869  # Test for dtrace dependencies
53870  # Check whether --enable-dtrace was given.
53871if test "${enable_dtrace+set}" = set; then :
53872  enableval=$enable_dtrace;
53873fi
53874
53875
53876  DTRACE_DEP_MISSING=false
53877
53878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53879$as_echo_n "checking for dtrace tool... " >&6; }
53880  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53882$as_echo "$DTRACE" >&6; }
53883  else
53884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53885$as_echo "not found, cannot build dtrace" >&6; }
53886    DTRACE_DEP_MISSING=true
53887  fi
53888
53889  for ac_header in sys/sdt.h
53890do :
53891  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53892if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53893  cat >>confdefs.h <<_ACEOF
53894#define HAVE_SYS_SDT_H 1
53895_ACEOF
53896 DTRACE_HEADERS_OK=yes
53897else
53898  DTRACE_HEADERS_OK=no
53899fi
53900
53901done
53902
53903  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53904    DTRACE_DEP_MISSING=true
53905  fi
53906
53907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53908$as_echo_n "checking if dtrace should be built... " >&6; }
53909  if test "x$enable_dtrace" = "xyes"; then
53910    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53912$as_echo "no, missing dependencies" >&6; }
53913
53914  # Print a helpful message on how to acquire the necessary build dependency.
53915  # dtrace is the help tag: freetype, cups, alsa etc
53916  MISSING_DEPENDENCY=dtrace
53917
53918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53919    cygwin_help $MISSING_DEPENDENCY
53920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53921    msys_help $MISSING_DEPENDENCY
53922  else
53923    PKGHANDLER_COMMAND=
53924
53925    case $PKGHANDLER in
53926      apt-get)
53927        apt_help     $MISSING_DEPENDENCY ;;
53928      yum)
53929        yum_help     $MISSING_DEPENDENCY ;;
53930      brew)
53931        brew_help    $MISSING_DEPENDENCY ;;
53932      port)
53933        port_help    $MISSING_DEPENDENCY ;;
53934      pkgutil)
53935        pkgutil_help $MISSING_DEPENDENCY ;;
53936      pkgadd)
53937        pkgadd_help  $MISSING_DEPENDENCY ;;
53938    esac
53939
53940    if test "x$PKGHANDLER_COMMAND" != x; then
53941      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53942    fi
53943  fi
53944
53945      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53946    else
53947      INCLUDE_DTRACE=true
53948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53949$as_echo "yes, forced" >&6; }
53950    fi
53951  elif test "x$enable_dtrace" = "xno"; then
53952    INCLUDE_DTRACE=false
53953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53954$as_echo "no, forced" >&6; }
53955  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53956    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53957      INCLUDE_DTRACE=false
53958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53959$as_echo "no, missing dependencies" >&6; }
53960    else
53961      INCLUDE_DTRACE=true
53962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53963$as_echo "yes, dependencies present" >&6; }
53964    fi
53965  else
53966    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53967  fi
53968
53969
53970  # Check whether --enable-aot was given.
53971if test "${enable_aot+set}" = set; then :
53972  enableval=$enable_aot;
53973fi
53974
53975
53976  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53977    ENABLE_AOT="true"
53978  elif test "x$enable_aot" = "xyes"; then
53979    ENABLE_AOT="true"
53980  elif test "x$enable_aot" = "xno"; then
53981    ENABLE_AOT="false"
53982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53983$as_echo_n "checking if aot should be enabled... " >&6; }
53984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53985$as_echo "no, forced" >&6; }
53986  else
53987    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53988  fi
53989
53990  if test "x$ENABLE_AOT" = "xtrue"; then
53991    # Only enable AOT on X64 platforms.
53992    if test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
53993      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53994        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53995          ENABLE_AOT="true"
53996        else
53997          ENABLE_AOT="false"
53998          if test "x$enable_aot" = "xyes"; then
53999            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54000          fi
54001        fi
54002      else
54003        ENABLE_AOT="false"
54004        if test "x$enable_aot" = "xyes"; then
54005          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54006        fi
54007      fi
54008    else
54009      ENABLE_AOT="false"
54010      if test "x$enable_aot" = "xyes"; then
54011        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54012      fi
54013    fi
54014  fi
54015
54016
54017
54018
54019  # Check whether --enable-hotspot-gtest was given.
54020if test "${enable_hotspot_gtest+set}" = set; then :
54021  enableval=$enable_hotspot_gtest;
54022fi
54023
54024
54025  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54026    GTEST_DIR_EXISTS="true"
54027  else
54028    GTEST_DIR_EXISTS="false"
54029  fi
54030
54031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54032$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54033  if test "x$enable_hotspot_gtest" = "xyes"; then
54034    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54036$as_echo "yes, forced" >&6; }
54037      BUILD_GTEST="true"
54038    else
54039      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54040    fi
54041  elif test "x$enable_hotspot_gtest" = "xno"; then
54042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54043$as_echo "no, forced" >&6; }
54044    BUILD_GTEST="false"
54045  elif test "x$enable_hotspot_gtest" = "x"; then
54046    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54048$as_echo "yes" >&6; }
54049      BUILD_GTEST="true"
54050    else
54051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54052$as_echo "no" >&6; }
54053      BUILD_GTEST="false"
54054    fi
54055  else
54056    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54057  fi
54058
54059
54060
54061
54062###############################################################################
54063#
54064# Check dependencies for external and internal libraries.
54065#
54066###############################################################################
54067
54068# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54069
54070  # When using cygwin or msys, we need a wrapper binary that renames
54071  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54072  # @files and rewrites these too! This wrapper binary is
54073  # called fixpath.
54074  FIXPATH=
54075  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54077$as_echo_n "checking if fixpath can be created... " >&6; }
54078    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54079    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54080    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54081    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54082      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54083      FIXPATH="$FIXPATH_BIN -c"
54084    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54085      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54086      # @ was chosen as separator to minimize risk of other tools messing around with it
54087      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54088          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54089      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54090      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54091    fi
54092    FIXPATH_SRC_W="$FIXPATH_SRC"
54093    FIXPATH_BIN_W="$FIXPATH_BIN"
54094
54095  unix_path="$FIXPATH_SRC_W"
54096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54097    windows_path=`$CYGPATH -m "$unix_path"`
54098    FIXPATH_SRC_W="$windows_path"
54099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54100    windows_path=`cmd //c echo $unix_path`
54101    FIXPATH_SRC_W="$windows_path"
54102  fi
54103
54104
54105  unix_path="$FIXPATH_BIN_W"
54106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54107    windows_path=`$CYGPATH -m "$unix_path"`
54108    FIXPATH_BIN_W="$windows_path"
54109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54110    windows_path=`cmd //c echo $unix_path`
54111    FIXPATH_BIN_W="$windows_path"
54112  fi
54113
54114    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54115    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54116    cd $FIXPATH_DIR
54117    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54118    cd $CURDIR
54119
54120    if test ! -x $FIXPATH_BIN; then
54121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54122$as_echo "no" >&6; }
54123      cat $FIXPATH_DIR/fixpath1.log
54124      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54125    fi
54126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54127$as_echo "yes" >&6; }
54128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54129$as_echo_n "checking if fixpath.exe works... " >&6; }
54130    cd $FIXPATH_DIR
54131    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54132        > $FIXPATH_DIR/fixpath2.log 2>&1
54133    cd $CURDIR
54134    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54136$as_echo "no" >&6; }
54137      cat $FIXPATH_DIR/fixpath2.log
54138      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54139    fi
54140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54141$as_echo "yes" >&6; }
54142
54143    FIXPATH_DETACH_FLAG="--detach"
54144  fi
54145
54146
54147
54148
54149
54150
54151  # Check if X11 is needed
54152  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54153    # No X11 support on windows or macosx
54154    NEEDS_LIB_X11=false
54155  else
54156    # All other instances need X11, even if building headless only, libawt still
54157    # needs X11 headers.
54158    NEEDS_LIB_X11=true
54159  fi
54160
54161  # Check if cups is needed
54162  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54163    # Windows have a separate print system
54164    NEEDS_LIB_CUPS=false
54165  else
54166    NEEDS_LIB_CUPS=true
54167  fi
54168
54169  # A custom hook may have set this already
54170  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54171    NEEDS_LIB_FREETYPE=true
54172  fi
54173
54174  # Check if alsa is needed
54175  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54176    NEEDS_LIB_ALSA=true
54177  else
54178    NEEDS_LIB_ALSA=false
54179  fi
54180
54181  # Check if ffi is needed
54182  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54183    NEEDS_LIB_FFI=true
54184  else
54185    NEEDS_LIB_FFI=false
54186  fi
54187
54188
54189  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54190  # dynamic build is configured on command line.
54191
54192# Check whether --with-stdc++lib was given.
54193if test "${with_stdc__lib+set}" = set; then :
54194  withval=$with_stdc__lib;
54195        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54196                && test "x$with_stdc__lib" != xdefault; then
54197          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54198        fi
54199
54200else
54201  with_stdc__lib=default
54202
54203fi
54204
54205
54206  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54207    # Test if stdc++ can be linked statically.
54208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54209$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54210    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54211    ac_ext=cpp
54212ac_cpp='$CXXCPP $CPPFLAGS'
54213ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54214ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54215ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54216
54217    OLD_LIBS="$LIBS"
54218    LIBS="$STATIC_STDCXX_FLAGS"
54219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54220/* end confdefs.h.  */
54221
54222int
54223main ()
54224{
54225return 0;
54226  ;
54227  return 0;
54228}
54229_ACEOF
54230if ac_fn_cxx_try_link "$LINENO"; then :
54231  has_static_libstdcxx=yes
54232else
54233  has_static_libstdcxx=no
54234fi
54235rm -f core conftest.err conftest.$ac_objext \
54236    conftest$ac_exeext conftest.$ac_ext
54237    LIBS="$OLD_LIBS"
54238    ac_ext=cpp
54239ac_cpp='$CXXCPP $CPPFLAGS'
54240ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54241ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54242ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54243
54244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54245$as_echo "$has_static_libstdcxx" >&6; }
54246
54247    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54248      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54249    fi
54250
54251    # If dynamic was requested, it's available since it would fail above otherwise.
54252    # If dynamic wasn't requested, go with static unless it isn't available.
54253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54254$as_echo_n "checking how to link with libstdc++... " >&6; }
54255    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54256        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54258$as_echo "dynamic" >&6; }
54259    else
54260      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54261      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54262      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54263      # just use the same setting as for the TARGET toolchain.
54264      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54266$as_echo "static" >&6; }
54267    fi
54268  fi
54269
54270  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54271  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54272    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54273  fi
54274
54275
54276
54277  # Setup Windows runtime dlls
54278  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54279
54280
54281# Check whether --with-msvcr-dll was given.
54282if test "${with_msvcr_dll+set}" = set; then :
54283  withval=$with_msvcr_dll;
54284fi
54285
54286
54287  if test "x$with_msvcr_dll" != x; then
54288    # If given explicitly by user, do not probe. If not present, fail directly.
54289
54290  DLL_NAME="$MSVCR_NAME"
54291  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54292  METHOD="--with-msvcr-dll"
54293  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54294    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54295$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54296
54297    # Need to check if the found msvcr is correct architecture
54298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54299$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54300    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54302      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54303      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54304      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54305        CORRECT_MSVCR_ARCH="PE32 executable"
54306      else
54307        CORRECT_MSVCR_ARCH="PE32+ executable"
54308      fi
54309    else
54310      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54311        CORRECT_MSVCR_ARCH=386
54312      else
54313        CORRECT_MSVCR_ARCH=x86-64
54314      fi
54315    fi
54316    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54318$as_echo "ok" >&6; }
54319      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54320
54321  # Only process if variable expands to non-empty
54322
54323  if test "x$MSVC_DLL" != x; then
54324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54325
54326  # Input might be given as Windows format, start by converting to
54327  # unix format.
54328  path="$MSVC_DLL"
54329  new_path=`$CYGPATH -u "$path"`
54330
54331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54334  # "foo.exe" is OK but "foo" is an error.
54335  #
54336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54337  # It is also a way to make sure we got the proper file name for the real test later on.
54338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54339  if test "x$test_shortpath" = x; then
54340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54341$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54342    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54343  fi
54344
54345  # Call helper function which possibly converts this using DOS-style short mode.
54346  # If so, the updated path is stored in $new_path.
54347
54348  input_path="$new_path"
54349  # Check if we need to convert this using DOS-style short mode. If the path
54350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54351  # take no chances and rewrite it.
54352  # Note: m4 eats our [], so we need to use [ and ] instead.
54353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54354  if test "x$has_forbidden_chars" != x; then
54355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54359      # Going to short mode and back again did indeed matter. Since short mode is
54360      # case insensitive, let's make it lowercase to improve readability.
54361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54362      # Now convert it back to Unix-style (cygpath)
54363      input_path=`$CYGPATH -u "$shortmode_path"`
54364      new_path="$input_path"
54365    fi
54366  fi
54367
54368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54369  if test "x$test_cygdrive_prefix" = x; then
54370    # As a simple fix, exclude /usr/bin since it's not a real path.
54371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54373      # a path prefixed by /cygdrive for fixpath to work.
54374      new_path="$CYGWIN_ROOT_PATH$input_path"
54375    fi
54376  fi
54377
54378
54379  if test "x$path" != "x$new_path"; then
54380    MSVC_DLL="$new_path"
54381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54382$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54383  fi
54384
54385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54386
54387  path="$MSVC_DLL"
54388  has_colon=`$ECHO $path | $GREP ^.:`
54389  new_path="$path"
54390  if test "x$has_colon" = x; then
54391    # Not in mixed or Windows style, start by that.
54392    new_path=`cmd //c echo $path`
54393  fi
54394
54395
54396  input_path="$new_path"
54397  # Check if we need to convert this using DOS-style short mode. If the path
54398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54399  # take no chances and rewrite it.
54400  # Note: m4 eats our [], so we need to use [ and ] instead.
54401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54402  if test "x$has_forbidden_chars" != x; then
54403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54405  fi
54406
54407
54408  windows_path="$new_path"
54409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54410    unix_path=`$CYGPATH -u "$windows_path"`
54411    new_path="$unix_path"
54412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54414    new_path="$unix_path"
54415  fi
54416
54417  if test "x$path" != "x$new_path"; then
54418    MSVC_DLL="$new_path"
54419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54420$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54421  fi
54422
54423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54425
54426    else
54427      # We're on a unix platform. Hooray! :)
54428      path="$MSVC_DLL"
54429      has_space=`$ECHO "$path" | $GREP " "`
54430      if test "x$has_space" != x; then
54431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54432$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54434      fi
54435
54436      # Use eval to expand a potential ~
54437      eval path="$path"
54438      if test ! -f "$path" && test ! -d "$path"; then
54439        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54440      fi
54441
54442      if test -d "$path"; then
54443        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54444      else
54445        dir="`$DIRNAME "$path"`"
54446        base="`$BASENAME "$path"`"
54447        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54448      fi
54449    fi
54450  fi
54451
54452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54453$as_echo_n "checking for $DLL_NAME... " >&6; }
54454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54455$as_echo "$MSVC_DLL" >&6; }
54456    else
54457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54458$as_echo "incorrect, ignoring" >&6; }
54459      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54460$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54461    fi
54462  fi
54463
54464    if test "x$MSVC_DLL" = x; then
54465      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54466    fi
54467    MSVCR_DLL="$MSVC_DLL"
54468  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54469
54470  DLL_NAME="$MSVCR_NAME"
54471  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54472  METHOD="devkit"
54473  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54475$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54476
54477    # Need to check if the found msvcr is correct architecture
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54479$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54480    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54482      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54483      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54484      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54485        CORRECT_MSVCR_ARCH="PE32 executable"
54486      else
54487        CORRECT_MSVCR_ARCH="PE32+ executable"
54488      fi
54489    else
54490      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54491        CORRECT_MSVCR_ARCH=386
54492      else
54493        CORRECT_MSVCR_ARCH=x86-64
54494      fi
54495    fi
54496    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54498$as_echo "ok" >&6; }
54499      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54500
54501  # Only process if variable expands to non-empty
54502
54503  if test "x$MSVC_DLL" != x; then
54504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54505
54506  # Input might be given as Windows format, start by converting to
54507  # unix format.
54508  path="$MSVC_DLL"
54509  new_path=`$CYGPATH -u "$path"`
54510
54511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54514  # "foo.exe" is OK but "foo" is an error.
54515  #
54516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54517  # It is also a way to make sure we got the proper file name for the real test later on.
54518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54519  if test "x$test_shortpath" = x; then
54520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54521$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54522    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54523  fi
54524
54525  # Call helper function which possibly converts this using DOS-style short mode.
54526  # If so, the updated path is stored in $new_path.
54527
54528  input_path="$new_path"
54529  # Check if we need to convert this using DOS-style short mode. If the path
54530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54531  # take no chances and rewrite it.
54532  # Note: m4 eats our [], so we need to use [ and ] instead.
54533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54534  if test "x$has_forbidden_chars" != x; then
54535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54539      # Going to short mode and back again did indeed matter. Since short mode is
54540      # case insensitive, let's make it lowercase to improve readability.
54541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54542      # Now convert it back to Unix-style (cygpath)
54543      input_path=`$CYGPATH -u "$shortmode_path"`
54544      new_path="$input_path"
54545    fi
54546  fi
54547
54548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54549  if test "x$test_cygdrive_prefix" = x; then
54550    # As a simple fix, exclude /usr/bin since it's not a real path.
54551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54553      # a path prefixed by /cygdrive for fixpath to work.
54554      new_path="$CYGWIN_ROOT_PATH$input_path"
54555    fi
54556  fi
54557
54558
54559  if test "x$path" != "x$new_path"; then
54560    MSVC_DLL="$new_path"
54561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54562$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54563  fi
54564
54565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54566
54567  path="$MSVC_DLL"
54568  has_colon=`$ECHO $path | $GREP ^.:`
54569  new_path="$path"
54570  if test "x$has_colon" = x; then
54571    # Not in mixed or Windows style, start by that.
54572    new_path=`cmd //c echo $path`
54573  fi
54574
54575
54576  input_path="$new_path"
54577  # Check if we need to convert this using DOS-style short mode. If the path
54578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54579  # take no chances and rewrite it.
54580  # Note: m4 eats our [], so we need to use [ and ] instead.
54581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54582  if test "x$has_forbidden_chars" != x; then
54583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54585  fi
54586
54587
54588  windows_path="$new_path"
54589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54590    unix_path=`$CYGPATH -u "$windows_path"`
54591    new_path="$unix_path"
54592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54594    new_path="$unix_path"
54595  fi
54596
54597  if test "x$path" != "x$new_path"; then
54598    MSVC_DLL="$new_path"
54599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54600$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54601  fi
54602
54603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54605
54606    else
54607      # We're on a unix platform. Hooray! :)
54608      path="$MSVC_DLL"
54609      has_space=`$ECHO "$path" | $GREP " "`
54610      if test "x$has_space" != x; then
54611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54612$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54614      fi
54615
54616      # Use eval to expand a potential ~
54617      eval path="$path"
54618      if test ! -f "$path" && test ! -d "$path"; then
54619        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54620      fi
54621
54622      if test -d "$path"; then
54623        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54624      else
54625        dir="`$DIRNAME "$path"`"
54626        base="`$BASENAME "$path"`"
54627        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54628      fi
54629    fi
54630  fi
54631
54632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54633$as_echo_n "checking for $DLL_NAME... " >&6; }
54634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54635$as_echo "$MSVC_DLL" >&6; }
54636    else
54637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54638$as_echo "incorrect, ignoring" >&6; }
54639      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54640$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54641    fi
54642  fi
54643
54644    if test "x$MSVC_DLL" = x; then
54645      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54646    fi
54647    MSVCR_DLL="$MSVC_DLL"
54648  else
54649
54650  DLL_NAME="${MSVCR_NAME}"
54651  MSVC_DLL=
54652
54653  if test "x$MSVC_DLL" = x; then
54654    # Probe: Using well-known location from Visual Studio 10.0
54655    if test "x$VCINSTALLDIR" != x; then
54656      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54657
54658  windows_path="$CYGWIN_VC_INSTALL_DIR"
54659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54660    unix_path=`$CYGPATH -u "$windows_path"`
54661    CYGWIN_VC_INSTALL_DIR="$unix_path"
54662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54664    CYGWIN_VC_INSTALL_DIR="$unix_path"
54665  fi
54666
54667      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54668        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54669      else
54670        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54671      fi
54672      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54673
54674  DLL_NAME="$DLL_NAME"
54675  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54676  METHOD="well-known location in VCINSTALLDIR"
54677  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54678    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54679$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54680
54681    # Need to check if the found msvcr is correct architecture
54682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54683$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54684    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54686      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54687      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54688      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54689        CORRECT_MSVCR_ARCH="PE32 executable"
54690      else
54691        CORRECT_MSVCR_ARCH="PE32+ executable"
54692      fi
54693    else
54694      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54695        CORRECT_MSVCR_ARCH=386
54696      else
54697        CORRECT_MSVCR_ARCH=x86-64
54698      fi
54699    fi
54700    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54702$as_echo "ok" >&6; }
54703      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54704
54705  # Only process if variable expands to non-empty
54706
54707  if test "x$MSVC_DLL" != x; then
54708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54709
54710  # Input might be given as Windows format, start by converting to
54711  # unix format.
54712  path="$MSVC_DLL"
54713  new_path=`$CYGPATH -u "$path"`
54714
54715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54718  # "foo.exe" is OK but "foo" is an error.
54719  #
54720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54721  # It is also a way to make sure we got the proper file name for the real test later on.
54722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54723  if test "x$test_shortpath" = x; then
54724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54725$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54726    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54727  fi
54728
54729  # Call helper function which possibly converts this using DOS-style short mode.
54730  # If so, the updated path is stored in $new_path.
54731
54732  input_path="$new_path"
54733  # Check if we need to convert this using DOS-style short mode. If the path
54734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54735  # take no chances and rewrite it.
54736  # Note: m4 eats our [], so we need to use [ and ] instead.
54737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54738  if test "x$has_forbidden_chars" != x; then
54739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54743      # Going to short mode and back again did indeed matter. Since short mode is
54744      # case insensitive, let's make it lowercase to improve readability.
54745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54746      # Now convert it back to Unix-style (cygpath)
54747      input_path=`$CYGPATH -u "$shortmode_path"`
54748      new_path="$input_path"
54749    fi
54750  fi
54751
54752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54753  if test "x$test_cygdrive_prefix" = x; then
54754    # As a simple fix, exclude /usr/bin since it's not a real path.
54755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54757      # a path prefixed by /cygdrive for fixpath to work.
54758      new_path="$CYGWIN_ROOT_PATH$input_path"
54759    fi
54760  fi
54761
54762
54763  if test "x$path" != "x$new_path"; then
54764    MSVC_DLL="$new_path"
54765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54766$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54767  fi
54768
54769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54770
54771  path="$MSVC_DLL"
54772  has_colon=`$ECHO $path | $GREP ^.:`
54773  new_path="$path"
54774  if test "x$has_colon" = x; then
54775    # Not in mixed or Windows style, start by that.
54776    new_path=`cmd //c echo $path`
54777  fi
54778
54779
54780  input_path="$new_path"
54781  # Check if we need to convert this using DOS-style short mode. If the path
54782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54783  # take no chances and rewrite it.
54784  # Note: m4 eats our [], so we need to use [ and ] instead.
54785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54786  if test "x$has_forbidden_chars" != x; then
54787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54789  fi
54790
54791
54792  windows_path="$new_path"
54793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54794    unix_path=`$CYGPATH -u "$windows_path"`
54795    new_path="$unix_path"
54796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54798    new_path="$unix_path"
54799  fi
54800
54801  if test "x$path" != "x$new_path"; then
54802    MSVC_DLL="$new_path"
54803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54804$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54805  fi
54806
54807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54809
54810    else
54811      # We're on a unix platform. Hooray! :)
54812      path="$MSVC_DLL"
54813      has_space=`$ECHO "$path" | $GREP " "`
54814      if test "x$has_space" != x; then
54815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54816$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54818      fi
54819
54820      # Use eval to expand a potential ~
54821      eval path="$path"
54822      if test ! -f "$path" && test ! -d "$path"; then
54823        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54824      fi
54825
54826      if test -d "$path"; then
54827        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54828      else
54829        dir="`$DIRNAME "$path"`"
54830        base="`$BASENAME "$path"`"
54831        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54832      fi
54833    fi
54834  fi
54835
54836      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54837$as_echo_n "checking for $DLL_NAME... " >&6; }
54838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54839$as_echo "$MSVC_DLL" >&6; }
54840    else
54841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54842$as_echo "incorrect, ignoring" >&6; }
54843      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54844$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54845    fi
54846  fi
54847
54848    fi
54849  fi
54850
54851  if test "x$MSVC_DLL" = x; then
54852    # Probe: Check in the Boot JDK directory.
54853    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54854
54855  DLL_NAME="$DLL_NAME"
54856  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54857  METHOD="well-known location in Boot JDK"
54858  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54860$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54861
54862    # Need to check if the found msvcr is correct architecture
54863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54864$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54865    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54867      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54868      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54869      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54870        CORRECT_MSVCR_ARCH="PE32 executable"
54871      else
54872        CORRECT_MSVCR_ARCH="PE32+ executable"
54873      fi
54874    else
54875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54876        CORRECT_MSVCR_ARCH=386
54877      else
54878        CORRECT_MSVCR_ARCH=x86-64
54879      fi
54880    fi
54881    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54883$as_echo "ok" >&6; }
54884      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54885
54886  # Only process if variable expands to non-empty
54887
54888  if test "x$MSVC_DLL" != x; then
54889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54890
54891  # Input might be given as Windows format, start by converting to
54892  # unix format.
54893  path="$MSVC_DLL"
54894  new_path=`$CYGPATH -u "$path"`
54895
54896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54899  # "foo.exe" is OK but "foo" is an error.
54900  #
54901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54902  # It is also a way to make sure we got the proper file name for the real test later on.
54903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54904  if test "x$test_shortpath" = x; then
54905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54906$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54907    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54908  fi
54909
54910  # Call helper function which possibly converts this using DOS-style short mode.
54911  # If so, the updated path is stored in $new_path.
54912
54913  input_path="$new_path"
54914  # Check if we need to convert this using DOS-style short mode. If the path
54915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54916  # take no chances and rewrite it.
54917  # Note: m4 eats our [], so we need to use [ and ] instead.
54918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54919  if test "x$has_forbidden_chars" != x; then
54920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54924      # Going to short mode and back again did indeed matter. Since short mode is
54925      # case insensitive, let's make it lowercase to improve readability.
54926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54927      # Now convert it back to Unix-style (cygpath)
54928      input_path=`$CYGPATH -u "$shortmode_path"`
54929      new_path="$input_path"
54930    fi
54931  fi
54932
54933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54934  if test "x$test_cygdrive_prefix" = x; then
54935    # As a simple fix, exclude /usr/bin since it's not a real path.
54936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54938      # a path prefixed by /cygdrive for fixpath to work.
54939      new_path="$CYGWIN_ROOT_PATH$input_path"
54940    fi
54941  fi
54942
54943
54944  if test "x$path" != "x$new_path"; then
54945    MSVC_DLL="$new_path"
54946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54947$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54948  fi
54949
54950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54951
54952  path="$MSVC_DLL"
54953  has_colon=`$ECHO $path | $GREP ^.:`
54954  new_path="$path"
54955  if test "x$has_colon" = x; then
54956    # Not in mixed or Windows style, start by that.
54957    new_path=`cmd //c echo $path`
54958  fi
54959
54960
54961  input_path="$new_path"
54962  # Check if we need to convert this using DOS-style short mode. If the path
54963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54964  # take no chances and rewrite it.
54965  # Note: m4 eats our [], so we need to use [ and ] instead.
54966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54967  if test "x$has_forbidden_chars" != x; then
54968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54970  fi
54971
54972
54973  windows_path="$new_path"
54974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54975    unix_path=`$CYGPATH -u "$windows_path"`
54976    new_path="$unix_path"
54977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54979    new_path="$unix_path"
54980  fi
54981
54982  if test "x$path" != "x$new_path"; then
54983    MSVC_DLL="$new_path"
54984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54985$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54986  fi
54987
54988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54990
54991    else
54992      # We're on a unix platform. Hooray! :)
54993      path="$MSVC_DLL"
54994      has_space=`$ECHO "$path" | $GREP " "`
54995      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
54999      fi
55000
55001      # Use eval to expand a potential ~
55002      eval path="$path"
55003      if test ! -f "$path" && test ! -d "$path"; then
55004        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55005      fi
55006
55007      if test -d "$path"; then
55008        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55009      else
55010        dir="`$DIRNAME "$path"`"
55011        base="`$BASENAME "$path"`"
55012        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55013      fi
55014    fi
55015  fi
55016
55017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55018$as_echo_n "checking for $DLL_NAME... " >&6; }
55019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55020$as_echo "$MSVC_DLL" >&6; }
55021    else
55022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55023$as_echo "incorrect, ignoring" >&6; }
55024      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55025$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55026    fi
55027  fi
55028
55029  fi
55030
55031  if test "x$MSVC_DLL" = x; then
55032    # Probe: Look in the Windows system32 directory
55033    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55034
55035  windows_path="$CYGWIN_SYSTEMROOT"
55036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55037    unix_path=`$CYGPATH -u "$windows_path"`
55038    CYGWIN_SYSTEMROOT="$unix_path"
55039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55041    CYGWIN_SYSTEMROOT="$unix_path"
55042  fi
55043
55044    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55045
55046  DLL_NAME="$DLL_NAME"
55047  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55048  METHOD="well-known location in SYSTEMROOT"
55049  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55051$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55052
55053    # Need to check if the found msvcr is correct architecture
55054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55055$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55056    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55058      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55059      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55061        CORRECT_MSVCR_ARCH="PE32 executable"
55062      else
55063        CORRECT_MSVCR_ARCH="PE32+ executable"
55064      fi
55065    else
55066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55067        CORRECT_MSVCR_ARCH=386
55068      else
55069        CORRECT_MSVCR_ARCH=x86-64
55070      fi
55071    fi
55072    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55074$as_echo "ok" >&6; }
55075      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55076
55077  # Only process if variable expands to non-empty
55078
55079  if test "x$MSVC_DLL" != x; then
55080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55081
55082  # Input might be given as Windows format, start by converting to
55083  # unix format.
55084  path="$MSVC_DLL"
55085  new_path=`$CYGPATH -u "$path"`
55086
55087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55090  # "foo.exe" is OK but "foo" is an error.
55091  #
55092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55093  # It is also a way to make sure we got the proper file name for the real test later on.
55094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55095  if test "x$test_shortpath" = x; then
55096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55097$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55098    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55099  fi
55100
55101  # Call helper function which possibly converts this using DOS-style short mode.
55102  # If so, the updated path is stored in $new_path.
55103
55104  input_path="$new_path"
55105  # Check if we need to convert this using DOS-style short mode. If the path
55106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55107  # take no chances and rewrite it.
55108  # Note: m4 eats our [], so we need to use [ and ] instead.
55109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55110  if test "x$has_forbidden_chars" != x; then
55111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55115      # Going to short mode and back again did indeed matter. Since short mode is
55116      # case insensitive, let's make it lowercase to improve readability.
55117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55118      # Now convert it back to Unix-style (cygpath)
55119      input_path=`$CYGPATH -u "$shortmode_path"`
55120      new_path="$input_path"
55121    fi
55122  fi
55123
55124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55125  if test "x$test_cygdrive_prefix" = x; then
55126    # As a simple fix, exclude /usr/bin since it's not a real path.
55127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55129      # a path prefixed by /cygdrive for fixpath to work.
55130      new_path="$CYGWIN_ROOT_PATH$input_path"
55131    fi
55132  fi
55133
55134
55135  if test "x$path" != "x$new_path"; then
55136    MSVC_DLL="$new_path"
55137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55139  fi
55140
55141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55142
55143  path="$MSVC_DLL"
55144  has_colon=`$ECHO $path | $GREP ^.:`
55145  new_path="$path"
55146  if test "x$has_colon" = x; then
55147    # Not in mixed or Windows style, start by that.
55148    new_path=`cmd //c echo $path`
55149  fi
55150
55151
55152  input_path="$new_path"
55153  # Check if we need to convert this using DOS-style short mode. If the path
55154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55155  # take no chances and rewrite it.
55156  # Note: m4 eats our [], so we need to use [ and ] instead.
55157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55158  if test "x$has_forbidden_chars" != x; then
55159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55161  fi
55162
55163
55164  windows_path="$new_path"
55165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55166    unix_path=`$CYGPATH -u "$windows_path"`
55167    new_path="$unix_path"
55168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55170    new_path="$unix_path"
55171  fi
55172
55173  if test "x$path" != "x$new_path"; then
55174    MSVC_DLL="$new_path"
55175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55177  fi
55178
55179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55181
55182    else
55183      # We're on a unix platform. Hooray! :)
55184      path="$MSVC_DLL"
55185      has_space=`$ECHO "$path" | $GREP " "`
55186      if test "x$has_space" != x; then
55187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55190      fi
55191
55192      # Use eval to expand a potential ~
55193      eval path="$path"
55194      if test ! -f "$path" && test ! -d "$path"; then
55195        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55196      fi
55197
55198      if test -d "$path"; then
55199        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55200      else
55201        dir="`$DIRNAME "$path"`"
55202        base="`$BASENAME "$path"`"
55203        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55204      fi
55205    fi
55206  fi
55207
55208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55209$as_echo_n "checking for $DLL_NAME... " >&6; }
55210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55211$as_echo "$MSVC_DLL" >&6; }
55212    else
55213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55214$as_echo "incorrect, ignoring" >&6; }
55215      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55216$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55217    fi
55218  fi
55219
55220  fi
55221
55222  if test "x$MSVC_DLL" = x; then
55223    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55224    if test "x$VS100COMNTOOLS" != x; then
55225      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55226
55227  windows_path="$CYGWIN_VS_TOOLS_DIR"
55228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55229    unix_path=`$CYGPATH -u "$windows_path"`
55230    CYGWIN_VS_TOOLS_DIR="$unix_path"
55231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55233    CYGWIN_VS_TOOLS_DIR="$unix_path"
55234  fi
55235
55236      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55237        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55238	    | $GREP -i /x64/ | $HEAD --lines 1`
55239      else
55240        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55241	    | $GREP -i /x86/ | $HEAD --lines 1`
55242      fi
55243
55244  DLL_NAME="$DLL_NAME"
55245  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55246  METHOD="search of VS100COMNTOOLS"
55247  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55248    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55249$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55250
55251    # Need to check if the found msvcr is correct architecture
55252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55253$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55254    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55256      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55257      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55258      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55259        CORRECT_MSVCR_ARCH="PE32 executable"
55260      else
55261        CORRECT_MSVCR_ARCH="PE32+ executable"
55262      fi
55263    else
55264      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55265        CORRECT_MSVCR_ARCH=386
55266      else
55267        CORRECT_MSVCR_ARCH=x86-64
55268      fi
55269    fi
55270    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55272$as_echo "ok" >&6; }
55273      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55274
55275  # Only process if variable expands to non-empty
55276
55277  if test "x$MSVC_DLL" != x; then
55278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55279
55280  # Input might be given as Windows format, start by converting to
55281  # unix format.
55282  path="$MSVC_DLL"
55283  new_path=`$CYGPATH -u "$path"`
55284
55285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55288  # "foo.exe" is OK but "foo" is an error.
55289  #
55290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55291  # It is also a way to make sure we got the proper file name for the real test later on.
55292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55293  if test "x$test_shortpath" = x; then
55294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55295$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55296    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55297  fi
55298
55299  # Call helper function which possibly converts this using DOS-style short mode.
55300  # If so, the updated path is stored in $new_path.
55301
55302  input_path="$new_path"
55303  # Check if we need to convert this using DOS-style short mode. If the path
55304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55305  # take no chances and rewrite it.
55306  # Note: m4 eats our [], so we need to use [ and ] instead.
55307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55308  if test "x$has_forbidden_chars" != x; then
55309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55313      # Going to short mode and back again did indeed matter. Since short mode is
55314      # case insensitive, let's make it lowercase to improve readability.
55315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55316      # Now convert it back to Unix-style (cygpath)
55317      input_path=`$CYGPATH -u "$shortmode_path"`
55318      new_path="$input_path"
55319    fi
55320  fi
55321
55322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55323  if test "x$test_cygdrive_prefix" = x; then
55324    # As a simple fix, exclude /usr/bin since it's not a real path.
55325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55327      # a path prefixed by /cygdrive for fixpath to work.
55328      new_path="$CYGWIN_ROOT_PATH$input_path"
55329    fi
55330  fi
55331
55332
55333  if test "x$path" != "x$new_path"; then
55334    MSVC_DLL="$new_path"
55335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55336$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55337  fi
55338
55339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55340
55341  path="$MSVC_DLL"
55342  has_colon=`$ECHO $path | $GREP ^.:`
55343  new_path="$path"
55344  if test "x$has_colon" = x; then
55345    # Not in mixed or Windows style, start by that.
55346    new_path=`cmd //c echo $path`
55347  fi
55348
55349
55350  input_path="$new_path"
55351  # Check if we need to convert this using DOS-style short mode. If the path
55352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55353  # take no chances and rewrite it.
55354  # Note: m4 eats our [], so we need to use [ and ] instead.
55355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55356  if test "x$has_forbidden_chars" != x; then
55357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55359  fi
55360
55361
55362  windows_path="$new_path"
55363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55364    unix_path=`$CYGPATH -u "$windows_path"`
55365    new_path="$unix_path"
55366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55368    new_path="$unix_path"
55369  fi
55370
55371  if test "x$path" != "x$new_path"; then
55372    MSVC_DLL="$new_path"
55373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55374$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55375  fi
55376
55377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55379
55380    else
55381      # We're on a unix platform. Hooray! :)
55382      path="$MSVC_DLL"
55383      has_space=`$ECHO "$path" | $GREP " "`
55384      if test "x$has_space" != x; then
55385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55386$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55387        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55388      fi
55389
55390      # Use eval to expand a potential ~
55391      eval path="$path"
55392      if test ! -f "$path" && test ! -d "$path"; then
55393        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55394      fi
55395
55396      if test -d "$path"; then
55397        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55398      else
55399        dir="`$DIRNAME "$path"`"
55400        base="`$BASENAME "$path"`"
55401        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55402      fi
55403    fi
55404  fi
55405
55406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55407$as_echo_n "checking for $DLL_NAME... " >&6; }
55408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55409$as_echo "$MSVC_DLL" >&6; }
55410    else
55411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55412$as_echo "incorrect, ignoring" >&6; }
55413      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55414$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55415    fi
55416  fi
55417
55418    fi
55419  fi
55420
55421  if test "x$MSVC_DLL" = x; then
55422    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55423    # (This was the original behaviour; kept since it might turn something up)
55424    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55425      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55426        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55427	    | $GREP x64 | $HEAD --lines 1`
55428      else
55429        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55430	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55431        if test "x$POSSIBLE_MSVC_DLL" = x; then
55432          # We're grasping at straws now...
55433          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55434	      | $HEAD --lines 1`
55435        fi
55436      fi
55437
55438
55439  DLL_NAME="$DLL_NAME"
55440  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55441  METHOD="search of VCINSTALLDIR"
55442  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55443    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55444$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55445
55446    # Need to check if the found msvcr is correct architecture
55447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55448$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55449    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55451      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55452      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55454        CORRECT_MSVCR_ARCH="PE32 executable"
55455      else
55456        CORRECT_MSVCR_ARCH="PE32+ executable"
55457      fi
55458    else
55459      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55460        CORRECT_MSVCR_ARCH=386
55461      else
55462        CORRECT_MSVCR_ARCH=x86-64
55463      fi
55464    fi
55465    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55467$as_echo "ok" >&6; }
55468      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55469
55470  # Only process if variable expands to non-empty
55471
55472  if test "x$MSVC_DLL" != x; then
55473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55474
55475  # Input might be given as Windows format, start by converting to
55476  # unix format.
55477  path="$MSVC_DLL"
55478  new_path=`$CYGPATH -u "$path"`
55479
55480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55483  # "foo.exe" is OK but "foo" is an error.
55484  #
55485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55486  # It is also a way to make sure we got the proper file name for the real test later on.
55487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55488  if test "x$test_shortpath" = x; then
55489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55490$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55491    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55492  fi
55493
55494  # Call helper function which possibly converts this using DOS-style short mode.
55495  # If so, the updated path is stored in $new_path.
55496
55497  input_path="$new_path"
55498  # Check if we need to convert this using DOS-style short mode. If the path
55499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55500  # take no chances and rewrite it.
55501  # Note: m4 eats our [], so we need to use [ and ] instead.
55502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55503  if test "x$has_forbidden_chars" != x; then
55504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55508      # Going to short mode and back again did indeed matter. Since short mode is
55509      # case insensitive, let's make it lowercase to improve readability.
55510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55511      # Now convert it back to Unix-style (cygpath)
55512      input_path=`$CYGPATH -u "$shortmode_path"`
55513      new_path="$input_path"
55514    fi
55515  fi
55516
55517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55518  if test "x$test_cygdrive_prefix" = x; then
55519    # As a simple fix, exclude /usr/bin since it's not a real path.
55520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55522      # a path prefixed by /cygdrive for fixpath to work.
55523      new_path="$CYGWIN_ROOT_PATH$input_path"
55524    fi
55525  fi
55526
55527
55528  if test "x$path" != "x$new_path"; then
55529    MSVC_DLL="$new_path"
55530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55531$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55532  fi
55533
55534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55535
55536  path="$MSVC_DLL"
55537  has_colon=`$ECHO $path | $GREP ^.:`
55538  new_path="$path"
55539  if test "x$has_colon" = x; then
55540    # Not in mixed or Windows style, start by that.
55541    new_path=`cmd //c echo $path`
55542  fi
55543
55544
55545  input_path="$new_path"
55546  # Check if we need to convert this using DOS-style short mode. If the path
55547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55548  # take no chances and rewrite it.
55549  # Note: m4 eats our [], so we need to use [ and ] instead.
55550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55551  if test "x$has_forbidden_chars" != x; then
55552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55554  fi
55555
55556
55557  windows_path="$new_path"
55558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55559    unix_path=`$CYGPATH -u "$windows_path"`
55560    new_path="$unix_path"
55561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55563    new_path="$unix_path"
55564  fi
55565
55566  if test "x$path" != "x$new_path"; then
55567    MSVC_DLL="$new_path"
55568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55569$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55570  fi
55571
55572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55574
55575    else
55576      # We're on a unix platform. Hooray! :)
55577      path="$MSVC_DLL"
55578      has_space=`$ECHO "$path" | $GREP " "`
55579      if test "x$has_space" != x; then
55580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55581$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55583      fi
55584
55585      # Use eval to expand a potential ~
55586      eval path="$path"
55587      if test ! -f "$path" && test ! -d "$path"; then
55588        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55589      fi
55590
55591      if test -d "$path"; then
55592        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55593      else
55594        dir="`$DIRNAME "$path"`"
55595        base="`$BASENAME "$path"`"
55596        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55597      fi
55598    fi
55599  fi
55600
55601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55602$as_echo_n "checking for $DLL_NAME... " >&6; }
55603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55604$as_echo "$MSVC_DLL" >&6; }
55605    else
55606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55607$as_echo "incorrect, ignoring" >&6; }
55608      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55609$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55610    fi
55611  fi
55612
55613    fi
55614  fi
55615
55616  if test "x$MSVC_DLL" = x; then
55617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55618$as_echo_n "checking for $DLL_NAME... " >&6; }
55619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55620$as_echo "no" >&6; }
55621    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55622  fi
55623
55624    MSVCR_DLL="$MSVC_DLL"
55625  fi
55626
55627
55628
55629# Check whether --with-msvcp-dll was given.
55630if test "${with_msvcp_dll+set}" = set; then :
55631  withval=$with_msvcp_dll;
55632fi
55633
55634
55635  if test "x$MSVCP_NAME" != "x"; then
55636    if test "x$with_msvcp_dll" != x; then
55637      # If given explicitly by user, do not probe. If not present, fail directly.
55638
55639  DLL_NAME="$MSVCP_NAME"
55640  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55641  METHOD="--with-msvcp-dll"
55642  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55643    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55644$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55645
55646    # Need to check if the found msvcr is correct architecture
55647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55648$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55649    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55651      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55652      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55653      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55654        CORRECT_MSVCR_ARCH="PE32 executable"
55655      else
55656        CORRECT_MSVCR_ARCH="PE32+ executable"
55657      fi
55658    else
55659      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55660        CORRECT_MSVCR_ARCH=386
55661      else
55662        CORRECT_MSVCR_ARCH=x86-64
55663      fi
55664    fi
55665    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55667$as_echo "ok" >&6; }
55668      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55669
55670  # Only process if variable expands to non-empty
55671
55672  if test "x$MSVC_DLL" != x; then
55673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55674
55675  # Input might be given as Windows format, start by converting to
55676  # unix format.
55677  path="$MSVC_DLL"
55678  new_path=`$CYGPATH -u "$path"`
55679
55680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55683  # "foo.exe" is OK but "foo" is an error.
55684  #
55685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55686  # It is also a way to make sure we got the proper file name for the real test later on.
55687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55688  if test "x$test_shortpath" = x; then
55689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55690$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55691    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55692  fi
55693
55694  # Call helper function which possibly converts this using DOS-style short mode.
55695  # If so, the updated path is stored in $new_path.
55696
55697  input_path="$new_path"
55698  # Check if we need to convert this using DOS-style short mode. If the path
55699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55700  # take no chances and rewrite it.
55701  # Note: m4 eats our [], so we need to use [ and ] instead.
55702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55703  if test "x$has_forbidden_chars" != x; then
55704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55708      # Going to short mode and back again did indeed matter. Since short mode is
55709      # case insensitive, let's make it lowercase to improve readability.
55710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55711      # Now convert it back to Unix-style (cygpath)
55712      input_path=`$CYGPATH -u "$shortmode_path"`
55713      new_path="$input_path"
55714    fi
55715  fi
55716
55717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55718  if test "x$test_cygdrive_prefix" = x; then
55719    # As a simple fix, exclude /usr/bin since it's not a real path.
55720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55722      # a path prefixed by /cygdrive for fixpath to work.
55723      new_path="$CYGWIN_ROOT_PATH$input_path"
55724    fi
55725  fi
55726
55727
55728  if test "x$path" != "x$new_path"; then
55729    MSVC_DLL="$new_path"
55730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55731$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55732  fi
55733
55734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55735
55736  path="$MSVC_DLL"
55737  has_colon=`$ECHO $path | $GREP ^.:`
55738  new_path="$path"
55739  if test "x$has_colon" = x; then
55740    # Not in mixed or Windows style, start by that.
55741    new_path=`cmd //c echo $path`
55742  fi
55743
55744
55745  input_path="$new_path"
55746  # Check if we need to convert this using DOS-style short mode. If the path
55747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55748  # take no chances and rewrite it.
55749  # Note: m4 eats our [], so we need to use [ and ] instead.
55750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55751  if test "x$has_forbidden_chars" != x; then
55752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55754  fi
55755
55756
55757  windows_path="$new_path"
55758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55759    unix_path=`$CYGPATH -u "$windows_path"`
55760    new_path="$unix_path"
55761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55763    new_path="$unix_path"
55764  fi
55765
55766  if test "x$path" != "x$new_path"; then
55767    MSVC_DLL="$new_path"
55768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55769$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55770  fi
55771
55772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55774
55775    else
55776      # We're on a unix platform. Hooray! :)
55777      path="$MSVC_DLL"
55778      has_space=`$ECHO "$path" | $GREP " "`
55779      if test "x$has_space" != x; then
55780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55781$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55783      fi
55784
55785      # Use eval to expand a potential ~
55786      eval path="$path"
55787      if test ! -f "$path" && test ! -d "$path"; then
55788        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55789      fi
55790
55791      if test -d "$path"; then
55792        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55793      else
55794        dir="`$DIRNAME "$path"`"
55795        base="`$BASENAME "$path"`"
55796        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55797      fi
55798    fi
55799  fi
55800
55801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55802$as_echo_n "checking for $DLL_NAME... " >&6; }
55803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55804$as_echo "$MSVC_DLL" >&6; }
55805    else
55806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55807$as_echo "incorrect, ignoring" >&6; }
55808      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55809$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55810    fi
55811  fi
55812
55813      if test "x$MSVC_DLL" = x; then
55814        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55815      fi
55816      MSVCP_DLL="$MSVC_DLL"
55817    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55818
55819  DLL_NAME="$MSVCP_NAME"
55820  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55821  METHOD="devkit"
55822  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55824$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55825
55826    # Need to check if the found msvcr is correct architecture
55827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55828$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55829    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55831      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55832      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55833      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55834        CORRECT_MSVCR_ARCH="PE32 executable"
55835      else
55836        CORRECT_MSVCR_ARCH="PE32+ executable"
55837      fi
55838    else
55839      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55840        CORRECT_MSVCR_ARCH=386
55841      else
55842        CORRECT_MSVCR_ARCH=x86-64
55843      fi
55844    fi
55845    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55847$as_echo "ok" >&6; }
55848      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55849
55850  # Only process if variable expands to non-empty
55851
55852  if test "x$MSVC_DLL" != x; then
55853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55854
55855  # Input might be given as Windows format, start by converting to
55856  # unix format.
55857  path="$MSVC_DLL"
55858  new_path=`$CYGPATH -u "$path"`
55859
55860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55863  # "foo.exe" is OK but "foo" is an error.
55864  #
55865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55866  # It is also a way to make sure we got the proper file name for the real test later on.
55867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55868  if test "x$test_shortpath" = x; then
55869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55870$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55871    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55872  fi
55873
55874  # Call helper function which possibly converts this using DOS-style short mode.
55875  # If so, the updated path is stored in $new_path.
55876
55877  input_path="$new_path"
55878  # Check if we need to convert this using DOS-style short mode. If the path
55879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55880  # take no chances and rewrite it.
55881  # Note: m4 eats our [], so we need to use [ and ] instead.
55882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55883  if test "x$has_forbidden_chars" != x; then
55884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55888      # Going to short mode and back again did indeed matter. Since short mode is
55889      # case insensitive, let's make it lowercase to improve readability.
55890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55891      # Now convert it back to Unix-style (cygpath)
55892      input_path=`$CYGPATH -u "$shortmode_path"`
55893      new_path="$input_path"
55894    fi
55895  fi
55896
55897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55898  if test "x$test_cygdrive_prefix" = x; then
55899    # As a simple fix, exclude /usr/bin since it's not a real path.
55900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55902      # a path prefixed by /cygdrive for fixpath to work.
55903      new_path="$CYGWIN_ROOT_PATH$input_path"
55904    fi
55905  fi
55906
55907
55908  if test "x$path" != "x$new_path"; then
55909    MSVC_DLL="$new_path"
55910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55911$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55912  fi
55913
55914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55915
55916  path="$MSVC_DLL"
55917  has_colon=`$ECHO $path | $GREP ^.:`
55918  new_path="$path"
55919  if test "x$has_colon" = x; then
55920    # Not in mixed or Windows style, start by that.
55921    new_path=`cmd //c echo $path`
55922  fi
55923
55924
55925  input_path="$new_path"
55926  # Check if we need to convert this using DOS-style short mode. If the path
55927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55928  # take no chances and rewrite it.
55929  # Note: m4 eats our [], so we need to use [ and ] instead.
55930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55931  if test "x$has_forbidden_chars" != x; then
55932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55934  fi
55935
55936
55937  windows_path="$new_path"
55938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55939    unix_path=`$CYGPATH -u "$windows_path"`
55940    new_path="$unix_path"
55941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55943    new_path="$unix_path"
55944  fi
55945
55946  if test "x$path" != "x$new_path"; then
55947    MSVC_DLL="$new_path"
55948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55949$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55950  fi
55951
55952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55954
55955    else
55956      # We're on a unix platform. Hooray! :)
55957      path="$MSVC_DLL"
55958      has_space=`$ECHO "$path" | $GREP " "`
55959      if test "x$has_space" != x; then
55960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55961$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55963      fi
55964
55965      # Use eval to expand a potential ~
55966      eval path="$path"
55967      if test ! -f "$path" && test ! -d "$path"; then
55968        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55969      fi
55970
55971      if test -d "$path"; then
55972        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55973      else
55974        dir="`$DIRNAME "$path"`"
55975        base="`$BASENAME "$path"`"
55976        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55977      fi
55978    fi
55979  fi
55980
55981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55982$as_echo_n "checking for $DLL_NAME... " >&6; }
55983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55984$as_echo "$MSVC_DLL" >&6; }
55985    else
55986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55987$as_echo "incorrect, ignoring" >&6; }
55988      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55989$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55990    fi
55991  fi
55992
55993      if test "x$MSVC_DLL" = x; then
55994        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55995      fi
55996      MSVCP_DLL="$MSVC_DLL"
55997    else
55998
55999  DLL_NAME="${MSVCP_NAME}"
56000  MSVC_DLL=
56001
56002  if test "x$MSVC_DLL" = x; then
56003    # Probe: Using well-known location from Visual Studio 10.0
56004    if test "x$VCINSTALLDIR" != x; then
56005      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56006
56007  windows_path="$CYGWIN_VC_INSTALL_DIR"
56008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56009    unix_path=`$CYGPATH -u "$windows_path"`
56010    CYGWIN_VC_INSTALL_DIR="$unix_path"
56011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56013    CYGWIN_VC_INSTALL_DIR="$unix_path"
56014  fi
56015
56016      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56017        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56018      else
56019        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56020      fi
56021      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56022
56023  DLL_NAME="$DLL_NAME"
56024  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56025  METHOD="well-known location in VCINSTALLDIR"
56026  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56027    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56028$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56029
56030    # Need to check if the found msvcr is correct architecture
56031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56032$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56033    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56035      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56036      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56037      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56038        CORRECT_MSVCR_ARCH="PE32 executable"
56039      else
56040        CORRECT_MSVCR_ARCH="PE32+ executable"
56041      fi
56042    else
56043      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56044        CORRECT_MSVCR_ARCH=386
56045      else
56046        CORRECT_MSVCR_ARCH=x86-64
56047      fi
56048    fi
56049    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56051$as_echo "ok" >&6; }
56052      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56053
56054  # Only process if variable expands to non-empty
56055
56056  if test "x$MSVC_DLL" != x; then
56057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56058
56059  # Input might be given as Windows format, start by converting to
56060  # unix format.
56061  path="$MSVC_DLL"
56062  new_path=`$CYGPATH -u "$path"`
56063
56064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56067  # "foo.exe" is OK but "foo" is an error.
56068  #
56069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56070  # It is also a way to make sure we got the proper file name for the real test later on.
56071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56072  if test "x$test_shortpath" = x; then
56073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56074$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56075    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56076  fi
56077
56078  # Call helper function which possibly converts this using DOS-style short mode.
56079  # If so, the updated path is stored in $new_path.
56080
56081  input_path="$new_path"
56082  # Check if we need to convert this using DOS-style short mode. If the path
56083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56084  # take no chances and rewrite it.
56085  # Note: m4 eats our [], so we need to use [ and ] instead.
56086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56087  if test "x$has_forbidden_chars" != x; then
56088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56092      # Going to short mode and back again did indeed matter. Since short mode is
56093      # case insensitive, let's make it lowercase to improve readability.
56094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56095      # Now convert it back to Unix-style (cygpath)
56096      input_path=`$CYGPATH -u "$shortmode_path"`
56097      new_path="$input_path"
56098    fi
56099  fi
56100
56101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56102  if test "x$test_cygdrive_prefix" = x; then
56103    # As a simple fix, exclude /usr/bin since it's not a real path.
56104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56106      # a path prefixed by /cygdrive for fixpath to work.
56107      new_path="$CYGWIN_ROOT_PATH$input_path"
56108    fi
56109  fi
56110
56111
56112  if test "x$path" != "x$new_path"; then
56113    MSVC_DLL="$new_path"
56114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56116  fi
56117
56118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56119
56120  path="$MSVC_DLL"
56121  has_colon=`$ECHO $path | $GREP ^.:`
56122  new_path="$path"
56123  if test "x$has_colon" = x; then
56124    # Not in mixed or Windows style, start by that.
56125    new_path=`cmd //c echo $path`
56126  fi
56127
56128
56129  input_path="$new_path"
56130  # Check if we need to convert this using DOS-style short mode. If the path
56131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56132  # take no chances and rewrite it.
56133  # Note: m4 eats our [], so we need to use [ and ] instead.
56134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56135  if test "x$has_forbidden_chars" != x; then
56136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56138  fi
56139
56140
56141  windows_path="$new_path"
56142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56143    unix_path=`$CYGPATH -u "$windows_path"`
56144    new_path="$unix_path"
56145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56147    new_path="$unix_path"
56148  fi
56149
56150  if test "x$path" != "x$new_path"; then
56151    MSVC_DLL="$new_path"
56152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56153$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56154  fi
56155
56156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56158
56159    else
56160      # We're on a unix platform. Hooray! :)
56161      path="$MSVC_DLL"
56162      has_space=`$ECHO "$path" | $GREP " "`
56163      if test "x$has_space" != x; then
56164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56165$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56166        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56167      fi
56168
56169      # Use eval to expand a potential ~
56170      eval path="$path"
56171      if test ! -f "$path" && test ! -d "$path"; then
56172        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56173      fi
56174
56175      if test -d "$path"; then
56176        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56177      else
56178        dir="`$DIRNAME "$path"`"
56179        base="`$BASENAME "$path"`"
56180        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56181      fi
56182    fi
56183  fi
56184
56185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56186$as_echo_n "checking for $DLL_NAME... " >&6; }
56187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56188$as_echo "$MSVC_DLL" >&6; }
56189    else
56190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56191$as_echo "incorrect, ignoring" >&6; }
56192      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56193$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56194    fi
56195  fi
56196
56197    fi
56198  fi
56199
56200  if test "x$MSVC_DLL" = x; then
56201    # Probe: Check in the Boot JDK directory.
56202    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56203
56204  DLL_NAME="$DLL_NAME"
56205  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56206  METHOD="well-known location in Boot JDK"
56207  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56208    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56209$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56210
56211    # Need to check if the found msvcr is correct architecture
56212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56213$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56214    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56216      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56217      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56218      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56219        CORRECT_MSVCR_ARCH="PE32 executable"
56220      else
56221        CORRECT_MSVCR_ARCH="PE32+ executable"
56222      fi
56223    else
56224      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56225        CORRECT_MSVCR_ARCH=386
56226      else
56227        CORRECT_MSVCR_ARCH=x86-64
56228      fi
56229    fi
56230    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56232$as_echo "ok" >&6; }
56233      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56234
56235  # Only process if variable expands to non-empty
56236
56237  if test "x$MSVC_DLL" != x; then
56238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56239
56240  # Input might be given as Windows format, start by converting to
56241  # unix format.
56242  path="$MSVC_DLL"
56243  new_path=`$CYGPATH -u "$path"`
56244
56245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56248  # "foo.exe" is OK but "foo" is an error.
56249  #
56250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56251  # It is also a way to make sure we got the proper file name for the real test later on.
56252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56253  if test "x$test_shortpath" = x; then
56254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56255$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56256    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56257  fi
56258
56259  # Call helper function which possibly converts this using DOS-style short mode.
56260  # If so, the updated path is stored in $new_path.
56261
56262  input_path="$new_path"
56263  # Check if we need to convert this using DOS-style short mode. If the path
56264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56265  # take no chances and rewrite it.
56266  # Note: m4 eats our [], so we need to use [ and ] instead.
56267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56268  if test "x$has_forbidden_chars" != x; then
56269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56273      # Going to short mode and back again did indeed matter. Since short mode is
56274      # case insensitive, let's make it lowercase to improve readability.
56275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56276      # Now convert it back to Unix-style (cygpath)
56277      input_path=`$CYGPATH -u "$shortmode_path"`
56278      new_path="$input_path"
56279    fi
56280  fi
56281
56282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56283  if test "x$test_cygdrive_prefix" = x; then
56284    # As a simple fix, exclude /usr/bin since it's not a real path.
56285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56287      # a path prefixed by /cygdrive for fixpath to work.
56288      new_path="$CYGWIN_ROOT_PATH$input_path"
56289    fi
56290  fi
56291
56292
56293  if test "x$path" != "x$new_path"; then
56294    MSVC_DLL="$new_path"
56295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56296$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56297  fi
56298
56299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56300
56301  path="$MSVC_DLL"
56302  has_colon=`$ECHO $path | $GREP ^.:`
56303  new_path="$path"
56304  if test "x$has_colon" = x; then
56305    # Not in mixed or Windows style, start by that.
56306    new_path=`cmd //c echo $path`
56307  fi
56308
56309
56310  input_path="$new_path"
56311  # Check if we need to convert this using DOS-style short mode. If the path
56312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56313  # take no chances and rewrite it.
56314  # Note: m4 eats our [], so we need to use [ and ] instead.
56315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56316  if test "x$has_forbidden_chars" != x; then
56317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56319  fi
56320
56321
56322  windows_path="$new_path"
56323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56324    unix_path=`$CYGPATH -u "$windows_path"`
56325    new_path="$unix_path"
56326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56328    new_path="$unix_path"
56329  fi
56330
56331  if test "x$path" != "x$new_path"; then
56332    MSVC_DLL="$new_path"
56333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56334$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56335  fi
56336
56337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56339
56340    else
56341      # We're on a unix platform. Hooray! :)
56342      path="$MSVC_DLL"
56343      has_space=`$ECHO "$path" | $GREP " "`
56344      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
56348      fi
56349
56350      # Use eval to expand a potential ~
56351      eval path="$path"
56352      if test ! -f "$path" && test ! -d "$path"; then
56353        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56354      fi
56355
56356      if test -d "$path"; then
56357        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56358      else
56359        dir="`$DIRNAME "$path"`"
56360        base="`$BASENAME "$path"`"
56361        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56362      fi
56363    fi
56364  fi
56365
56366      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56367$as_echo_n "checking for $DLL_NAME... " >&6; }
56368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56369$as_echo "$MSVC_DLL" >&6; }
56370    else
56371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56372$as_echo "incorrect, ignoring" >&6; }
56373      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56374$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56375    fi
56376  fi
56377
56378  fi
56379
56380  if test "x$MSVC_DLL" = x; then
56381    # Probe: Look in the Windows system32 directory
56382    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56383
56384  windows_path="$CYGWIN_SYSTEMROOT"
56385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56386    unix_path=`$CYGPATH -u "$windows_path"`
56387    CYGWIN_SYSTEMROOT="$unix_path"
56388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56390    CYGWIN_SYSTEMROOT="$unix_path"
56391  fi
56392
56393    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56394
56395  DLL_NAME="$DLL_NAME"
56396  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56397  METHOD="well-known location in SYSTEMROOT"
56398  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56400$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56401
56402    # Need to check if the found msvcr is correct architecture
56403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56404$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56405    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56407      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56408      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56409      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56410        CORRECT_MSVCR_ARCH="PE32 executable"
56411      else
56412        CORRECT_MSVCR_ARCH="PE32+ executable"
56413      fi
56414    else
56415      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56416        CORRECT_MSVCR_ARCH=386
56417      else
56418        CORRECT_MSVCR_ARCH=x86-64
56419      fi
56420    fi
56421    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56423$as_echo "ok" >&6; }
56424      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56425
56426  # Only process if variable expands to non-empty
56427
56428  if test "x$MSVC_DLL" != x; then
56429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56430
56431  # Input might be given as Windows format, start by converting to
56432  # unix format.
56433  path="$MSVC_DLL"
56434  new_path=`$CYGPATH -u "$path"`
56435
56436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56439  # "foo.exe" is OK but "foo" is an error.
56440  #
56441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56442  # It is also a way to make sure we got the proper file name for the real test later on.
56443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56444  if test "x$test_shortpath" = x; then
56445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56446$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56447    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56448  fi
56449
56450  # Call helper function which possibly converts this using DOS-style short mode.
56451  # If so, the updated path is stored in $new_path.
56452
56453  input_path="$new_path"
56454  # Check if we need to convert this using DOS-style short mode. If the path
56455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56456  # take no chances and rewrite it.
56457  # Note: m4 eats our [], so we need to use [ and ] instead.
56458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56459  if test "x$has_forbidden_chars" != x; then
56460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56464      # Going to short mode and back again did indeed matter. Since short mode is
56465      # case insensitive, let's make it lowercase to improve readability.
56466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56467      # Now convert it back to Unix-style (cygpath)
56468      input_path=`$CYGPATH -u "$shortmode_path"`
56469      new_path="$input_path"
56470    fi
56471  fi
56472
56473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56474  if test "x$test_cygdrive_prefix" = x; then
56475    # As a simple fix, exclude /usr/bin since it's not a real path.
56476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56478      # a path prefixed by /cygdrive for fixpath to work.
56479      new_path="$CYGWIN_ROOT_PATH$input_path"
56480    fi
56481  fi
56482
56483
56484  if test "x$path" != "x$new_path"; then
56485    MSVC_DLL="$new_path"
56486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56487$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56488  fi
56489
56490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56491
56492  path="$MSVC_DLL"
56493  has_colon=`$ECHO $path | $GREP ^.:`
56494  new_path="$path"
56495  if test "x$has_colon" = x; then
56496    # Not in mixed or Windows style, start by that.
56497    new_path=`cmd //c echo $path`
56498  fi
56499
56500
56501  input_path="$new_path"
56502  # Check if we need to convert this using DOS-style short mode. If the path
56503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56504  # take no chances and rewrite it.
56505  # Note: m4 eats our [], so we need to use [ and ] instead.
56506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56507  if test "x$has_forbidden_chars" != x; then
56508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56510  fi
56511
56512
56513  windows_path="$new_path"
56514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56515    unix_path=`$CYGPATH -u "$windows_path"`
56516    new_path="$unix_path"
56517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56519    new_path="$unix_path"
56520  fi
56521
56522  if test "x$path" != "x$new_path"; then
56523    MSVC_DLL="$new_path"
56524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56526  fi
56527
56528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56530
56531    else
56532      # We're on a unix platform. Hooray! :)
56533      path="$MSVC_DLL"
56534      has_space=`$ECHO "$path" | $GREP " "`
56535      if test "x$has_space" != x; then
56536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56537$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56538        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56539      fi
56540
56541      # Use eval to expand a potential ~
56542      eval path="$path"
56543      if test ! -f "$path" && test ! -d "$path"; then
56544        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56545      fi
56546
56547      if test -d "$path"; then
56548        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56549      else
56550        dir="`$DIRNAME "$path"`"
56551        base="`$BASENAME "$path"`"
56552        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56553      fi
56554    fi
56555  fi
56556
56557      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56558$as_echo_n "checking for $DLL_NAME... " >&6; }
56559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56560$as_echo "$MSVC_DLL" >&6; }
56561    else
56562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56563$as_echo "incorrect, ignoring" >&6; }
56564      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56565$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56566    fi
56567  fi
56568
56569  fi
56570
56571  if test "x$MSVC_DLL" = x; then
56572    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56573    if test "x$VS100COMNTOOLS" != x; then
56574      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56575
56576  windows_path="$CYGWIN_VS_TOOLS_DIR"
56577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56578    unix_path=`$CYGPATH -u "$windows_path"`
56579    CYGWIN_VS_TOOLS_DIR="$unix_path"
56580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56582    CYGWIN_VS_TOOLS_DIR="$unix_path"
56583  fi
56584
56585      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56586        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56587	    | $GREP -i /x64/ | $HEAD --lines 1`
56588      else
56589        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56590	    | $GREP -i /x86/ | $HEAD --lines 1`
56591      fi
56592
56593  DLL_NAME="$DLL_NAME"
56594  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56595  METHOD="search of VS100COMNTOOLS"
56596  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56598$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56599
56600    # Need to check if the found msvcr is correct architecture
56601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56602$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56603    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56605      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56606      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56607      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56608        CORRECT_MSVCR_ARCH="PE32 executable"
56609      else
56610        CORRECT_MSVCR_ARCH="PE32+ executable"
56611      fi
56612    else
56613      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56614        CORRECT_MSVCR_ARCH=386
56615      else
56616        CORRECT_MSVCR_ARCH=x86-64
56617      fi
56618    fi
56619    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56621$as_echo "ok" >&6; }
56622      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56623
56624  # Only process if variable expands to non-empty
56625
56626  if test "x$MSVC_DLL" != x; then
56627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56628
56629  # Input might be given as Windows format, start by converting to
56630  # unix format.
56631  path="$MSVC_DLL"
56632  new_path=`$CYGPATH -u "$path"`
56633
56634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56637  # "foo.exe" is OK but "foo" is an error.
56638  #
56639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56640  # It is also a way to make sure we got the proper file name for the real test later on.
56641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56642  if test "x$test_shortpath" = x; then
56643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56644$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56645    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56646  fi
56647
56648  # Call helper function which possibly converts this using DOS-style short mode.
56649  # If so, the updated path is stored in $new_path.
56650
56651  input_path="$new_path"
56652  # Check if we need to convert this using DOS-style short mode. If the path
56653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56654  # take no chances and rewrite it.
56655  # Note: m4 eats our [], so we need to use [ and ] instead.
56656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56657  if test "x$has_forbidden_chars" != x; then
56658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56662      # Going to short mode and back again did indeed matter. Since short mode is
56663      # case insensitive, let's make it lowercase to improve readability.
56664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56665      # Now convert it back to Unix-style (cygpath)
56666      input_path=`$CYGPATH -u "$shortmode_path"`
56667      new_path="$input_path"
56668    fi
56669  fi
56670
56671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56672  if test "x$test_cygdrive_prefix" = x; then
56673    # As a simple fix, exclude /usr/bin since it's not a real path.
56674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56676      # a path prefixed by /cygdrive for fixpath to work.
56677      new_path="$CYGWIN_ROOT_PATH$input_path"
56678    fi
56679  fi
56680
56681
56682  if test "x$path" != "x$new_path"; then
56683    MSVC_DLL="$new_path"
56684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56685$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56686  fi
56687
56688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56689
56690  path="$MSVC_DLL"
56691  has_colon=`$ECHO $path | $GREP ^.:`
56692  new_path="$path"
56693  if test "x$has_colon" = x; then
56694    # Not in mixed or Windows style, start by that.
56695    new_path=`cmd //c echo $path`
56696  fi
56697
56698
56699  input_path="$new_path"
56700  # Check if we need to convert this using DOS-style short mode. If the path
56701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56702  # take no chances and rewrite it.
56703  # Note: m4 eats our [], so we need to use [ and ] instead.
56704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56705  if test "x$has_forbidden_chars" != x; then
56706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56708  fi
56709
56710
56711  windows_path="$new_path"
56712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56713    unix_path=`$CYGPATH -u "$windows_path"`
56714    new_path="$unix_path"
56715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56717    new_path="$unix_path"
56718  fi
56719
56720  if test "x$path" != "x$new_path"; then
56721    MSVC_DLL="$new_path"
56722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56723$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56724  fi
56725
56726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56728
56729    else
56730      # We're on a unix platform. Hooray! :)
56731      path="$MSVC_DLL"
56732      has_space=`$ECHO "$path" | $GREP " "`
56733      if test "x$has_space" != x; then
56734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56735$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56737      fi
56738
56739      # Use eval to expand a potential ~
56740      eval path="$path"
56741      if test ! -f "$path" && test ! -d "$path"; then
56742        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56743      fi
56744
56745      if test -d "$path"; then
56746        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56747      else
56748        dir="`$DIRNAME "$path"`"
56749        base="`$BASENAME "$path"`"
56750        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56751      fi
56752    fi
56753  fi
56754
56755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56756$as_echo_n "checking for $DLL_NAME... " >&6; }
56757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56758$as_echo "$MSVC_DLL" >&6; }
56759    else
56760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56761$as_echo "incorrect, ignoring" >&6; }
56762      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56763$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56764    fi
56765  fi
56766
56767    fi
56768  fi
56769
56770  if test "x$MSVC_DLL" = x; then
56771    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56772    # (This was the original behaviour; kept since it might turn something up)
56773    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56774      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56775        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56776	    | $GREP x64 | $HEAD --lines 1`
56777      else
56778        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56779	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56780        if test "x$POSSIBLE_MSVC_DLL" = x; then
56781          # We're grasping at straws now...
56782          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56783	      | $HEAD --lines 1`
56784        fi
56785      fi
56786
56787
56788  DLL_NAME="$DLL_NAME"
56789  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56790  METHOD="search of VCINSTALLDIR"
56791  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56792    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56793$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56794
56795    # Need to check if the found msvcr is correct architecture
56796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56797$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56798    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56800      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56801      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56802      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56803        CORRECT_MSVCR_ARCH="PE32 executable"
56804      else
56805        CORRECT_MSVCR_ARCH="PE32+ executable"
56806      fi
56807    else
56808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56809        CORRECT_MSVCR_ARCH=386
56810      else
56811        CORRECT_MSVCR_ARCH=x86-64
56812      fi
56813    fi
56814    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56816$as_echo "ok" >&6; }
56817      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56818
56819  # Only process if variable expands to non-empty
56820
56821  if test "x$MSVC_DLL" != x; then
56822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56823
56824  # Input might be given as Windows format, start by converting to
56825  # unix format.
56826  path="$MSVC_DLL"
56827  new_path=`$CYGPATH -u "$path"`
56828
56829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56832  # "foo.exe" is OK but "foo" is an error.
56833  #
56834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56835  # It is also a way to make sure we got the proper file name for the real test later on.
56836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56837  if test "x$test_shortpath" = x; then
56838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56839$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56840    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56841  fi
56842
56843  # Call helper function which possibly converts this using DOS-style short mode.
56844  # If so, the updated path is stored in $new_path.
56845
56846  input_path="$new_path"
56847  # Check if we need to convert this using DOS-style short mode. If the path
56848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56849  # take no chances and rewrite it.
56850  # Note: m4 eats our [], so we need to use [ and ] instead.
56851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56852  if test "x$has_forbidden_chars" != x; then
56853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56857      # Going to short mode and back again did indeed matter. Since short mode is
56858      # case insensitive, let's make it lowercase to improve readability.
56859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56860      # Now convert it back to Unix-style (cygpath)
56861      input_path=`$CYGPATH -u "$shortmode_path"`
56862      new_path="$input_path"
56863    fi
56864  fi
56865
56866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56867  if test "x$test_cygdrive_prefix" = x; then
56868    # As a simple fix, exclude /usr/bin since it's not a real path.
56869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56871      # a path prefixed by /cygdrive for fixpath to work.
56872      new_path="$CYGWIN_ROOT_PATH$input_path"
56873    fi
56874  fi
56875
56876
56877  if test "x$path" != "x$new_path"; then
56878    MSVC_DLL="$new_path"
56879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56880$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56881  fi
56882
56883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56884
56885  path="$MSVC_DLL"
56886  has_colon=`$ECHO $path | $GREP ^.:`
56887  new_path="$path"
56888  if test "x$has_colon" = x; then
56889    # Not in mixed or Windows style, start by that.
56890    new_path=`cmd //c echo $path`
56891  fi
56892
56893
56894  input_path="$new_path"
56895  # Check if we need to convert this using DOS-style short mode. If the path
56896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56897  # take no chances and rewrite it.
56898  # Note: m4 eats our [], so we need to use [ and ] instead.
56899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56900  if test "x$has_forbidden_chars" != x; then
56901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56903  fi
56904
56905
56906  windows_path="$new_path"
56907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56908    unix_path=`$CYGPATH -u "$windows_path"`
56909    new_path="$unix_path"
56910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56912    new_path="$unix_path"
56913  fi
56914
56915  if test "x$path" != "x$new_path"; then
56916    MSVC_DLL="$new_path"
56917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56918$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56919  fi
56920
56921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56923
56924    else
56925      # We're on a unix platform. Hooray! :)
56926      path="$MSVC_DLL"
56927      has_space=`$ECHO "$path" | $GREP " "`
56928      if test "x$has_space" != x; then
56929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56930$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56932      fi
56933
56934      # Use eval to expand a potential ~
56935      eval path="$path"
56936      if test ! -f "$path" && test ! -d "$path"; then
56937        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56938      fi
56939
56940      if test -d "$path"; then
56941        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56942      else
56943        dir="`$DIRNAME "$path"`"
56944        base="`$BASENAME "$path"`"
56945        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56946      fi
56947    fi
56948  fi
56949
56950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56951$as_echo_n "checking for $DLL_NAME... " >&6; }
56952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56953$as_echo "$MSVC_DLL" >&6; }
56954    else
56955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56956$as_echo "incorrect, ignoring" >&6; }
56957      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56958$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56959    fi
56960  fi
56961
56962    fi
56963  fi
56964
56965  if test "x$MSVC_DLL" = x; then
56966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56967$as_echo_n "checking for $DLL_NAME... " >&6; }
56968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56969$as_echo "no" >&6; }
56970    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56971  fi
56972
56973      MSVCP_DLL="$MSVC_DLL"
56974    fi
56975
56976  fi
56977
56978  fi
56979
56980
56981  if test "x$NEEDS_LIB_X11" = xfalse; then
56982    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56983      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56984$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56985    fi
56986    X_CFLAGS=
56987    X_LIBS=
56988  else
56989
56990    if test "x${with_x}" = xno; then
56991      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56992    fi
56993
56994    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56995      # The user has specified a X11 base directory. Use it for includes and
56996      # libraries, unless explicitly overridden.
56997      if test "x$x_includes" = xNONE; then
56998        x_includes="${with_x}/include"
56999      fi
57000      if test "x$x_libraries" = xNONE; then
57001        x_libraries="${with_x}/lib"
57002      fi
57003    else
57004      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57005      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57006      # --x-libraries for the sysroot, if that seems to be correct.
57007      if test "x$SYSROOT" != "x"; then
57008        if test "x$x_includes" = xNONE; then
57009          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57010            x_includes="$SYSROOT/usr/X11R6/include"
57011          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57012            x_includes="$SYSROOT/usr/include"
57013          fi
57014        fi
57015        if test "x$x_libraries" = xNONE; then
57016          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57017            x_libraries="$SYSROOT/usr/X11R6/lib"
57018          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57019            x_libraries="$SYSROOT/usr/lib64"
57020          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57021            x_libraries="$SYSROOT/usr/lib"
57022          fi
57023        fi
57024      fi
57025    fi
57026
57027    # Now let autoconf do it's magic
57028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57029$as_echo_n "checking for X... " >&6; }
57030
57031
57032# Check whether --with-x was given.
57033if test "${with_x+set}" = set; then :
57034  withval=$with_x;
57035fi
57036
57037# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57038if test "x$with_x" = xno; then
57039  # The user explicitly disabled X.
57040  have_x=disabled
57041else
57042  case $x_includes,$x_libraries in #(
57043    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57044    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57045  $as_echo_n "(cached) " >&6
57046else
57047  # One or both of the vars are not set, and there is no cached value.
57048ac_x_includes=no ac_x_libraries=no
57049rm -f -r conftest.dir
57050if mkdir conftest.dir; then
57051  cd conftest.dir
57052  cat >Imakefile <<'_ACEOF'
57053incroot:
57054	@echo incroot='${INCROOT}'
57055usrlibdir:
57056	@echo usrlibdir='${USRLIBDIR}'
57057libdir:
57058	@echo libdir='${LIBDIR}'
57059_ACEOF
57060  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57061    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57062    for ac_var in incroot usrlibdir libdir; do
57063      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57064    done
57065    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57066    for ac_extension in a so sl dylib la dll; do
57067      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57068	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57069	ac_im_usrlibdir=$ac_im_libdir; break
57070      fi
57071    done
57072    # Screen out bogus values from the imake configuration.  They are
57073    # bogus both because they are the default anyway, and because
57074    # using them would break gcc on systems where it needs fixed includes.
57075    case $ac_im_incroot in
57076	/usr/include) ac_x_includes= ;;
57077	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57078    esac
57079    case $ac_im_usrlibdir in
57080	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57081	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57082    esac
57083  fi
57084  cd ..
57085  rm -f -r conftest.dir
57086fi
57087
57088# Standard set of common directories for X headers.
57089# Check X11 before X11Rn because it is often a symlink to the current release.
57090ac_x_header_dirs='
57091/usr/X11/include
57092/usr/X11R7/include
57093/usr/X11R6/include
57094/usr/X11R5/include
57095/usr/X11R4/include
57096
57097/usr/include/X11
57098/usr/include/X11R7
57099/usr/include/X11R6
57100/usr/include/X11R5
57101/usr/include/X11R4
57102
57103/usr/local/X11/include
57104/usr/local/X11R7/include
57105/usr/local/X11R6/include
57106/usr/local/X11R5/include
57107/usr/local/X11R4/include
57108
57109/usr/local/include/X11
57110/usr/local/include/X11R7
57111/usr/local/include/X11R6
57112/usr/local/include/X11R5
57113/usr/local/include/X11R4
57114
57115/usr/X386/include
57116/usr/x386/include
57117/usr/XFree86/include/X11
57118
57119/usr/include
57120/usr/local/include
57121/usr/unsupported/include
57122/usr/athena/include
57123/usr/local/x11r5/include
57124/usr/lpp/Xamples/include
57125
57126/usr/openwin/include
57127/usr/openwin/share/include'
57128
57129if test "$ac_x_includes" = no; then
57130  # Guess where to find include files, by looking for Xlib.h.
57131  # First, try using that file with no special directory specified.
57132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57133/* end confdefs.h.  */
57134#include <X11/Xlib.h>
57135_ACEOF
57136if ac_fn_cxx_try_cpp "$LINENO"; then :
57137  # We can compile using X headers with no special include directory.
57138ac_x_includes=
57139else
57140  for ac_dir in $ac_x_header_dirs; do
57141  if test -r "$ac_dir/X11/Xlib.h"; then
57142    ac_x_includes=$ac_dir
57143    break
57144  fi
57145done
57146fi
57147rm -f conftest.err conftest.i conftest.$ac_ext
57148fi # $ac_x_includes = no
57149
57150if test "$ac_x_libraries" = no; then
57151  # Check for the libraries.
57152  # See if we find them without any special options.
57153  # Don't add to $LIBS permanently.
57154  ac_save_LIBS=$LIBS
57155  LIBS="-lX11 $LIBS"
57156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57157/* end confdefs.h.  */
57158#include <X11/Xlib.h>
57159int
57160main ()
57161{
57162XrmInitialize ()
57163  ;
57164  return 0;
57165}
57166_ACEOF
57167if ac_fn_cxx_try_link "$LINENO"; then :
57168  LIBS=$ac_save_LIBS
57169# We can link X programs with no special library path.
57170ac_x_libraries=
57171else
57172  LIBS=$ac_save_LIBS
57173for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57174do
57175  # Don't even attempt the hair of trying to link an X program!
57176  for ac_extension in a so sl dylib la dll; do
57177    if test -r "$ac_dir/libX11.$ac_extension"; then
57178      ac_x_libraries=$ac_dir
57179      break 2
57180    fi
57181  done
57182done
57183fi
57184rm -f core conftest.err conftest.$ac_objext \
57185    conftest$ac_exeext conftest.$ac_ext
57186fi # $ac_x_libraries = no
57187
57188case $ac_x_includes,$ac_x_libraries in #(
57189  no,* | *,no | *\'*)
57190    # Didn't find X, or a directory has "'" in its name.
57191    ac_cv_have_x="have_x=no";; #(
57192  *)
57193    # Record where we found X for the cache.
57194    ac_cv_have_x="have_x=yes\
57195	ac_x_includes='$ac_x_includes'\
57196	ac_x_libraries='$ac_x_libraries'"
57197esac
57198fi
57199;; #(
57200    *) have_x=yes;;
57201  esac
57202  eval "$ac_cv_have_x"
57203fi # $with_x != no
57204
57205if test "$have_x" != yes; then
57206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57207$as_echo "$have_x" >&6; }
57208  no_x=yes
57209else
57210  # If each of the values was on the command line, it overrides each guess.
57211  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57212  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57213  # Update the cache value to reflect the command line values.
57214  ac_cv_have_x="have_x=yes\
57215	ac_x_includes='$x_includes'\
57216	ac_x_libraries='$x_libraries'"
57217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57218$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57219fi
57220
57221    if test "$no_x" = yes; then
57222  # Not all programs may use this symbol, but it does not hurt to define it.
57223
57224$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57225
57226  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57227else
57228  if test -n "$x_includes"; then
57229    X_CFLAGS="$X_CFLAGS -I$x_includes"
57230  fi
57231
57232  # It would also be nice to do this for all -L options, not just this one.
57233  if test -n "$x_libraries"; then
57234    X_LIBS="$X_LIBS -L$x_libraries"
57235    # For Solaris; some versions of Sun CC require a space after -R and
57236    # others require no space.  Words are not sufficient . . . .
57237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57238$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57239    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57240    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57241    ac_cxx_werror_flag=yes
57242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57243/* end confdefs.h.  */
57244
57245int
57246main ()
57247{
57248
57249  ;
57250  return 0;
57251}
57252_ACEOF
57253if ac_fn_cxx_try_link "$LINENO"; then :
57254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57255$as_echo "no" >&6; }
57256       X_LIBS="$X_LIBS -R$x_libraries"
57257else
57258  LIBS="$ac_xsave_LIBS -R $x_libraries"
57259       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57260/* end confdefs.h.  */
57261
57262int
57263main ()
57264{
57265
57266  ;
57267  return 0;
57268}
57269_ACEOF
57270if ac_fn_cxx_try_link "$LINENO"; then :
57271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57272$as_echo "yes" >&6; }
57273	  X_LIBS="$X_LIBS -R $x_libraries"
57274else
57275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57276$as_echo "neither works" >&6; }
57277fi
57278rm -f core conftest.err conftest.$ac_objext \
57279    conftest$ac_exeext conftest.$ac_ext
57280fi
57281rm -f core conftest.err conftest.$ac_objext \
57282    conftest$ac_exeext conftest.$ac_ext
57283    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57284    LIBS=$ac_xsave_LIBS
57285  fi
57286
57287  # Check for system-dependent libraries X programs must link with.
57288  # Do this before checking for the system-independent R6 libraries
57289  # (-lICE), since we may need -lsocket or whatever for X linking.
57290
57291  if test "$ISC" = yes; then
57292    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57293  else
57294    # Martyn Johnson says this is needed for Ultrix, if the X
57295    # libraries were built with DECnet support.  And Karl Berry says
57296    # the Alpha needs dnet_stub (dnet does not exist).
57297    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57298    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57299/* end confdefs.h.  */
57300
57301/* Override any GCC internal prototype to avoid an error.
57302   Use char because int might match the return type of a GCC
57303   builtin and then its argument prototype would still apply.  */
57304#ifdef __cplusplus
57305extern "C"
57306#endif
57307char XOpenDisplay ();
57308int
57309main ()
57310{
57311return XOpenDisplay ();
57312  ;
57313  return 0;
57314}
57315_ACEOF
57316if ac_fn_cxx_try_link "$LINENO"; then :
57317
57318else
57319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57320$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57321if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57322  $as_echo_n "(cached) " >&6
57323else
57324  ac_check_lib_save_LIBS=$LIBS
57325LIBS="-ldnet  $LIBS"
57326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57327/* end confdefs.h.  */
57328
57329/* Override any GCC internal prototype to avoid an error.
57330   Use char because int might match the return type of a GCC
57331   builtin and then its argument prototype would still apply.  */
57332#ifdef __cplusplus
57333extern "C"
57334#endif
57335char dnet_ntoa ();
57336int
57337main ()
57338{
57339return dnet_ntoa ();
57340  ;
57341  return 0;
57342}
57343_ACEOF
57344if ac_fn_cxx_try_link "$LINENO"; then :
57345  ac_cv_lib_dnet_dnet_ntoa=yes
57346else
57347  ac_cv_lib_dnet_dnet_ntoa=no
57348fi
57349rm -f core conftest.err conftest.$ac_objext \
57350    conftest$ac_exeext conftest.$ac_ext
57351LIBS=$ac_check_lib_save_LIBS
57352fi
57353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57354$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57355if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57356  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57357fi
57358
57359    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57360      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57361$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57362if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57363  $as_echo_n "(cached) " >&6
57364else
57365  ac_check_lib_save_LIBS=$LIBS
57366LIBS="-ldnet_stub  $LIBS"
57367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57368/* end confdefs.h.  */
57369
57370/* Override any GCC internal prototype to avoid an error.
57371   Use char because int might match the return type of a GCC
57372   builtin and then its argument prototype would still apply.  */
57373#ifdef __cplusplus
57374extern "C"
57375#endif
57376char dnet_ntoa ();
57377int
57378main ()
57379{
57380return dnet_ntoa ();
57381  ;
57382  return 0;
57383}
57384_ACEOF
57385if ac_fn_cxx_try_link "$LINENO"; then :
57386  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57387else
57388  ac_cv_lib_dnet_stub_dnet_ntoa=no
57389fi
57390rm -f core conftest.err conftest.$ac_objext \
57391    conftest$ac_exeext conftest.$ac_ext
57392LIBS=$ac_check_lib_save_LIBS
57393fi
57394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57395$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57396if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57397  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57398fi
57399
57400    fi
57401fi
57402rm -f core conftest.err conftest.$ac_objext \
57403    conftest$ac_exeext conftest.$ac_ext
57404    LIBS="$ac_xsave_LIBS"
57405
57406    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57407    # to get the SysV transport functions.
57408    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57409    # needs -lnsl.
57410    # The nsl library prevents programs from opening the X display
57411    # on Irix 5.2, according to T.E. Dickey.
57412    # The functions gethostbyname, getservbyname, and inet_addr are
57413    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57414    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57415if test "x$ac_cv_func_gethostbyname" = xyes; then :
57416
57417fi
57418
57419    if test $ac_cv_func_gethostbyname = no; then
57420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57421$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57422if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57423  $as_echo_n "(cached) " >&6
57424else
57425  ac_check_lib_save_LIBS=$LIBS
57426LIBS="-lnsl  $LIBS"
57427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57428/* end confdefs.h.  */
57429
57430/* Override any GCC internal prototype to avoid an error.
57431   Use char because int might match the return type of a GCC
57432   builtin and then its argument prototype would still apply.  */
57433#ifdef __cplusplus
57434extern "C"
57435#endif
57436char gethostbyname ();
57437int
57438main ()
57439{
57440return gethostbyname ();
57441  ;
57442  return 0;
57443}
57444_ACEOF
57445if ac_fn_cxx_try_link "$LINENO"; then :
57446  ac_cv_lib_nsl_gethostbyname=yes
57447else
57448  ac_cv_lib_nsl_gethostbyname=no
57449fi
57450rm -f core conftest.err conftest.$ac_objext \
57451    conftest$ac_exeext conftest.$ac_ext
57452LIBS=$ac_check_lib_save_LIBS
57453fi
57454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57455$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57456if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57457  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57458fi
57459
57460      if test $ac_cv_lib_nsl_gethostbyname = no; then
57461	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57462$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57463if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57464  $as_echo_n "(cached) " >&6
57465else
57466  ac_check_lib_save_LIBS=$LIBS
57467LIBS="-lbsd  $LIBS"
57468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57469/* end confdefs.h.  */
57470
57471/* Override any GCC internal prototype to avoid an error.
57472   Use char because int might match the return type of a GCC
57473   builtin and then its argument prototype would still apply.  */
57474#ifdef __cplusplus
57475extern "C"
57476#endif
57477char gethostbyname ();
57478int
57479main ()
57480{
57481return gethostbyname ();
57482  ;
57483  return 0;
57484}
57485_ACEOF
57486if ac_fn_cxx_try_link "$LINENO"; then :
57487  ac_cv_lib_bsd_gethostbyname=yes
57488else
57489  ac_cv_lib_bsd_gethostbyname=no
57490fi
57491rm -f core conftest.err conftest.$ac_objext \
57492    conftest$ac_exeext conftest.$ac_ext
57493LIBS=$ac_check_lib_save_LIBS
57494fi
57495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57496$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57497if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57498  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57499fi
57500
57501      fi
57502    fi
57503
57504    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57505    # socket/setsockopt and other routines are undefined under SCO ODT
57506    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57507    # on later versions), says Simon Leinen: it contains gethostby*
57508    # variants that don't use the name server (or something).  -lsocket
57509    # must be given before -lnsl if both are needed.  We assume that
57510    # if connect needs -lnsl, so does gethostbyname.
57511    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57512if test "x$ac_cv_func_connect" = xyes; then :
57513
57514fi
57515
57516    if test $ac_cv_func_connect = no; then
57517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57518$as_echo_n "checking for connect in -lsocket... " >&6; }
57519if ${ac_cv_lib_socket_connect+:} false; then :
57520  $as_echo_n "(cached) " >&6
57521else
57522  ac_check_lib_save_LIBS=$LIBS
57523LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57525/* end confdefs.h.  */
57526
57527/* Override any GCC internal prototype to avoid an error.
57528   Use char because int might match the return type of a GCC
57529   builtin and then its argument prototype would still apply.  */
57530#ifdef __cplusplus
57531extern "C"
57532#endif
57533char connect ();
57534int
57535main ()
57536{
57537return connect ();
57538  ;
57539  return 0;
57540}
57541_ACEOF
57542if ac_fn_cxx_try_link "$LINENO"; then :
57543  ac_cv_lib_socket_connect=yes
57544else
57545  ac_cv_lib_socket_connect=no
57546fi
57547rm -f core conftest.err conftest.$ac_objext \
57548    conftest$ac_exeext conftest.$ac_ext
57549LIBS=$ac_check_lib_save_LIBS
57550fi
57551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57552$as_echo "$ac_cv_lib_socket_connect" >&6; }
57553if test "x$ac_cv_lib_socket_connect" = xyes; then :
57554  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57555fi
57556
57557    fi
57558
57559    # Guillermo Gomez says -lposix is necessary on A/UX.
57560    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57561if test "x$ac_cv_func_remove" = xyes; then :
57562
57563fi
57564
57565    if test $ac_cv_func_remove = no; then
57566      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57567$as_echo_n "checking for remove in -lposix... " >&6; }
57568if ${ac_cv_lib_posix_remove+:} false; then :
57569  $as_echo_n "(cached) " >&6
57570else
57571  ac_check_lib_save_LIBS=$LIBS
57572LIBS="-lposix  $LIBS"
57573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57574/* end confdefs.h.  */
57575
57576/* Override any GCC internal prototype to avoid an error.
57577   Use char because int might match the return type of a GCC
57578   builtin and then its argument prototype would still apply.  */
57579#ifdef __cplusplus
57580extern "C"
57581#endif
57582char remove ();
57583int
57584main ()
57585{
57586return remove ();
57587  ;
57588  return 0;
57589}
57590_ACEOF
57591if ac_fn_cxx_try_link "$LINENO"; then :
57592  ac_cv_lib_posix_remove=yes
57593else
57594  ac_cv_lib_posix_remove=no
57595fi
57596rm -f core conftest.err conftest.$ac_objext \
57597    conftest$ac_exeext conftest.$ac_ext
57598LIBS=$ac_check_lib_save_LIBS
57599fi
57600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57601$as_echo "$ac_cv_lib_posix_remove" >&6; }
57602if test "x$ac_cv_lib_posix_remove" = xyes; then :
57603  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57604fi
57605
57606    fi
57607
57608    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57609    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57610if test "x$ac_cv_func_shmat" = xyes; then :
57611
57612fi
57613
57614    if test $ac_cv_func_shmat = no; then
57615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57616$as_echo_n "checking for shmat in -lipc... " >&6; }
57617if ${ac_cv_lib_ipc_shmat+:} false; then :
57618  $as_echo_n "(cached) " >&6
57619else
57620  ac_check_lib_save_LIBS=$LIBS
57621LIBS="-lipc  $LIBS"
57622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57623/* end confdefs.h.  */
57624
57625/* Override any GCC internal prototype to avoid an error.
57626   Use char because int might match the return type of a GCC
57627   builtin and then its argument prototype would still apply.  */
57628#ifdef __cplusplus
57629extern "C"
57630#endif
57631char shmat ();
57632int
57633main ()
57634{
57635return shmat ();
57636  ;
57637  return 0;
57638}
57639_ACEOF
57640if ac_fn_cxx_try_link "$LINENO"; then :
57641  ac_cv_lib_ipc_shmat=yes
57642else
57643  ac_cv_lib_ipc_shmat=no
57644fi
57645rm -f core conftest.err conftest.$ac_objext \
57646    conftest$ac_exeext conftest.$ac_ext
57647LIBS=$ac_check_lib_save_LIBS
57648fi
57649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57650$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57651if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57652  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57653fi
57654
57655    fi
57656  fi
57657
57658  # Check for libraries that X11R6 Xt/Xaw programs need.
57659  ac_save_LDFLAGS=$LDFLAGS
57660  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57661  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57662  # check for ICE first), but we must link in the order -lSM -lICE or
57663  # we get undefined symbols.  So assume we have SM if we have ICE.
57664  # These have to be linked with before -lX11, unlike the other
57665  # libraries we check for below, so use a different variable.
57666  # John Interrante, Karl Berry
57667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57668$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57669if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57670  $as_echo_n "(cached) " >&6
57671else
57672  ac_check_lib_save_LIBS=$LIBS
57673LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57675/* end confdefs.h.  */
57676
57677/* Override any GCC internal prototype to avoid an error.
57678   Use char because int might match the return type of a GCC
57679   builtin and then its argument prototype would still apply.  */
57680#ifdef __cplusplus
57681extern "C"
57682#endif
57683char IceConnectionNumber ();
57684int
57685main ()
57686{
57687return IceConnectionNumber ();
57688  ;
57689  return 0;
57690}
57691_ACEOF
57692if ac_fn_cxx_try_link "$LINENO"; then :
57693  ac_cv_lib_ICE_IceConnectionNumber=yes
57694else
57695  ac_cv_lib_ICE_IceConnectionNumber=no
57696fi
57697rm -f core conftest.err conftest.$ac_objext \
57698    conftest$ac_exeext conftest.$ac_ext
57699LIBS=$ac_check_lib_save_LIBS
57700fi
57701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57702$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57703if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57704  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57705fi
57706
57707  LDFLAGS=$ac_save_LDFLAGS
57708
57709fi
57710
57711
57712    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57713    # this doesn't make sense so we remove it.
57714    if test "x$COMPILE_TYPE" = xcross; then
57715      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57716    fi
57717
57718    if test "x$no_x" = xyes; then
57719
57720  # Print a helpful message on how to acquire the necessary build dependency.
57721  # x11 is the help tag: freetype, cups, alsa etc
57722  MISSING_DEPENDENCY=x11
57723
57724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57725    cygwin_help $MISSING_DEPENDENCY
57726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57727    msys_help $MISSING_DEPENDENCY
57728  else
57729    PKGHANDLER_COMMAND=
57730
57731    case $PKGHANDLER in
57732      apt-get)
57733        apt_help     $MISSING_DEPENDENCY ;;
57734      yum)
57735        yum_help     $MISSING_DEPENDENCY ;;
57736      brew)
57737        brew_help    $MISSING_DEPENDENCY ;;
57738      port)
57739        port_help    $MISSING_DEPENDENCY ;;
57740      pkgutil)
57741        pkgutil_help $MISSING_DEPENDENCY ;;
57742      pkgadd)
57743        pkgadd_help  $MISSING_DEPENDENCY ;;
57744    esac
57745
57746    if test "x$PKGHANDLER_COMMAND" != x; then
57747      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57748    fi
57749  fi
57750
57751      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57752    fi
57753
57754    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57755      OPENWIN_HOME="/usr/openwin"
57756      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57757      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57758          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57759    fi
57760
57761    ac_ext=c
57762ac_cpp='$CPP $CPPFLAGS'
57763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57765ac_compiler_gnu=$ac_cv_c_compiler_gnu
57766
57767    OLD_CFLAGS="$CFLAGS"
57768    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57769
57770    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57771    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57772do :
57773  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57774ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57775          # include <X11/Xlib.h>
57776          # include <X11/Xutil.h>
57777
57778
57779"
57780if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57781  cat >>confdefs.h <<_ACEOF
57782#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57783_ACEOF
57784 X11_HEADERS_OK=yes
57785else
57786  X11_HEADERS_OK=no; break
57787fi
57788
57789done
57790
57791
57792    if test "x$X11_HEADERS_OK" = xno; then
57793
57794  # Print a helpful message on how to acquire the necessary build dependency.
57795  # x11 is the help tag: freetype, cups, alsa etc
57796  MISSING_DEPENDENCY=x11
57797
57798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57799    cygwin_help $MISSING_DEPENDENCY
57800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57801    msys_help $MISSING_DEPENDENCY
57802  else
57803    PKGHANDLER_COMMAND=
57804
57805    case $PKGHANDLER in
57806      apt-get)
57807        apt_help     $MISSING_DEPENDENCY ;;
57808      yum)
57809        yum_help     $MISSING_DEPENDENCY ;;
57810      brew)
57811        brew_help    $MISSING_DEPENDENCY ;;
57812      port)
57813        port_help    $MISSING_DEPENDENCY ;;
57814      pkgutil)
57815        pkgutil_help $MISSING_DEPENDENCY ;;
57816      pkgadd)
57817        pkgadd_help  $MISSING_DEPENDENCY ;;
57818    esac
57819
57820    if test "x$PKGHANDLER_COMMAND" != x; then
57821      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57822    fi
57823  fi
57824
57825      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57826    fi
57827
57828    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57829    # defined in libawt_xawt.
57830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57831$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57832    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57833/* end confdefs.h.  */
57834#include <X11/extensions/Xrender.h>
57835int
57836main ()
57837{
57838XLinearGradient x;
57839  ;
57840  return 0;
57841}
57842_ACEOF
57843if ac_fn_c_try_compile "$LINENO"; then :
57844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57845$as_echo "yes" >&6; }
57846else
57847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57848$as_echo "no" >&6; }
57849         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57850fi
57851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57852
57853    CFLAGS="$OLD_CFLAGS"
57854    ac_ext=cpp
57855ac_cpp='$CXXCPP $CPPFLAGS'
57856ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57857ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57858ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57859
57860  fi # NEEDS_LIB_X11
57861
57862
57863
57864
57865
57866
57867# Check whether --with-cups was given.
57868if test "${with_cups+set}" = set; then :
57869  withval=$with_cups;
57870fi
57871
57872
57873# Check whether --with-cups-include was given.
57874if test "${with_cups_include+set}" = set; then :
57875  withval=$with_cups_include;
57876fi
57877
57878
57879  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57880    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57881        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57882      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57883$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57884    fi
57885    CUPS_CFLAGS=
57886  else
57887    CUPS_FOUND=no
57888
57889    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57890      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57891    fi
57892
57893    if test "x${with_cups}" != x; then
57894      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57895$as_echo_n "checking for cups headers... " >&6; }
57896      if test -s "${with_cups}/include/cups/cups.h"; then
57897        CUPS_CFLAGS="-I${with_cups}/include"
57898        CUPS_FOUND=yes
57899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57900$as_echo "$CUPS_FOUND" >&6; }
57901      else
57902        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57903      fi
57904    fi
57905    if test "x${with_cups_include}" != x; then
57906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57907$as_echo_n "checking for cups headers... " >&6; }
57908      if test -s "${with_cups_include}/cups/cups.h"; then
57909        CUPS_CFLAGS="-I${with_cups_include}"
57910        CUPS_FOUND=yes
57911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57912$as_echo "$CUPS_FOUND" >&6; }
57913      else
57914        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57915      fi
57916    fi
57917    if test "x$CUPS_FOUND" = xno; then
57918      # Are the cups headers installed in the default /usr/include location?
57919      for ac_header in cups/cups.h cups/ppd.h
57920do :
57921  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57922ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57923if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57924  cat >>confdefs.h <<_ACEOF
57925#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57926_ACEOF
57927
57928          CUPS_FOUND=yes
57929          CUPS_CFLAGS=
57930          DEFAULT_CUPS=yes
57931
57932fi
57933
57934done
57935
57936    fi
57937    if test "x$CUPS_FOUND" = xno; then
57938
57939  # Print a helpful message on how to acquire the necessary build dependency.
57940  # cups is the help tag: freetype, cups, alsa etc
57941  MISSING_DEPENDENCY=cups
57942
57943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57944    cygwin_help $MISSING_DEPENDENCY
57945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57946    msys_help $MISSING_DEPENDENCY
57947  else
57948    PKGHANDLER_COMMAND=
57949
57950    case $PKGHANDLER in
57951      apt-get)
57952        apt_help     $MISSING_DEPENDENCY ;;
57953      yum)
57954        yum_help     $MISSING_DEPENDENCY ;;
57955      brew)
57956        brew_help    $MISSING_DEPENDENCY ;;
57957      port)
57958        port_help    $MISSING_DEPENDENCY ;;
57959      pkgutil)
57960        pkgutil_help $MISSING_DEPENDENCY ;;
57961      pkgadd)
57962        pkgadd_help  $MISSING_DEPENDENCY ;;
57963    esac
57964
57965    if test "x$PKGHANDLER_COMMAND" != x; then
57966      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57967    fi
57968  fi
57969
57970      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57971    fi
57972  fi
57973
57974
57975
57976
57977
57978# Check whether --with-freetype was given.
57979if test "${with_freetype+set}" = set; then :
57980  withval=$with_freetype;
57981fi
57982
57983
57984# Check whether --with-freetype-include was given.
57985if test "${with_freetype_include+set}" = set; then :
57986  withval=$with_freetype_include;
57987fi
57988
57989
57990# Check whether --with-freetype-lib was given.
57991if test "${with_freetype_lib+set}" = set; then :
57992  withval=$with_freetype_lib;
57993fi
57994
57995
57996# Check whether --with-freetype-src was given.
57997if test "${with_freetype_src+set}" = set; then :
57998  withval=$with_freetype_src;
57999fi
58000
58001  # Check whether --enable-freetype-bundling was given.
58002if test "${enable_freetype_bundling+set}" = set; then :
58003  enableval=$enable_freetype_bundling;
58004fi
58005
58006
58007# Check whether --with-freetype-license was given.
58008if test "${with_freetype_license+set}" = set; then :
58009  withval=$with_freetype_license;
58010fi
58011
58012
58013  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58014  FREETYPE_BASE_NAME=freetype
58015  FREETYPE_CFLAGS=
58016  FREETYPE_LIBS=
58017  FREETYPE_BUNDLE_LIB_PATH=
58018
58019  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58020    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58021        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58022        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58023        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58024      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58025$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58026    fi
58027    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58028      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58029$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58030    fi
58031  else
58032    # freetype is needed to build; go get it!
58033
58034    BUNDLE_FREETYPE="$enable_freetype_bundling"
58035
58036    if  test "x$with_freetype_src" != x; then
58037      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58038        # Try to build freetype if --with-freetype-src was given on Windows
58039
58040  FREETYPE_SRC_PATH="$with_freetype_src"
58041  BUILD_FREETYPE=yes
58042
58043  # Check if the freetype sources are acessible..
58044  if ! test -d $FREETYPE_SRC_PATH; then
58045    { $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
58046$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58047    BUILD_FREETYPE=no
58048  fi
58049  # ..and contain a vc2010 project file
58050  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58051  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58052    { $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
58053$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58054    BUILD_FREETYPE=no
58055  fi
58056  # Now check if configure found a version of 'msbuild.exe'
58057  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58058    { $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
58059$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;}
58060    BUILD_FREETYPE=no
58061  fi
58062
58063  # Ready to go..
58064  if test "x$BUILD_FREETYPE" = xyes; then
58065    # msbuild requires trailing slashes for output directories
58066    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58067    freetype_lib_path_unix="$freetype_lib_path"
58068    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58069
58070  unix_path="$vcxproj_path"
58071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58072    windows_path=`$CYGPATH -m "$unix_path"`
58073    vcxproj_path="$windows_path"
58074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58075    windows_path=`cmd //c echo $unix_path`
58076    vcxproj_path="$windows_path"
58077  fi
58078
58079
58080  unix_path="$freetype_lib_path"
58081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58082    windows_path=`$CYGPATH -m "$unix_path"`
58083    freetype_lib_path="$windows_path"
58084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58085    windows_path=`cmd //c echo $unix_path`
58086    freetype_lib_path="$windows_path"
58087  fi
58088
58089
58090  unix_path="$freetype_obj_path"
58091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58092    windows_path=`$CYGPATH -m "$unix_path"`
58093    freetype_obj_path="$windows_path"
58094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58095    windows_path=`cmd //c echo $unix_path`
58096    freetype_obj_path="$windows_path"
58097  fi
58098
58099    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58100      freetype_platform=x64
58101    else
58102      freetype_platform=win32
58103    fi
58104
58105    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58106    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58107    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58108    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58109    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58110$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58111
58112    # First we try to build the freetype.dll
58113    $ECHO -e "@echo off\n"\
58114        "$MSBUILD $vcxproj_path "\
58115        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58116        "/p:Configuration=\"Release Multithreaded\" "\
58117        "/p:Platform=$freetype_platform "\
58118        "/p:ConfigurationType=DynamicLibrary "\
58119        "/p:TargetName=freetype "\
58120        "/p:OutDir=\"$freetype_lib_path\" "\
58121        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58122    cmd /c freetype.bat
58123
58124    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58125      # If that succeeds we also build freetype.lib
58126      $ECHO -e "@echo off\n"\
58127          "$MSBUILD $vcxproj_path "\
58128          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58129          "/p:Configuration=\"Release Multithreaded\" "\
58130          "/p:Platform=$freetype_platform "\
58131          "/p:ConfigurationType=StaticLibrary "\
58132          "/p:TargetName=freetype "\
58133          "/p:OutDir=\"$freetype_lib_path\" "\
58134          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58135      cmd /c freetype.bat
58136
58137      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58138        # Once we build both, lib and dll, set freetype lib and include path appropriately
58139        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58140        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58141        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58142$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58143      else
58144        BUILD_FREETYPE=no
58145      fi
58146    else
58147      BUILD_FREETYPE=no
58148    fi
58149  fi
58150
58151        if test "x$BUILD_FREETYPE" = xyes; then
58152          # Okay, we built it. Check that it works.
58153
58154  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58155  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58156  METHOD="--with-freetype-src"
58157
58158  # Let's start with an optimistic view of the world :-)
58159  FOUND_FREETYPE=yes
58160
58161  # First look for the canonical freetype main include file ft2build.h.
58162  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58163    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58164    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58165    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58166      # Fail.
58167      FOUND_FREETYPE=no
58168    fi
58169  fi
58170
58171  if test "x$FOUND_FREETYPE" = xyes; then
58172    # Include file found, let's continue the sanity check.
58173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58174$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58175
58176    # Reset to default value
58177    FREETYPE_BASE_NAME=freetype
58178    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58179    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58180      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58181          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58182        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58183        # for the .6 version explicitly.
58184        FREETYPE_BASE_NAME=freetype.6
58185        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58186        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58187$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58188      else
58189        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58190$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58191        FOUND_FREETYPE=no
58192      fi
58193    else
58194      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58195        # On Windows, we will need both .lib and .dll file.
58196        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58197          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58198$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58199          FOUND_FREETYPE=no
58200        fi
58201      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58202          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58203        # Found lib in isa dir, use that instead.
58204        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58205        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58206$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58207      fi
58208    fi
58209  fi
58210
58211  if test "x$FOUND_FREETYPE" = xyes; then
58212
58213  # Only process if variable expands to non-empty
58214
58215  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58217
58218  # Input might be given as Windows format, start by converting to
58219  # unix format.
58220  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58221  new_path=`$CYGPATH -u "$path"`
58222
58223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58226  # "foo.exe" is OK but "foo" is an error.
58227  #
58228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58229  # It is also a way to make sure we got the proper file name for the real test later on.
58230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58231  if test "x$test_shortpath" = x; then
58232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58233$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58234    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58235  fi
58236
58237  # Call helper function which possibly converts this using DOS-style short mode.
58238  # If so, the updated path is stored in $new_path.
58239
58240  input_path="$new_path"
58241  # Check if we need to convert this using DOS-style short mode. If the path
58242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58243  # take no chances and rewrite it.
58244  # Note: m4 eats our [], so we need to use [ and ] instead.
58245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58246  if test "x$has_forbidden_chars" != x; then
58247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58251      # Going to short mode and back again did indeed matter. Since short mode is
58252      # case insensitive, let's make it lowercase to improve readability.
58253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58254      # Now convert it back to Unix-style (cygpath)
58255      input_path=`$CYGPATH -u "$shortmode_path"`
58256      new_path="$input_path"
58257    fi
58258  fi
58259
58260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58261  if test "x$test_cygdrive_prefix" = x; then
58262    # As a simple fix, exclude /usr/bin since it's not a real path.
58263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58265      # a path prefixed by /cygdrive for fixpath to work.
58266      new_path="$CYGWIN_ROOT_PATH$input_path"
58267    fi
58268  fi
58269
58270
58271  if test "x$path" != "x$new_path"; then
58272    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58275  fi
58276
58277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58278
58279  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58280  has_colon=`$ECHO $path | $GREP ^.:`
58281  new_path="$path"
58282  if test "x$has_colon" = x; then
58283    # Not in mixed or Windows style, start by that.
58284    new_path=`cmd //c echo $path`
58285  fi
58286
58287
58288  input_path="$new_path"
58289  # Check if we need to convert this using DOS-style short mode. If the path
58290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58291  # take no chances and rewrite it.
58292  # Note: m4 eats our [], so we need to use [ and ] instead.
58293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58294  if test "x$has_forbidden_chars" != x; then
58295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58297  fi
58298
58299
58300  windows_path="$new_path"
58301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58302    unix_path=`$CYGPATH -u "$windows_path"`
58303    new_path="$unix_path"
58304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58306    new_path="$unix_path"
58307  fi
58308
58309  if test "x$path" != "x$new_path"; then
58310    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58313  fi
58314
58315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58317
58318    else
58319      # We're on a unix platform. Hooray! :)
58320      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58321      has_space=`$ECHO "$path" | $GREP " "`
58322      if test "x$has_space" != x; then
58323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58326      fi
58327
58328      # Use eval to expand a potential ~
58329      eval path="$path"
58330      if test ! -f "$path" && test ! -d "$path"; then
58331        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58332      fi
58333
58334      if test -d "$path"; then
58335        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58336      else
58337        dir="`$DIRNAME "$path"`"
58338        base="`$BASENAME "$path"`"
58339        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58340      fi
58341    fi
58342  fi
58343
58344
58345  # Only process if variable expands to non-empty
58346
58347  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58349
58350  # Input might be given as Windows format, start by converting to
58351  # unix format.
58352  path="$POTENTIAL_FREETYPE_LIB_PATH"
58353  new_path=`$CYGPATH -u "$path"`
58354
58355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58358  # "foo.exe" is OK but "foo" is an error.
58359  #
58360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58361  # It is also a way to make sure we got the proper file name for the real test later on.
58362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58363  if test "x$test_shortpath" = x; then
58364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58365$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58366    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58367  fi
58368
58369  # Call helper function which possibly converts this using DOS-style short mode.
58370  # If so, the updated path is stored in $new_path.
58371
58372  input_path="$new_path"
58373  # Check if we need to convert this using DOS-style short mode. If the path
58374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58375  # take no chances and rewrite it.
58376  # Note: m4 eats our [], so we need to use [ and ] instead.
58377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58378  if test "x$has_forbidden_chars" != x; then
58379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58383      # Going to short mode and back again did indeed matter. Since short mode is
58384      # case insensitive, let's make it lowercase to improve readability.
58385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58386      # Now convert it back to Unix-style (cygpath)
58387      input_path=`$CYGPATH -u "$shortmode_path"`
58388      new_path="$input_path"
58389    fi
58390  fi
58391
58392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58393  if test "x$test_cygdrive_prefix" = x; then
58394    # As a simple fix, exclude /usr/bin since it's not a real path.
58395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58397      # a path prefixed by /cygdrive for fixpath to work.
58398      new_path="$CYGWIN_ROOT_PATH$input_path"
58399    fi
58400  fi
58401
58402
58403  if test "x$path" != "x$new_path"; then
58404    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58406$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58407  fi
58408
58409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58410
58411  path="$POTENTIAL_FREETYPE_LIB_PATH"
58412  has_colon=`$ECHO $path | $GREP ^.:`
58413  new_path="$path"
58414  if test "x$has_colon" = x; then
58415    # Not in mixed or Windows style, start by that.
58416    new_path=`cmd //c echo $path`
58417  fi
58418
58419
58420  input_path="$new_path"
58421  # Check if we need to convert this using DOS-style short mode. If the path
58422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58423  # take no chances and rewrite it.
58424  # Note: m4 eats our [], so we need to use [ and ] instead.
58425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58426  if test "x$has_forbidden_chars" != x; then
58427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58429  fi
58430
58431
58432  windows_path="$new_path"
58433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58434    unix_path=`$CYGPATH -u "$windows_path"`
58435    new_path="$unix_path"
58436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58438    new_path="$unix_path"
58439  fi
58440
58441  if test "x$path" != "x$new_path"; then
58442    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58445  fi
58446
58447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58449
58450    else
58451      # We're on a unix platform. Hooray! :)
58452      path="$POTENTIAL_FREETYPE_LIB_PATH"
58453      has_space=`$ECHO "$path" | $GREP " "`
58454      if test "x$has_space" != x; then
58455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58456$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58458      fi
58459
58460      # Use eval to expand a potential ~
58461      eval path="$path"
58462      if test ! -f "$path" && test ! -d "$path"; then
58463        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58464      fi
58465
58466      if test -d "$path"; then
58467        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58468      else
58469        dir="`$DIRNAME "$path"`"
58470        base="`$BASENAME "$path"`"
58471        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58472      fi
58473    fi
58474  fi
58475
58476
58477    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58479$as_echo_n "checking for freetype includes... " >&6; }
58480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58481$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58482    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58484$as_echo_n "checking for freetype libraries... " >&6; }
58485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58486$as_echo "$FREETYPE_LIB_PATH" >&6; }
58487  fi
58488
58489          if test "x$FOUND_FREETYPE" != xyes; then
58490            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58491          fi
58492        else
58493          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58494$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58495          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58496        fi
58497      else
58498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58499$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58500      fi
58501    fi
58502
58503    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58504      # User has specified settings
58505
58506      if test "x$BUNDLE_FREETYPE" = x; then
58507        # If not specified, default is to bundle freetype
58508        BUNDLE_FREETYPE=yes
58509      fi
58510
58511      if test "x$with_freetype" != x; then
58512        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58513        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58514      fi
58515
58516      # Allow --with-freetype-lib and --with-freetype-include to override
58517      if test "x$with_freetype_include" != x; then
58518        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58519      fi
58520      if test "x$with_freetype_lib" != x; then
58521        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58522      fi
58523
58524      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58525        # Okay, we got it. Check that it works.
58526
58527  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58528  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58529  METHOD="--with-freetype"
58530
58531  # Let's start with an optimistic view of the world :-)
58532  FOUND_FREETYPE=yes
58533
58534  # First look for the canonical freetype main include file ft2build.h.
58535  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58536    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58537    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58538    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58539      # Fail.
58540      FOUND_FREETYPE=no
58541    fi
58542  fi
58543
58544  if test "x$FOUND_FREETYPE" = xyes; then
58545    # Include file found, let's continue the sanity check.
58546    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58547$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58548
58549    # Reset to default value
58550    FREETYPE_BASE_NAME=freetype
58551    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58552    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58553      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58554          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58555        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58556        # for the .6 version explicitly.
58557        FREETYPE_BASE_NAME=freetype.6
58558        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58559        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58560$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58561      else
58562        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58563$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58564        FOUND_FREETYPE=no
58565      fi
58566    else
58567      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58568        # On Windows, we will need both .lib and .dll file.
58569        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58570          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58571$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58572          FOUND_FREETYPE=no
58573        fi
58574      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58575          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58576        # Found lib in isa dir, use that instead.
58577        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58578        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58579$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58580      fi
58581    fi
58582  fi
58583
58584  if test "x$FOUND_FREETYPE" = xyes; then
58585
58586  # Only process if variable expands to non-empty
58587
58588  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58590
58591  # Input might be given as Windows format, start by converting to
58592  # unix format.
58593  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58594  new_path=`$CYGPATH -u "$path"`
58595
58596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58599  # "foo.exe" is OK but "foo" is an error.
58600  #
58601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58602  # It is also a way to make sure we got the proper file name for the real test later on.
58603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58604  if test "x$test_shortpath" = x; then
58605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58607    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58608  fi
58609
58610  # Call helper function which possibly converts this using DOS-style short mode.
58611  # If so, the updated path is stored in $new_path.
58612
58613  input_path="$new_path"
58614  # Check if we need to convert this using DOS-style short mode. If the path
58615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58616  # take no chances and rewrite it.
58617  # Note: m4 eats our [], so we need to use [ and ] instead.
58618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58619  if test "x$has_forbidden_chars" != x; then
58620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58624      # Going to short mode and back again did indeed matter. Since short mode is
58625      # case insensitive, let's make it lowercase to improve readability.
58626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58627      # Now convert it back to Unix-style (cygpath)
58628      input_path=`$CYGPATH -u "$shortmode_path"`
58629      new_path="$input_path"
58630    fi
58631  fi
58632
58633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58634  if test "x$test_cygdrive_prefix" = x; then
58635    # As a simple fix, exclude /usr/bin since it's not a real path.
58636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58638      # a path prefixed by /cygdrive for fixpath to work.
58639      new_path="$CYGWIN_ROOT_PATH$input_path"
58640    fi
58641  fi
58642
58643
58644  if test "x$path" != "x$new_path"; then
58645    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58648  fi
58649
58650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58651
58652  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58653  has_colon=`$ECHO $path | $GREP ^.:`
58654  new_path="$path"
58655  if test "x$has_colon" = x; then
58656    # Not in mixed or Windows style, start by that.
58657    new_path=`cmd //c echo $path`
58658  fi
58659
58660
58661  input_path="$new_path"
58662  # Check if we need to convert this using DOS-style short mode. If the path
58663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58664  # take no chances and rewrite it.
58665  # Note: m4 eats our [], so we need to use [ and ] instead.
58666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58667  if test "x$has_forbidden_chars" != x; then
58668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58670  fi
58671
58672
58673  windows_path="$new_path"
58674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58675    unix_path=`$CYGPATH -u "$windows_path"`
58676    new_path="$unix_path"
58677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58679    new_path="$unix_path"
58680  fi
58681
58682  if test "x$path" != "x$new_path"; then
58683    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58686  fi
58687
58688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58690
58691    else
58692      # We're on a unix platform. Hooray! :)
58693      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58694      has_space=`$ECHO "$path" | $GREP " "`
58695      if test "x$has_space" != x; then
58696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58699      fi
58700
58701      # Use eval to expand a potential ~
58702      eval path="$path"
58703      if test ! -f "$path" && test ! -d "$path"; then
58704        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58705      fi
58706
58707      if test -d "$path"; then
58708        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58709      else
58710        dir="`$DIRNAME "$path"`"
58711        base="`$BASENAME "$path"`"
58712        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58713      fi
58714    fi
58715  fi
58716
58717
58718  # Only process if variable expands to non-empty
58719
58720  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58722
58723  # Input might be given as Windows format, start by converting to
58724  # unix format.
58725  path="$POTENTIAL_FREETYPE_LIB_PATH"
58726  new_path=`$CYGPATH -u "$path"`
58727
58728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58731  # "foo.exe" is OK but "foo" is an error.
58732  #
58733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58734  # It is also a way to make sure we got the proper file name for the real test later on.
58735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58736  if test "x$test_shortpath" = x; then
58737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58739    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58740  fi
58741
58742  # Call helper function which possibly converts this using DOS-style short mode.
58743  # If so, the updated path is stored in $new_path.
58744
58745  input_path="$new_path"
58746  # Check if we need to convert this using DOS-style short mode. If the path
58747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58748  # take no chances and rewrite it.
58749  # Note: m4 eats our [], so we need to use [ and ] instead.
58750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58751  if test "x$has_forbidden_chars" != x; then
58752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58756      # Going to short mode and back again did indeed matter. Since short mode is
58757      # case insensitive, let's make it lowercase to improve readability.
58758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58759      # Now convert it back to Unix-style (cygpath)
58760      input_path=`$CYGPATH -u "$shortmode_path"`
58761      new_path="$input_path"
58762    fi
58763  fi
58764
58765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58766  if test "x$test_cygdrive_prefix" = x; then
58767    # As a simple fix, exclude /usr/bin since it's not a real path.
58768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58770      # a path prefixed by /cygdrive for fixpath to work.
58771      new_path="$CYGWIN_ROOT_PATH$input_path"
58772    fi
58773  fi
58774
58775
58776  if test "x$path" != "x$new_path"; then
58777    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58780  fi
58781
58782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58783
58784  path="$POTENTIAL_FREETYPE_LIB_PATH"
58785  has_colon=`$ECHO $path | $GREP ^.:`
58786  new_path="$path"
58787  if test "x$has_colon" = x; then
58788    # Not in mixed or Windows style, start by that.
58789    new_path=`cmd //c echo $path`
58790  fi
58791
58792
58793  input_path="$new_path"
58794  # Check if we need to convert this using DOS-style short mode. If the path
58795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58796  # take no chances and rewrite it.
58797  # Note: m4 eats our [], so we need to use [ and ] instead.
58798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58799  if test "x$has_forbidden_chars" != x; then
58800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58802  fi
58803
58804
58805  windows_path="$new_path"
58806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58807    unix_path=`$CYGPATH -u "$windows_path"`
58808    new_path="$unix_path"
58809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58811    new_path="$unix_path"
58812  fi
58813
58814  if test "x$path" != "x$new_path"; then
58815    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58817$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58818  fi
58819
58820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58822
58823    else
58824      # We're on a unix platform. Hooray! :)
58825      path="$POTENTIAL_FREETYPE_LIB_PATH"
58826      has_space=`$ECHO "$path" | $GREP " "`
58827      if test "x$has_space" != x; then
58828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58831      fi
58832
58833      # Use eval to expand a potential ~
58834      eval path="$path"
58835      if test ! -f "$path" && test ! -d "$path"; then
58836        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58837      fi
58838
58839      if test -d "$path"; then
58840        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58841      else
58842        dir="`$DIRNAME "$path"`"
58843        base="`$BASENAME "$path"`"
58844        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58845      fi
58846    fi
58847  fi
58848
58849
58850    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58852$as_echo_n "checking for freetype includes... " >&6; }
58853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58854$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58855    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58857$as_echo_n "checking for freetype libraries... " >&6; }
58858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58859$as_echo "$FREETYPE_LIB_PATH" >&6; }
58860  fi
58861
58862        if test "x$FOUND_FREETYPE" != xyes; then
58863          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58864        fi
58865      else
58866        # User specified only one of lib or include. This is an error.
58867        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58868          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58869$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58870          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58871        else
58872          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58873$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58874          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58875        fi
58876      fi
58877    else
58878      # User did not specify settings, but we need freetype. Try to locate it.
58879
58880      if test "x$BUNDLE_FREETYPE" = x; then
58881        # If not specified, default is to bundle freetype only on windows
58882        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58883          BUNDLE_FREETYPE=yes
58884        else
58885          BUNDLE_FREETYPE=no
58886        fi
58887      fi
58888
58889      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58890      if test "x$SYSROOT" = x; then
58891        if test "x$FOUND_FREETYPE" != xyes; then
58892          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58893          if test "x$PKG_CONFIG" != x; then
58894
58895pkg_failed=no
58896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58897$as_echo_n "checking for FREETYPE... " >&6; }
58898
58899if test -n "$FREETYPE_CFLAGS"; then
58900    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58901 elif test -n "$PKG_CONFIG"; then
58902    if test -n "$PKG_CONFIG" && \
58903    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58904  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58905  ac_status=$?
58906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58907  test $ac_status = 0; }; then
58908  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58909else
58910  pkg_failed=yes
58911fi
58912 else
58913    pkg_failed=untried
58914fi
58915if test -n "$FREETYPE_LIBS"; then
58916    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58917 elif test -n "$PKG_CONFIG"; then
58918    if test -n "$PKG_CONFIG" && \
58919    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58920  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58921  ac_status=$?
58922  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58923  test $ac_status = 0; }; then
58924  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58925else
58926  pkg_failed=yes
58927fi
58928 else
58929    pkg_failed=untried
58930fi
58931
58932
58933
58934if test $pkg_failed = yes; then
58935
58936if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58937        _pkg_short_errors_supported=yes
58938else
58939        _pkg_short_errors_supported=no
58940fi
58941        if test $_pkg_short_errors_supported = yes; then
58942	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58943        else
58944	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58945        fi
58946	# Put the nasty error message in config.log where it belongs
58947	echo "$FREETYPE_PKG_ERRORS" >&5
58948
58949	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58950$as_echo "no" >&6; }
58951                FOUND_FREETYPE=no
58952elif test $pkg_failed = untried; then
58953	FOUND_FREETYPE=no
58954else
58955	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58956	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58958$as_echo "yes" >&6; }
58959	FOUND_FREETYPE=yes
58960fi
58961            if test "x$FOUND_FREETYPE" = xyes; then
58962              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58963              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58964              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58965              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58966                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58967              fi
58968              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58969              if test "x$BUNDLE_FREETYPE" = xyes; then
58970                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58971$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58972                FOUND_FREETYPE=no
58973              else
58974                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58975$as_echo_n "checking for freetype... " >&6; }
58976                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58977$as_echo "yes (using pkg-config)" >&6; }
58978              fi
58979            fi
58980          fi
58981        fi
58982      fi
58983
58984      if test "x$FOUND_FREETYPE" != xyes; then
58985        # Check in well-known locations
58986        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58987          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58988
58989  windows_path="$FREETYPE_BASE_DIR"
58990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58991    unix_path=`$CYGPATH -u "$windows_path"`
58992    FREETYPE_BASE_DIR="$unix_path"
58993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58995    FREETYPE_BASE_DIR="$unix_path"
58996  fi
58997
58998
58999  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59000  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59001  METHOD="well-known location"
59002
59003  # Let's start with an optimistic view of the world :-)
59004  FOUND_FREETYPE=yes
59005
59006  # First look for the canonical freetype main include file ft2build.h.
59007  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59008    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59009    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59010    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59011      # Fail.
59012      FOUND_FREETYPE=no
59013    fi
59014  fi
59015
59016  if test "x$FOUND_FREETYPE" = xyes; then
59017    # Include file found, let's continue the sanity check.
59018    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59019$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59020
59021    # Reset to default value
59022    FREETYPE_BASE_NAME=freetype
59023    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59024    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59025      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59026          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59027        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59028        # for the .6 version explicitly.
59029        FREETYPE_BASE_NAME=freetype.6
59030        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59031        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59032$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59033      else
59034        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59035$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59036        FOUND_FREETYPE=no
59037      fi
59038    else
59039      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59040        # On Windows, we will need both .lib and .dll file.
59041        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59042          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59043$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59044          FOUND_FREETYPE=no
59045        fi
59046      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59047          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59048        # Found lib in isa dir, use that instead.
59049        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59050        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59051$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59052      fi
59053    fi
59054  fi
59055
59056  if test "x$FOUND_FREETYPE" = xyes; then
59057
59058  # Only process if variable expands to non-empty
59059
59060  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59062
59063  # Input might be given as Windows format, start by converting to
59064  # unix format.
59065  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59066  new_path=`$CYGPATH -u "$path"`
59067
59068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59071  # "foo.exe" is OK but "foo" is an error.
59072  #
59073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59074  # It is also a way to make sure we got the proper file name for the real test later on.
59075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59076  if test "x$test_shortpath" = x; then
59077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59078$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59079    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59080  fi
59081
59082  # Call helper function which possibly converts this using DOS-style short mode.
59083  # If so, the updated path is stored in $new_path.
59084
59085  input_path="$new_path"
59086  # Check if we need to convert this using DOS-style short mode. If the path
59087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59088  # take no chances and rewrite it.
59089  # Note: m4 eats our [], so we need to use [ and ] instead.
59090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59091  if test "x$has_forbidden_chars" != x; then
59092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59096      # Going to short mode and back again did indeed matter. Since short mode is
59097      # case insensitive, let's make it lowercase to improve readability.
59098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59099      # Now convert it back to Unix-style (cygpath)
59100      input_path=`$CYGPATH -u "$shortmode_path"`
59101      new_path="$input_path"
59102    fi
59103  fi
59104
59105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59106  if test "x$test_cygdrive_prefix" = x; then
59107    # As a simple fix, exclude /usr/bin since it's not a real path.
59108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59110      # a path prefixed by /cygdrive for fixpath to work.
59111      new_path="$CYGWIN_ROOT_PATH$input_path"
59112    fi
59113  fi
59114
59115
59116  if test "x$path" != "x$new_path"; then
59117    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59120  fi
59121
59122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59123
59124  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59125  has_colon=`$ECHO $path | $GREP ^.:`
59126  new_path="$path"
59127  if test "x$has_colon" = x; then
59128    # Not in mixed or Windows style, start by that.
59129    new_path=`cmd //c echo $path`
59130  fi
59131
59132
59133  input_path="$new_path"
59134  # Check if we need to convert this using DOS-style short mode. If the path
59135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59136  # take no chances and rewrite it.
59137  # Note: m4 eats our [], so we need to use [ and ] instead.
59138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59139  if test "x$has_forbidden_chars" != x; then
59140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59142  fi
59143
59144
59145  windows_path="$new_path"
59146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59147    unix_path=`$CYGPATH -u "$windows_path"`
59148    new_path="$unix_path"
59149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59151    new_path="$unix_path"
59152  fi
59153
59154  if test "x$path" != "x$new_path"; then
59155    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59157$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59158  fi
59159
59160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59162
59163    else
59164      # We're on a unix platform. Hooray! :)
59165      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59166      has_space=`$ECHO "$path" | $GREP " "`
59167      if test "x$has_space" != x; then
59168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59169$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59171      fi
59172
59173      # Use eval to expand a potential ~
59174      eval path="$path"
59175      if test ! -f "$path" && test ! -d "$path"; then
59176        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59177      fi
59178
59179      if test -d "$path"; then
59180        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59181      else
59182        dir="`$DIRNAME "$path"`"
59183        base="`$BASENAME "$path"`"
59184        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59185      fi
59186    fi
59187  fi
59188
59189
59190  # Only process if variable expands to non-empty
59191
59192  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59194
59195  # Input might be given as Windows format, start by converting to
59196  # unix format.
59197  path="$POTENTIAL_FREETYPE_LIB_PATH"
59198  new_path=`$CYGPATH -u "$path"`
59199
59200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59203  # "foo.exe" is OK but "foo" is an error.
59204  #
59205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59206  # It is also a way to make sure we got the proper file name for the real test later on.
59207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59208  if test "x$test_shortpath" = x; then
59209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59210$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59211    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59212  fi
59213
59214  # Call helper function which possibly converts this using DOS-style short mode.
59215  # If so, the updated path is stored in $new_path.
59216
59217  input_path="$new_path"
59218  # Check if we need to convert this using DOS-style short mode. If the path
59219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59220  # take no chances and rewrite it.
59221  # Note: m4 eats our [], so we need to use [ and ] instead.
59222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59223  if test "x$has_forbidden_chars" != x; then
59224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59228      # Going to short mode and back again did indeed matter. Since short mode is
59229      # case insensitive, let's make it lowercase to improve readability.
59230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59231      # Now convert it back to Unix-style (cygpath)
59232      input_path=`$CYGPATH -u "$shortmode_path"`
59233      new_path="$input_path"
59234    fi
59235  fi
59236
59237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59238  if test "x$test_cygdrive_prefix" = x; then
59239    # As a simple fix, exclude /usr/bin since it's not a real path.
59240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59242      # a path prefixed by /cygdrive for fixpath to work.
59243      new_path="$CYGWIN_ROOT_PATH$input_path"
59244    fi
59245  fi
59246
59247
59248  if test "x$path" != "x$new_path"; then
59249    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59251$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59252  fi
59253
59254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59255
59256  path="$POTENTIAL_FREETYPE_LIB_PATH"
59257  has_colon=`$ECHO $path | $GREP ^.:`
59258  new_path="$path"
59259  if test "x$has_colon" = x; then
59260    # Not in mixed or Windows style, start by that.
59261    new_path=`cmd //c echo $path`
59262  fi
59263
59264
59265  input_path="$new_path"
59266  # Check if we need to convert this using DOS-style short mode. If the path
59267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59268  # take no chances and rewrite it.
59269  # Note: m4 eats our [], so we need to use [ and ] instead.
59270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59271  if test "x$has_forbidden_chars" != x; then
59272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59274  fi
59275
59276
59277  windows_path="$new_path"
59278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59279    unix_path=`$CYGPATH -u "$windows_path"`
59280    new_path="$unix_path"
59281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59283    new_path="$unix_path"
59284  fi
59285
59286  if test "x$path" != "x$new_path"; then
59287    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59289$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59290  fi
59291
59292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59294
59295    else
59296      # We're on a unix platform. Hooray! :)
59297      path="$POTENTIAL_FREETYPE_LIB_PATH"
59298      has_space=`$ECHO "$path" | $GREP " "`
59299      if test "x$has_space" != x; then
59300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59301$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59302        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59303      fi
59304
59305      # Use eval to expand a potential ~
59306      eval path="$path"
59307      if test ! -f "$path" && test ! -d "$path"; then
59308        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59309      fi
59310
59311      if test -d "$path"; then
59312        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59313      else
59314        dir="`$DIRNAME "$path"`"
59315        base="`$BASENAME "$path"`"
59316        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59317      fi
59318    fi
59319  fi
59320
59321
59322    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59324$as_echo_n "checking for freetype includes... " >&6; }
59325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59326$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59327    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59329$as_echo_n "checking for freetype libraries... " >&6; }
59330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59331$as_echo "$FREETYPE_LIB_PATH" >&6; }
59332  fi
59333
59334          if test "x$FOUND_FREETYPE" != xyes; then
59335            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59336
59337  windows_path="$FREETYPE_BASE_DIR"
59338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59339    unix_path=`$CYGPATH -u "$windows_path"`
59340    FREETYPE_BASE_DIR="$unix_path"
59341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59343    FREETYPE_BASE_DIR="$unix_path"
59344  fi
59345
59346
59347  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59348  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59349  METHOD="well-known location"
59350
59351  # Let's start with an optimistic view of the world :-)
59352  FOUND_FREETYPE=yes
59353
59354  # First look for the canonical freetype main include file ft2build.h.
59355  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59356    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59357    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59358    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59359      # Fail.
59360      FOUND_FREETYPE=no
59361    fi
59362  fi
59363
59364  if test "x$FOUND_FREETYPE" = xyes; then
59365    # Include file found, let's continue the sanity check.
59366    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59367$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59368
59369    # Reset to default value
59370    FREETYPE_BASE_NAME=freetype
59371    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59372    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59373      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59374          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59375        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59376        # for the .6 version explicitly.
59377        FREETYPE_BASE_NAME=freetype.6
59378        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59379        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59380$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59381      else
59382        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59383$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59384        FOUND_FREETYPE=no
59385      fi
59386    else
59387      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59388        # On Windows, we will need both .lib and .dll file.
59389        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59390          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59391$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59392          FOUND_FREETYPE=no
59393        fi
59394      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59395          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59396        # Found lib in isa dir, use that instead.
59397        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59398        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59399$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59400      fi
59401    fi
59402  fi
59403
59404  if test "x$FOUND_FREETYPE" = xyes; then
59405
59406  # Only process if variable expands to non-empty
59407
59408  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59410
59411  # Input might be given as Windows format, start by converting to
59412  # unix format.
59413  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59414  new_path=`$CYGPATH -u "$path"`
59415
59416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59419  # "foo.exe" is OK but "foo" is an error.
59420  #
59421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59422  # It is also a way to make sure we got the proper file name for the real test later on.
59423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59424  if test "x$test_shortpath" = x; then
59425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59426$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59427    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59428  fi
59429
59430  # Call helper function which possibly converts this using DOS-style short mode.
59431  # If so, the updated path is stored in $new_path.
59432
59433  input_path="$new_path"
59434  # Check if we need to convert this using DOS-style short mode. If the path
59435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59436  # take no chances and rewrite it.
59437  # Note: m4 eats our [], so we need to use [ and ] instead.
59438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59439  if test "x$has_forbidden_chars" != x; then
59440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59444      # Going to short mode and back again did indeed matter. Since short mode is
59445      # case insensitive, let's make it lowercase to improve readability.
59446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59447      # Now convert it back to Unix-style (cygpath)
59448      input_path=`$CYGPATH -u "$shortmode_path"`
59449      new_path="$input_path"
59450    fi
59451  fi
59452
59453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59454  if test "x$test_cygdrive_prefix" = x; then
59455    # As a simple fix, exclude /usr/bin since it's not a real path.
59456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59458      # a path prefixed by /cygdrive for fixpath to work.
59459      new_path="$CYGWIN_ROOT_PATH$input_path"
59460    fi
59461  fi
59462
59463
59464  if test "x$path" != "x$new_path"; then
59465    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59467$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59468  fi
59469
59470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59471
59472  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59473  has_colon=`$ECHO $path | $GREP ^.:`
59474  new_path="$path"
59475  if test "x$has_colon" = x; then
59476    # Not in mixed or Windows style, start by that.
59477    new_path=`cmd //c echo $path`
59478  fi
59479
59480
59481  input_path="$new_path"
59482  # Check if we need to convert this using DOS-style short mode. If the path
59483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59484  # take no chances and rewrite it.
59485  # Note: m4 eats our [], so we need to use [ and ] instead.
59486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59487  if test "x$has_forbidden_chars" != x; then
59488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59490  fi
59491
59492
59493  windows_path="$new_path"
59494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59495    unix_path=`$CYGPATH -u "$windows_path"`
59496    new_path="$unix_path"
59497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59499    new_path="$unix_path"
59500  fi
59501
59502  if test "x$path" != "x$new_path"; then
59503    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59506  fi
59507
59508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59510
59511    else
59512      # We're on a unix platform. Hooray! :)
59513      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59514      has_space=`$ECHO "$path" | $GREP " "`
59515      if test "x$has_space" != x; then
59516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59519      fi
59520
59521      # Use eval to expand a potential ~
59522      eval path="$path"
59523      if test ! -f "$path" && test ! -d "$path"; then
59524        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59525      fi
59526
59527      if test -d "$path"; then
59528        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59529      else
59530        dir="`$DIRNAME "$path"`"
59531        base="`$BASENAME "$path"`"
59532        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59533      fi
59534    fi
59535  fi
59536
59537
59538  # Only process if variable expands to non-empty
59539
59540  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59542
59543  # Input might be given as Windows format, start by converting to
59544  # unix format.
59545  path="$POTENTIAL_FREETYPE_LIB_PATH"
59546  new_path=`$CYGPATH -u "$path"`
59547
59548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59551  # "foo.exe" is OK but "foo" is an error.
59552  #
59553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59554  # It is also a way to make sure we got the proper file name for the real test later on.
59555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59556  if test "x$test_shortpath" = x; then
59557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59559    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59560  fi
59561
59562  # Call helper function which possibly converts this using DOS-style short mode.
59563  # If so, the updated path is stored in $new_path.
59564
59565  input_path="$new_path"
59566  # Check if we need to convert this using DOS-style short mode. If the path
59567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59568  # take no chances and rewrite it.
59569  # Note: m4 eats our [], so we need to use [ and ] instead.
59570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59571  if test "x$has_forbidden_chars" != x; then
59572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59576      # Going to short mode and back again did indeed matter. Since short mode is
59577      # case insensitive, let's make it lowercase to improve readability.
59578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59579      # Now convert it back to Unix-style (cygpath)
59580      input_path=`$CYGPATH -u "$shortmode_path"`
59581      new_path="$input_path"
59582    fi
59583  fi
59584
59585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59586  if test "x$test_cygdrive_prefix" = x; then
59587    # As a simple fix, exclude /usr/bin since it's not a real path.
59588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59590      # a path prefixed by /cygdrive for fixpath to work.
59591      new_path="$CYGWIN_ROOT_PATH$input_path"
59592    fi
59593  fi
59594
59595
59596  if test "x$path" != "x$new_path"; then
59597    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59600  fi
59601
59602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59603
59604  path="$POTENTIAL_FREETYPE_LIB_PATH"
59605  has_colon=`$ECHO $path | $GREP ^.:`
59606  new_path="$path"
59607  if test "x$has_colon" = x; then
59608    # Not in mixed or Windows style, start by that.
59609    new_path=`cmd //c echo $path`
59610  fi
59611
59612
59613  input_path="$new_path"
59614  # Check if we need to convert this using DOS-style short mode. If the path
59615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59616  # take no chances and rewrite it.
59617  # Note: m4 eats our [], so we need to use [ and ] instead.
59618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59619  if test "x$has_forbidden_chars" != x; then
59620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59622  fi
59623
59624
59625  windows_path="$new_path"
59626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59627    unix_path=`$CYGPATH -u "$windows_path"`
59628    new_path="$unix_path"
59629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59631    new_path="$unix_path"
59632  fi
59633
59634  if test "x$path" != "x$new_path"; then
59635    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59638  fi
59639
59640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59642
59643    else
59644      # We're on a unix platform. Hooray! :)
59645      path="$POTENTIAL_FREETYPE_LIB_PATH"
59646      has_space=`$ECHO "$path" | $GREP " "`
59647      if test "x$has_space" != x; then
59648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59651      fi
59652
59653      # Use eval to expand a potential ~
59654      eval path="$path"
59655      if test ! -f "$path" && test ! -d "$path"; then
59656        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59657      fi
59658
59659      if test -d "$path"; then
59660        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59661      else
59662        dir="`$DIRNAME "$path"`"
59663        base="`$BASENAME "$path"`"
59664        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59665      fi
59666    fi
59667  fi
59668
59669
59670    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59672$as_echo_n "checking for freetype includes... " >&6; }
59673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59674$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59675    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59677$as_echo_n "checking for freetype libraries... " >&6; }
59678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59679$as_echo "$FREETYPE_LIB_PATH" >&6; }
59680  fi
59681
59682          fi
59683          if test "x$FOUND_FREETYPE" != xyes; then
59684            FREETYPE_BASE_DIR="$HOME/freetype"
59685
59686  windows_path="$FREETYPE_BASE_DIR"
59687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59688    unix_path=`$CYGPATH -u "$windows_path"`
59689    FREETYPE_BASE_DIR="$unix_path"
59690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59692    FREETYPE_BASE_DIR="$unix_path"
59693  fi
59694
59695            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59696
59697  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59698  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59699  METHOD="well-known location"
59700
59701  # Let's start with an optimistic view of the world :-)
59702  FOUND_FREETYPE=yes
59703
59704  # First look for the canonical freetype main include file ft2build.h.
59705  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59706    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59707    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59708    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59709      # Fail.
59710      FOUND_FREETYPE=no
59711    fi
59712  fi
59713
59714  if test "x$FOUND_FREETYPE" = xyes; then
59715    # Include file found, let's continue the sanity check.
59716    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59717$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59718
59719    # Reset to default value
59720    FREETYPE_BASE_NAME=freetype
59721    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59722    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59723      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59724          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59725        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59726        # for the .6 version explicitly.
59727        FREETYPE_BASE_NAME=freetype.6
59728        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59729        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59730$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59731      else
59732        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59733$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59734        FOUND_FREETYPE=no
59735      fi
59736    else
59737      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59738        # On Windows, we will need both .lib and .dll file.
59739        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59740          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59741$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59742          FOUND_FREETYPE=no
59743        fi
59744      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59745          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59746        # Found lib in isa dir, use that instead.
59747        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59748        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59749$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59750      fi
59751    fi
59752  fi
59753
59754  if test "x$FOUND_FREETYPE" = xyes; then
59755
59756  # Only process if variable expands to non-empty
59757
59758  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59760
59761  # Input might be given as Windows format, start by converting to
59762  # unix format.
59763  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59764  new_path=`$CYGPATH -u "$path"`
59765
59766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59769  # "foo.exe" is OK but "foo" is an error.
59770  #
59771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59772  # It is also a way to make sure we got the proper file name for the real test later on.
59773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59774  if test "x$test_shortpath" = x; then
59775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59776$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59777    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59778  fi
59779
59780  # Call helper function which possibly converts this using DOS-style short mode.
59781  # If so, the updated path is stored in $new_path.
59782
59783  input_path="$new_path"
59784  # Check if we need to convert this using DOS-style short mode. If the path
59785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59786  # take no chances and rewrite it.
59787  # Note: m4 eats our [], so we need to use [ and ] instead.
59788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59789  if test "x$has_forbidden_chars" != x; then
59790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59794      # Going to short mode and back again did indeed matter. Since short mode is
59795      # case insensitive, let's make it lowercase to improve readability.
59796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59797      # Now convert it back to Unix-style (cygpath)
59798      input_path=`$CYGPATH -u "$shortmode_path"`
59799      new_path="$input_path"
59800    fi
59801  fi
59802
59803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59804  if test "x$test_cygdrive_prefix" = x; then
59805    # As a simple fix, exclude /usr/bin since it's not a real path.
59806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59808      # a path prefixed by /cygdrive for fixpath to work.
59809      new_path="$CYGWIN_ROOT_PATH$input_path"
59810    fi
59811  fi
59812
59813
59814  if test "x$path" != "x$new_path"; then
59815    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59817$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59818  fi
59819
59820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59821
59822  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59823  has_colon=`$ECHO $path | $GREP ^.:`
59824  new_path="$path"
59825  if test "x$has_colon" = x; then
59826    # Not in mixed or Windows style, start by that.
59827    new_path=`cmd //c echo $path`
59828  fi
59829
59830
59831  input_path="$new_path"
59832  # Check if we need to convert this using DOS-style short mode. If the path
59833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59834  # take no chances and rewrite it.
59835  # Note: m4 eats our [], so we need to use [ and ] instead.
59836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59837  if test "x$has_forbidden_chars" != x; then
59838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59840  fi
59841
59842
59843  windows_path="$new_path"
59844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59845    unix_path=`$CYGPATH -u "$windows_path"`
59846    new_path="$unix_path"
59847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59849    new_path="$unix_path"
59850  fi
59851
59852  if test "x$path" != "x$new_path"; then
59853    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59855$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59856  fi
59857
59858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59860
59861    else
59862      # We're on a unix platform. Hooray! :)
59863      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59864      has_space=`$ECHO "$path" | $GREP " "`
59865      if test "x$has_space" != x; then
59866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59868        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59869      fi
59870
59871      # Use eval to expand a potential ~
59872      eval path="$path"
59873      if test ! -f "$path" && test ! -d "$path"; then
59874        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59875      fi
59876
59877      if test -d "$path"; then
59878        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59879      else
59880        dir="`$DIRNAME "$path"`"
59881        base="`$BASENAME "$path"`"
59882        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59883      fi
59884    fi
59885  fi
59886
59887
59888  # Only process if variable expands to non-empty
59889
59890  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59892
59893  # Input might be given as Windows format, start by converting to
59894  # unix format.
59895  path="$POTENTIAL_FREETYPE_LIB_PATH"
59896  new_path=`$CYGPATH -u "$path"`
59897
59898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59901  # "foo.exe" is OK but "foo" is an error.
59902  #
59903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59904  # It is also a way to make sure we got the proper file name for the real test later on.
59905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59906  if test "x$test_shortpath" = x; then
59907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59909    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59910  fi
59911
59912  # Call helper function which possibly converts this using DOS-style short mode.
59913  # If so, the updated path is stored in $new_path.
59914
59915  input_path="$new_path"
59916  # Check if we need to convert this using DOS-style short mode. If the path
59917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59918  # take no chances and rewrite it.
59919  # Note: m4 eats our [], so we need to use [ and ] instead.
59920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59921  if test "x$has_forbidden_chars" != x; then
59922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59926      # Going to short mode and back again did indeed matter. Since short mode is
59927      # case insensitive, let's make it lowercase to improve readability.
59928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59929      # Now convert it back to Unix-style (cygpath)
59930      input_path=`$CYGPATH -u "$shortmode_path"`
59931      new_path="$input_path"
59932    fi
59933  fi
59934
59935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59936  if test "x$test_cygdrive_prefix" = x; then
59937    # As a simple fix, exclude /usr/bin since it's not a real path.
59938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59940      # a path prefixed by /cygdrive for fixpath to work.
59941      new_path="$CYGWIN_ROOT_PATH$input_path"
59942    fi
59943  fi
59944
59945
59946  if test "x$path" != "x$new_path"; then
59947    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59949$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59950  fi
59951
59952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59953
59954  path="$POTENTIAL_FREETYPE_LIB_PATH"
59955  has_colon=`$ECHO $path | $GREP ^.:`
59956  new_path="$path"
59957  if test "x$has_colon" = x; then
59958    # Not in mixed or Windows style, start by that.
59959    new_path=`cmd //c echo $path`
59960  fi
59961
59962
59963  input_path="$new_path"
59964  # Check if we need to convert this using DOS-style short mode. If the path
59965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59966  # take no chances and rewrite it.
59967  # Note: m4 eats our [], so we need to use [ and ] instead.
59968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59969  if test "x$has_forbidden_chars" != x; then
59970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59972  fi
59973
59974
59975  windows_path="$new_path"
59976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59977    unix_path=`$CYGPATH -u "$windows_path"`
59978    new_path="$unix_path"
59979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59981    new_path="$unix_path"
59982  fi
59983
59984  if test "x$path" != "x$new_path"; then
59985    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59987$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59988  fi
59989
59990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59992
59993    else
59994      # We're on a unix platform. Hooray! :)
59995      path="$POTENTIAL_FREETYPE_LIB_PATH"
59996      has_space=`$ECHO "$path" | $GREP " "`
59997      if test "x$has_space" != x; then
59998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60001      fi
60002
60003      # Use eval to expand a potential ~
60004      eval path="$path"
60005      if test ! -f "$path" && test ! -d "$path"; then
60006        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60007      fi
60008
60009      if test -d "$path"; then
60010        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60011      else
60012        dir="`$DIRNAME "$path"`"
60013        base="`$BASENAME "$path"`"
60014        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60015      fi
60016    fi
60017  fi
60018
60019
60020    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60022$as_echo_n "checking for freetype includes... " >&6; }
60023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60024$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60025    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60027$as_echo_n "checking for freetype libraries... " >&6; }
60028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60029$as_echo "$FREETYPE_LIB_PATH" >&6; }
60030  fi
60031
60032            else
60033
60034  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60035  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60036  METHOD="well-known location"
60037
60038  # Let's start with an optimistic view of the world :-)
60039  FOUND_FREETYPE=yes
60040
60041  # First look for the canonical freetype main include file ft2build.h.
60042  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60043    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60044    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60045    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60046      # Fail.
60047      FOUND_FREETYPE=no
60048    fi
60049  fi
60050
60051  if test "x$FOUND_FREETYPE" = xyes; then
60052    # Include file found, let's continue the sanity check.
60053    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60054$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60055
60056    # Reset to default value
60057    FREETYPE_BASE_NAME=freetype
60058    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60059    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60060      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60061          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60062        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60063        # for the .6 version explicitly.
60064        FREETYPE_BASE_NAME=freetype.6
60065        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60066        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60067$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60068      else
60069        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60070$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60071        FOUND_FREETYPE=no
60072      fi
60073    else
60074      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60075        # On Windows, we will need both .lib and .dll file.
60076        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60077          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60078$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60079          FOUND_FREETYPE=no
60080        fi
60081      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60082          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60083        # Found lib in isa dir, use that instead.
60084        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60085        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60086$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60087      fi
60088    fi
60089  fi
60090
60091  if test "x$FOUND_FREETYPE" = xyes; then
60092
60093  # Only process if variable expands to non-empty
60094
60095  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60097
60098  # Input might be given as Windows format, start by converting to
60099  # unix format.
60100  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60101  new_path=`$CYGPATH -u "$path"`
60102
60103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60106  # "foo.exe" is OK but "foo" is an error.
60107  #
60108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60109  # It is also a way to make sure we got the proper file name for the real test later on.
60110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60111  if test "x$test_shortpath" = x; then
60112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60114    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60115  fi
60116
60117  # Call helper function which possibly converts this using DOS-style short mode.
60118  # If so, the updated path is stored in $new_path.
60119
60120  input_path="$new_path"
60121  # Check if we need to convert this using DOS-style short mode. If the path
60122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60123  # take no chances and rewrite it.
60124  # Note: m4 eats our [], so we need to use [ and ] instead.
60125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60126  if test "x$has_forbidden_chars" != x; then
60127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60131      # Going to short mode and back again did indeed matter. Since short mode is
60132      # case insensitive, let's make it lowercase to improve readability.
60133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60134      # Now convert it back to Unix-style (cygpath)
60135      input_path=`$CYGPATH -u "$shortmode_path"`
60136      new_path="$input_path"
60137    fi
60138  fi
60139
60140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60141  if test "x$test_cygdrive_prefix" = x; then
60142    # As a simple fix, exclude /usr/bin since it's not a real path.
60143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60145      # a path prefixed by /cygdrive for fixpath to work.
60146      new_path="$CYGWIN_ROOT_PATH$input_path"
60147    fi
60148  fi
60149
60150
60151  if test "x$path" != "x$new_path"; then
60152    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60155  fi
60156
60157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60158
60159  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60160  has_colon=`$ECHO $path | $GREP ^.:`
60161  new_path="$path"
60162  if test "x$has_colon" = x; then
60163    # Not in mixed or Windows style, start by that.
60164    new_path=`cmd //c echo $path`
60165  fi
60166
60167
60168  input_path="$new_path"
60169  # Check if we need to convert this using DOS-style short mode. If the path
60170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60171  # take no chances and rewrite it.
60172  # Note: m4 eats our [], so we need to use [ and ] instead.
60173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60174  if test "x$has_forbidden_chars" != x; then
60175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60177  fi
60178
60179
60180  windows_path="$new_path"
60181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60182    unix_path=`$CYGPATH -u "$windows_path"`
60183    new_path="$unix_path"
60184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60186    new_path="$unix_path"
60187  fi
60188
60189  if test "x$path" != "x$new_path"; then
60190    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60193  fi
60194
60195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60197
60198    else
60199      # We're on a unix platform. Hooray! :)
60200      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60201      has_space=`$ECHO "$path" | $GREP " "`
60202      if test "x$has_space" != x; then
60203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60206      fi
60207
60208      # Use eval to expand a potential ~
60209      eval path="$path"
60210      if test ! -f "$path" && test ! -d "$path"; then
60211        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60212      fi
60213
60214      if test -d "$path"; then
60215        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60216      else
60217        dir="`$DIRNAME "$path"`"
60218        base="`$BASENAME "$path"`"
60219        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60220      fi
60221    fi
60222  fi
60223
60224
60225  # Only process if variable expands to non-empty
60226
60227  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60229
60230  # Input might be given as Windows format, start by converting to
60231  # unix format.
60232  path="$POTENTIAL_FREETYPE_LIB_PATH"
60233  new_path=`$CYGPATH -u "$path"`
60234
60235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60238  # "foo.exe" is OK but "foo" is an error.
60239  #
60240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60241  # It is also a way to make sure we got the proper file name for the real test later on.
60242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60243  if test "x$test_shortpath" = x; then
60244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60246    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60247  fi
60248
60249  # Call helper function which possibly converts this using DOS-style short mode.
60250  # If so, the updated path is stored in $new_path.
60251
60252  input_path="$new_path"
60253  # Check if we need to convert this using DOS-style short mode. If the path
60254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60255  # take no chances and rewrite it.
60256  # Note: m4 eats our [], so we need to use [ and ] instead.
60257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60258  if test "x$has_forbidden_chars" != x; then
60259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60263      # Going to short mode and back again did indeed matter. Since short mode is
60264      # case insensitive, let's make it lowercase to improve readability.
60265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60266      # Now convert it back to Unix-style (cygpath)
60267      input_path=`$CYGPATH -u "$shortmode_path"`
60268      new_path="$input_path"
60269    fi
60270  fi
60271
60272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60273  if test "x$test_cygdrive_prefix" = x; then
60274    # As a simple fix, exclude /usr/bin since it's not a real path.
60275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60277      # a path prefixed by /cygdrive for fixpath to work.
60278      new_path="$CYGWIN_ROOT_PATH$input_path"
60279    fi
60280  fi
60281
60282
60283  if test "x$path" != "x$new_path"; then
60284    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60287  fi
60288
60289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60290
60291  path="$POTENTIAL_FREETYPE_LIB_PATH"
60292  has_colon=`$ECHO $path | $GREP ^.:`
60293  new_path="$path"
60294  if test "x$has_colon" = x; then
60295    # Not in mixed or Windows style, start by that.
60296    new_path=`cmd //c echo $path`
60297  fi
60298
60299
60300  input_path="$new_path"
60301  # Check if we need to convert this using DOS-style short mode. If the path
60302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60303  # take no chances and rewrite it.
60304  # Note: m4 eats our [], so we need to use [ and ] instead.
60305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60306  if test "x$has_forbidden_chars" != x; then
60307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60309  fi
60310
60311
60312  windows_path="$new_path"
60313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60314    unix_path=`$CYGPATH -u "$windows_path"`
60315    new_path="$unix_path"
60316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60318    new_path="$unix_path"
60319  fi
60320
60321  if test "x$path" != "x$new_path"; then
60322    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60324$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60325  fi
60326
60327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60329
60330    else
60331      # We're on a unix platform. Hooray! :)
60332      path="$POTENTIAL_FREETYPE_LIB_PATH"
60333      has_space=`$ECHO "$path" | $GREP " "`
60334      if test "x$has_space" != x; then
60335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60338      fi
60339
60340      # Use eval to expand a potential ~
60341      eval path="$path"
60342      if test ! -f "$path" && test ! -d "$path"; then
60343        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60344      fi
60345
60346      if test -d "$path"; then
60347        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60348      else
60349        dir="`$DIRNAME "$path"`"
60350        base="`$BASENAME "$path"`"
60351        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60352      fi
60353    fi
60354  fi
60355
60356
60357    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60359$as_echo_n "checking for freetype includes... " >&6; }
60360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60361$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60362    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60364$as_echo_n "checking for freetype libraries... " >&6; }
60365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60366$as_echo "$FREETYPE_LIB_PATH" >&6; }
60367  fi
60368
60369            fi
60370            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60371                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60372              # Source is available, as a last resort try to build freetype in default location
60373
60374  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60375  BUILD_FREETYPE=yes
60376
60377  # Check if the freetype sources are acessible..
60378  if ! test -d $FREETYPE_SRC_PATH; then
60379    { $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
60380$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60381    BUILD_FREETYPE=no
60382  fi
60383  # ..and contain a vc2010 project file
60384  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60385  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60386    { $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
60387$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60388    BUILD_FREETYPE=no
60389  fi
60390  # Now check if configure found a version of 'msbuild.exe'
60391  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60392    { $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
60393$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;}
60394    BUILD_FREETYPE=no
60395  fi
60396
60397  # Ready to go..
60398  if test "x$BUILD_FREETYPE" = xyes; then
60399    # msbuild requires trailing slashes for output directories
60400    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60401    freetype_lib_path_unix="$freetype_lib_path"
60402    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60403
60404  unix_path="$vcxproj_path"
60405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60406    windows_path=`$CYGPATH -m "$unix_path"`
60407    vcxproj_path="$windows_path"
60408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60409    windows_path=`cmd //c echo $unix_path`
60410    vcxproj_path="$windows_path"
60411  fi
60412
60413
60414  unix_path="$freetype_lib_path"
60415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60416    windows_path=`$CYGPATH -m "$unix_path"`
60417    freetype_lib_path="$windows_path"
60418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60419    windows_path=`cmd //c echo $unix_path`
60420    freetype_lib_path="$windows_path"
60421  fi
60422
60423
60424  unix_path="$freetype_obj_path"
60425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60426    windows_path=`$CYGPATH -m "$unix_path"`
60427    freetype_obj_path="$windows_path"
60428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60429    windows_path=`cmd //c echo $unix_path`
60430    freetype_obj_path="$windows_path"
60431  fi
60432
60433    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60434      freetype_platform=x64
60435    else
60436      freetype_platform=win32
60437    fi
60438
60439    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60440    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60441    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60442    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60443    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60444$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60445
60446    # First we try to build the freetype.dll
60447    $ECHO -e "@echo off\n"\
60448        "$MSBUILD $vcxproj_path "\
60449        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60450        "/p:Configuration=\"Release Multithreaded\" "\
60451        "/p:Platform=$freetype_platform "\
60452        "/p:ConfigurationType=DynamicLibrary "\
60453        "/p:TargetName=freetype "\
60454        "/p:OutDir=\"$freetype_lib_path\" "\
60455        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60456    cmd /c freetype.bat
60457
60458    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60459      # If that succeeds we also build freetype.lib
60460      $ECHO -e "@echo off\n"\
60461          "$MSBUILD $vcxproj_path "\
60462          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60463          "/p:Configuration=\"Release Multithreaded\" "\
60464          "/p:Platform=$freetype_platform "\
60465          "/p:ConfigurationType=StaticLibrary "\
60466          "/p:TargetName=freetype "\
60467          "/p:OutDir=\"$freetype_lib_path\" "\
60468          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60469      cmd /c freetype.bat
60470
60471      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60472        # Once we build both, lib and dll, set freetype lib and include path appropriately
60473        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60474        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60475        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60476$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60477      else
60478        BUILD_FREETYPE=no
60479      fi
60480    else
60481      BUILD_FREETYPE=no
60482    fi
60483  fi
60484
60485              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60486
60487  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60488  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60489  METHOD="well-known location"
60490
60491  # Let's start with an optimistic view of the world :-)
60492  FOUND_FREETYPE=yes
60493
60494  # First look for the canonical freetype main include file ft2build.h.
60495  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60496    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60497    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60498    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60499      # Fail.
60500      FOUND_FREETYPE=no
60501    fi
60502  fi
60503
60504  if test "x$FOUND_FREETYPE" = xyes; then
60505    # Include file found, let's continue the sanity check.
60506    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60507$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60508
60509    # Reset to default value
60510    FREETYPE_BASE_NAME=freetype
60511    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60512    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60513      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60514          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60515        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60516        # for the .6 version explicitly.
60517        FREETYPE_BASE_NAME=freetype.6
60518        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60519        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60520$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60521      else
60522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60524        FOUND_FREETYPE=no
60525      fi
60526    else
60527      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60528        # On Windows, we will need both .lib and .dll file.
60529        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60530          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60532          FOUND_FREETYPE=no
60533        fi
60534      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60535          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60536        # Found lib in isa dir, use that instead.
60537        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60538        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60539$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60540      fi
60541    fi
60542  fi
60543
60544  if test "x$FOUND_FREETYPE" = xyes; then
60545
60546  # Only process if variable expands to non-empty
60547
60548  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60550
60551  # Input might be given as Windows format, start by converting to
60552  # unix format.
60553  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60554  new_path=`$CYGPATH -u "$path"`
60555
60556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60559  # "foo.exe" is OK but "foo" is an error.
60560  #
60561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60562  # It is also a way to make sure we got the proper file name for the real test later on.
60563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60564  if test "x$test_shortpath" = x; then
60565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60566$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60567    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60568  fi
60569
60570  # Call helper function which possibly converts this using DOS-style short mode.
60571  # If so, the updated path is stored in $new_path.
60572
60573  input_path="$new_path"
60574  # Check if we need to convert this using DOS-style short mode. If the path
60575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60576  # take no chances and rewrite it.
60577  # Note: m4 eats our [], so we need to use [ and ] instead.
60578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60579  if test "x$has_forbidden_chars" != x; then
60580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60584      # Going to short mode and back again did indeed matter. Since short mode is
60585      # case insensitive, let's make it lowercase to improve readability.
60586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60587      # Now convert it back to Unix-style (cygpath)
60588      input_path=`$CYGPATH -u "$shortmode_path"`
60589      new_path="$input_path"
60590    fi
60591  fi
60592
60593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60594  if test "x$test_cygdrive_prefix" = x; then
60595    # As a simple fix, exclude /usr/bin since it's not a real path.
60596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60598      # a path prefixed by /cygdrive for fixpath to work.
60599      new_path="$CYGWIN_ROOT_PATH$input_path"
60600    fi
60601  fi
60602
60603
60604  if test "x$path" != "x$new_path"; then
60605    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60608  fi
60609
60610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60611
60612  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60613  has_colon=`$ECHO $path | $GREP ^.:`
60614  new_path="$path"
60615  if test "x$has_colon" = x; then
60616    # Not in mixed or Windows style, start by that.
60617    new_path=`cmd //c echo $path`
60618  fi
60619
60620
60621  input_path="$new_path"
60622  # Check if we need to convert this using DOS-style short mode. If the path
60623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60624  # take no chances and rewrite it.
60625  # Note: m4 eats our [], so we need to use [ and ] instead.
60626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60627  if test "x$has_forbidden_chars" != x; then
60628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60630  fi
60631
60632
60633  windows_path="$new_path"
60634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60635    unix_path=`$CYGPATH -u "$windows_path"`
60636    new_path="$unix_path"
60637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60639    new_path="$unix_path"
60640  fi
60641
60642  if test "x$path" != "x$new_path"; then
60643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60646  fi
60647
60648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60650
60651    else
60652      # We're on a unix platform. Hooray! :)
60653      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60654      has_space=`$ECHO "$path" | $GREP " "`
60655      if test "x$has_space" != x; then
60656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60659      fi
60660
60661      # Use eval to expand a potential ~
60662      eval path="$path"
60663      if test ! -f "$path" && test ! -d "$path"; then
60664        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60665      fi
60666
60667      if test -d "$path"; then
60668        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60669      else
60670        dir="`$DIRNAME "$path"`"
60671        base="`$BASENAME "$path"`"
60672        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60673      fi
60674    fi
60675  fi
60676
60677
60678  # Only process if variable expands to non-empty
60679
60680  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60682
60683  # Input might be given as Windows format, start by converting to
60684  # unix format.
60685  path="$POTENTIAL_FREETYPE_LIB_PATH"
60686  new_path=`$CYGPATH -u "$path"`
60687
60688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60691  # "foo.exe" is OK but "foo" is an error.
60692  #
60693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60694  # It is also a way to make sure we got the proper file name for the real test later on.
60695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60696  if test "x$test_shortpath" = x; then
60697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60700  fi
60701
60702  # Call helper function which possibly converts this using DOS-style short mode.
60703  # If so, the updated path is stored in $new_path.
60704
60705  input_path="$new_path"
60706  # Check if we need to convert this using DOS-style short mode. If the path
60707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60708  # take no chances and rewrite it.
60709  # Note: m4 eats our [], so we need to use [ and ] instead.
60710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60711  if test "x$has_forbidden_chars" != x; then
60712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60716      # Going to short mode and back again did indeed matter. Since short mode is
60717      # case insensitive, let's make it lowercase to improve readability.
60718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60719      # Now convert it back to Unix-style (cygpath)
60720      input_path=`$CYGPATH -u "$shortmode_path"`
60721      new_path="$input_path"
60722    fi
60723  fi
60724
60725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60726  if test "x$test_cygdrive_prefix" = x; then
60727    # As a simple fix, exclude /usr/bin since it's not a real path.
60728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60730      # a path prefixed by /cygdrive for fixpath to work.
60731      new_path="$CYGWIN_ROOT_PATH$input_path"
60732    fi
60733  fi
60734
60735
60736  if test "x$path" != "x$new_path"; then
60737    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60740  fi
60741
60742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60743
60744  path="$POTENTIAL_FREETYPE_LIB_PATH"
60745  has_colon=`$ECHO $path | $GREP ^.:`
60746  new_path="$path"
60747  if test "x$has_colon" = x; then
60748    # Not in mixed or Windows style, start by that.
60749    new_path=`cmd //c echo $path`
60750  fi
60751
60752
60753  input_path="$new_path"
60754  # Check if we need to convert this using DOS-style short mode. If the path
60755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60756  # take no chances and rewrite it.
60757  # Note: m4 eats our [], so we need to use [ and ] instead.
60758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60759  if test "x$has_forbidden_chars" != x; then
60760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60762  fi
60763
60764
60765  windows_path="$new_path"
60766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60767    unix_path=`$CYGPATH -u "$windows_path"`
60768    new_path="$unix_path"
60769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60771    new_path="$unix_path"
60772  fi
60773
60774  if test "x$path" != "x$new_path"; then
60775    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60778  fi
60779
60780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60782
60783    else
60784      # We're on a unix platform. Hooray! :)
60785      path="$POTENTIAL_FREETYPE_LIB_PATH"
60786      has_space=`$ECHO "$path" | $GREP " "`
60787      if test "x$has_space" != x; then
60788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60791      fi
60792
60793      # Use eval to expand a potential ~
60794      eval path="$path"
60795      if test ! -f "$path" && test ! -d "$path"; then
60796        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60797      fi
60798
60799      if test -d "$path"; then
60800        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60801      else
60802        dir="`$DIRNAME "$path"`"
60803        base="`$BASENAME "$path"`"
60804        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60805      fi
60806    fi
60807  fi
60808
60809
60810    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60812$as_echo_n "checking for freetype includes... " >&6; }
60813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60814$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60815    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60817$as_echo_n "checking for freetype libraries... " >&6; }
60818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60819$as_echo "$FREETYPE_LIB_PATH" >&6; }
60820  fi
60821
60822              else
60823
60824  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60825  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60826  METHOD="well-known location"
60827
60828  # Let's start with an optimistic view of the world :-)
60829  FOUND_FREETYPE=yes
60830
60831  # First look for the canonical freetype main include file ft2build.h.
60832  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60833    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60834    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60835    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60836      # Fail.
60837      FOUND_FREETYPE=no
60838    fi
60839  fi
60840
60841  if test "x$FOUND_FREETYPE" = xyes; then
60842    # Include file found, let's continue the sanity check.
60843    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60844$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60845
60846    # Reset to default value
60847    FREETYPE_BASE_NAME=freetype
60848    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60849    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60850      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60851          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60852        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60853        # for the .6 version explicitly.
60854        FREETYPE_BASE_NAME=freetype.6
60855        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60856        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60857$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60858      else
60859        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60860$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60861        FOUND_FREETYPE=no
60862      fi
60863    else
60864      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60865        # On Windows, we will need both .lib and .dll file.
60866        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60867          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60868$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60869          FOUND_FREETYPE=no
60870        fi
60871      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60872          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60873        # Found lib in isa dir, use that instead.
60874        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60875        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60876$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60877      fi
60878    fi
60879  fi
60880
60881  if test "x$FOUND_FREETYPE" = xyes; then
60882
60883  # Only process if variable expands to non-empty
60884
60885  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60887
60888  # Input might be given as Windows format, start by converting to
60889  # unix format.
60890  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60891  new_path=`$CYGPATH -u "$path"`
60892
60893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60896  # "foo.exe" is OK but "foo" is an error.
60897  #
60898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60899  # It is also a way to make sure we got the proper file name for the real test later on.
60900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60901  if test "x$test_shortpath" = x; then
60902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60904    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60905  fi
60906
60907  # Call helper function which possibly converts this using DOS-style short mode.
60908  # If so, the updated path is stored in $new_path.
60909
60910  input_path="$new_path"
60911  # Check if we need to convert this using DOS-style short mode. If the path
60912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60913  # take no chances and rewrite it.
60914  # Note: m4 eats our [], so we need to use [ and ] instead.
60915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60916  if test "x$has_forbidden_chars" != x; then
60917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60921      # Going to short mode and back again did indeed matter. Since short mode is
60922      # case insensitive, let's make it lowercase to improve readability.
60923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60924      # Now convert it back to Unix-style (cygpath)
60925      input_path=`$CYGPATH -u "$shortmode_path"`
60926      new_path="$input_path"
60927    fi
60928  fi
60929
60930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60931  if test "x$test_cygdrive_prefix" = x; then
60932    # As a simple fix, exclude /usr/bin since it's not a real path.
60933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60935      # a path prefixed by /cygdrive for fixpath to work.
60936      new_path="$CYGWIN_ROOT_PATH$input_path"
60937    fi
60938  fi
60939
60940
60941  if test "x$path" != "x$new_path"; then
60942    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60945  fi
60946
60947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60948
60949  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60950  has_colon=`$ECHO $path | $GREP ^.:`
60951  new_path="$path"
60952  if test "x$has_colon" = x; then
60953    # Not in mixed or Windows style, start by that.
60954    new_path=`cmd //c echo $path`
60955  fi
60956
60957
60958  input_path="$new_path"
60959  # Check if we need to convert this using DOS-style short mode. If the path
60960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60961  # take no chances and rewrite it.
60962  # Note: m4 eats our [], so we need to use [ and ] instead.
60963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60964  if test "x$has_forbidden_chars" != x; then
60965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60967  fi
60968
60969
60970  windows_path="$new_path"
60971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60972    unix_path=`$CYGPATH -u "$windows_path"`
60973    new_path="$unix_path"
60974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60976    new_path="$unix_path"
60977  fi
60978
60979  if test "x$path" != "x$new_path"; then
60980    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60983  fi
60984
60985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60987
60988    else
60989      # We're on a unix platform. Hooray! :)
60990      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60991      has_space=`$ECHO "$path" | $GREP " "`
60992      if test "x$has_space" != x; then
60993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60994$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60996      fi
60997
60998      # Use eval to expand a potential ~
60999      eval path="$path"
61000      if test ! -f "$path" && test ! -d "$path"; then
61001        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61002      fi
61003
61004      if test -d "$path"; then
61005        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61006      else
61007        dir="`$DIRNAME "$path"`"
61008        base="`$BASENAME "$path"`"
61009        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61010      fi
61011    fi
61012  fi
61013
61014
61015  # Only process if variable expands to non-empty
61016
61017  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61019
61020  # Input might be given as Windows format, start by converting to
61021  # unix format.
61022  path="$POTENTIAL_FREETYPE_LIB_PATH"
61023  new_path=`$CYGPATH -u "$path"`
61024
61025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61028  # "foo.exe" is OK but "foo" is an error.
61029  #
61030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61031  # It is also a way to make sure we got the proper file name for the real test later on.
61032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61033  if test "x$test_shortpath" = x; then
61034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61036    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61037  fi
61038
61039  # Call helper function which possibly converts this using DOS-style short mode.
61040  # If so, the updated path is stored in $new_path.
61041
61042  input_path="$new_path"
61043  # Check if we need to convert this using DOS-style short mode. If the path
61044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61045  # take no chances and rewrite it.
61046  # Note: m4 eats our [], so we need to use [ and ] instead.
61047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61048  if test "x$has_forbidden_chars" != x; then
61049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61053      # Going to short mode and back again did indeed matter. Since short mode is
61054      # case insensitive, let's make it lowercase to improve readability.
61055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61056      # Now convert it back to Unix-style (cygpath)
61057      input_path=`$CYGPATH -u "$shortmode_path"`
61058      new_path="$input_path"
61059    fi
61060  fi
61061
61062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61063  if test "x$test_cygdrive_prefix" = x; then
61064    # As a simple fix, exclude /usr/bin since it's not a real path.
61065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61067      # a path prefixed by /cygdrive for fixpath to work.
61068      new_path="$CYGWIN_ROOT_PATH$input_path"
61069    fi
61070  fi
61071
61072
61073  if test "x$path" != "x$new_path"; then
61074    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61077  fi
61078
61079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61080
61081  path="$POTENTIAL_FREETYPE_LIB_PATH"
61082  has_colon=`$ECHO $path | $GREP ^.:`
61083  new_path="$path"
61084  if test "x$has_colon" = x; then
61085    # Not in mixed or Windows style, start by that.
61086    new_path=`cmd //c echo $path`
61087  fi
61088
61089
61090  input_path="$new_path"
61091  # Check if we need to convert this using DOS-style short mode. If the path
61092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61093  # take no chances and rewrite it.
61094  # Note: m4 eats our [], so we need to use [ and ] instead.
61095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61096  if test "x$has_forbidden_chars" != x; then
61097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61099  fi
61100
61101
61102  windows_path="$new_path"
61103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61104    unix_path=`$CYGPATH -u "$windows_path"`
61105    new_path="$unix_path"
61106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61108    new_path="$unix_path"
61109  fi
61110
61111  if test "x$path" != "x$new_path"; then
61112    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61115  fi
61116
61117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61119
61120    else
61121      # We're on a unix platform. Hooray! :)
61122      path="$POTENTIAL_FREETYPE_LIB_PATH"
61123      has_space=`$ECHO "$path" | $GREP " "`
61124      if test "x$has_space" != x; then
61125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61128      fi
61129
61130      # Use eval to expand a potential ~
61131      eval path="$path"
61132      if test ! -f "$path" && test ! -d "$path"; then
61133        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61134      fi
61135
61136      if test -d "$path"; then
61137        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61138      else
61139        dir="`$DIRNAME "$path"`"
61140        base="`$BASENAME "$path"`"
61141        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61142      fi
61143    fi
61144  fi
61145
61146
61147    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61149$as_echo_n "checking for freetype includes... " >&6; }
61150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61151$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61152    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61154$as_echo_n "checking for freetype libraries... " >&6; }
61155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61156$as_echo "$FREETYPE_LIB_PATH" >&6; }
61157  fi
61158
61159              fi
61160            fi
61161          fi
61162        else
61163          FREETYPE_BASE_DIR="$SYSROOT/usr"
61164
61165  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61166  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61167  METHOD="well-known location"
61168
61169  # Let's start with an optimistic view of the world :-)
61170  FOUND_FREETYPE=yes
61171
61172  # First look for the canonical freetype main include file ft2build.h.
61173  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61174    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61175    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61176    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61177      # Fail.
61178      FOUND_FREETYPE=no
61179    fi
61180  fi
61181
61182  if test "x$FOUND_FREETYPE" = xyes; then
61183    # Include file found, let's continue the sanity check.
61184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61185$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61186
61187    # Reset to default value
61188    FREETYPE_BASE_NAME=freetype
61189    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61190    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61191      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61192          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61193        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61194        # for the .6 version explicitly.
61195        FREETYPE_BASE_NAME=freetype.6
61196        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61197        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61198$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61199      else
61200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61201$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61202        FOUND_FREETYPE=no
61203      fi
61204    else
61205      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61206        # On Windows, we will need both .lib and .dll file.
61207        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61208          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61209$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61210          FOUND_FREETYPE=no
61211        fi
61212      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61213          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61214        # Found lib in isa dir, use that instead.
61215        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61216        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61217$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61218      fi
61219    fi
61220  fi
61221
61222  if test "x$FOUND_FREETYPE" = xyes; then
61223
61224  # Only process if variable expands to non-empty
61225
61226  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61228
61229  # Input might be given as Windows format, start by converting to
61230  # unix format.
61231  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61232  new_path=`$CYGPATH -u "$path"`
61233
61234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61237  # "foo.exe" is OK but "foo" is an error.
61238  #
61239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61240  # It is also a way to make sure we got the proper file name for the real test later on.
61241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61242  if test "x$test_shortpath" = x; then
61243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61244$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61245    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61246  fi
61247
61248  # Call helper function which possibly converts this using DOS-style short mode.
61249  # If so, the updated path is stored in $new_path.
61250
61251  input_path="$new_path"
61252  # Check if we need to convert this using DOS-style short mode. If the path
61253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61254  # take no chances and rewrite it.
61255  # Note: m4 eats our [], so we need to use [ and ] instead.
61256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61257  if test "x$has_forbidden_chars" != x; then
61258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61262      # Going to short mode and back again did indeed matter. Since short mode is
61263      # case insensitive, let's make it lowercase to improve readability.
61264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61265      # Now convert it back to Unix-style (cygpath)
61266      input_path=`$CYGPATH -u "$shortmode_path"`
61267      new_path="$input_path"
61268    fi
61269  fi
61270
61271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61272  if test "x$test_cygdrive_prefix" = x; then
61273    # As a simple fix, exclude /usr/bin since it's not a real path.
61274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61276      # a path prefixed by /cygdrive for fixpath to work.
61277      new_path="$CYGWIN_ROOT_PATH$input_path"
61278    fi
61279  fi
61280
61281
61282  if test "x$path" != "x$new_path"; then
61283    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61286  fi
61287
61288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61289
61290  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61291  has_colon=`$ECHO $path | $GREP ^.:`
61292  new_path="$path"
61293  if test "x$has_colon" = x; then
61294    # Not in mixed or Windows style, start by that.
61295    new_path=`cmd //c echo $path`
61296  fi
61297
61298
61299  input_path="$new_path"
61300  # Check if we need to convert this using DOS-style short mode. If the path
61301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61302  # take no chances and rewrite it.
61303  # Note: m4 eats our [], so we need to use [ and ] instead.
61304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61305  if test "x$has_forbidden_chars" != x; then
61306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61308  fi
61309
61310
61311  windows_path="$new_path"
61312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61313    unix_path=`$CYGPATH -u "$windows_path"`
61314    new_path="$unix_path"
61315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61317    new_path="$unix_path"
61318  fi
61319
61320  if test "x$path" != "x$new_path"; then
61321    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61324  fi
61325
61326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61328
61329    else
61330      # We're on a unix platform. Hooray! :)
61331      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61332      has_space=`$ECHO "$path" | $GREP " "`
61333      if test "x$has_space" != x; then
61334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61335$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61337      fi
61338
61339      # Use eval to expand a potential ~
61340      eval path="$path"
61341      if test ! -f "$path" && test ! -d "$path"; then
61342        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61343      fi
61344
61345      if test -d "$path"; then
61346        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61347      else
61348        dir="`$DIRNAME "$path"`"
61349        base="`$BASENAME "$path"`"
61350        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61351      fi
61352    fi
61353  fi
61354
61355
61356  # Only process if variable expands to non-empty
61357
61358  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61360
61361  # Input might be given as Windows format, start by converting to
61362  # unix format.
61363  path="$POTENTIAL_FREETYPE_LIB_PATH"
61364  new_path=`$CYGPATH -u "$path"`
61365
61366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61369  # "foo.exe" is OK but "foo" is an error.
61370  #
61371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61372  # It is also a way to make sure we got the proper file name for the real test later on.
61373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61374  if test "x$test_shortpath" = x; then
61375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61377    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61378  fi
61379
61380  # Call helper function which possibly converts this using DOS-style short mode.
61381  # If so, the updated path is stored in $new_path.
61382
61383  input_path="$new_path"
61384  # Check if we need to convert this using DOS-style short mode. If the path
61385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61386  # take no chances and rewrite it.
61387  # Note: m4 eats our [], so we need to use [ and ] instead.
61388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61389  if test "x$has_forbidden_chars" != x; then
61390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61394      # Going to short mode and back again did indeed matter. Since short mode is
61395      # case insensitive, let's make it lowercase to improve readability.
61396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61397      # Now convert it back to Unix-style (cygpath)
61398      input_path=`$CYGPATH -u "$shortmode_path"`
61399      new_path="$input_path"
61400    fi
61401  fi
61402
61403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61404  if test "x$test_cygdrive_prefix" = x; then
61405    # As a simple fix, exclude /usr/bin since it's not a real path.
61406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61408      # a path prefixed by /cygdrive for fixpath to work.
61409      new_path="$CYGWIN_ROOT_PATH$input_path"
61410    fi
61411  fi
61412
61413
61414  if test "x$path" != "x$new_path"; then
61415    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61418  fi
61419
61420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61421
61422  path="$POTENTIAL_FREETYPE_LIB_PATH"
61423  has_colon=`$ECHO $path | $GREP ^.:`
61424  new_path="$path"
61425  if test "x$has_colon" = x; then
61426    # Not in mixed or Windows style, start by that.
61427    new_path=`cmd //c echo $path`
61428  fi
61429
61430
61431  input_path="$new_path"
61432  # Check if we need to convert this using DOS-style short mode. If the path
61433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61434  # take no chances and rewrite it.
61435  # Note: m4 eats our [], so we need to use [ and ] instead.
61436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61437  if test "x$has_forbidden_chars" != x; then
61438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61440  fi
61441
61442
61443  windows_path="$new_path"
61444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61445    unix_path=`$CYGPATH -u "$windows_path"`
61446    new_path="$unix_path"
61447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61449    new_path="$unix_path"
61450  fi
61451
61452  if test "x$path" != "x$new_path"; then
61453    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61456  fi
61457
61458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61460
61461    else
61462      # We're on a unix platform. Hooray! :)
61463      path="$POTENTIAL_FREETYPE_LIB_PATH"
61464      has_space=`$ECHO "$path" | $GREP " "`
61465      if test "x$has_space" != x; then
61466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61469      fi
61470
61471      # Use eval to expand a potential ~
61472      eval path="$path"
61473      if test ! -f "$path" && test ! -d "$path"; then
61474        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61475      fi
61476
61477      if test -d "$path"; then
61478        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61479      else
61480        dir="`$DIRNAME "$path"`"
61481        base="`$BASENAME "$path"`"
61482        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61483      fi
61484    fi
61485  fi
61486
61487
61488    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61490$as_echo_n "checking for freetype includes... " >&6; }
61491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61492$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61493    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61495$as_echo_n "checking for freetype libraries... " >&6; }
61496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61497$as_echo "$FREETYPE_LIB_PATH" >&6; }
61498  fi
61499
61500
61501          if test "x$FOUND_FREETYPE" != xyes; then
61502            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61503
61504  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61505  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61506  METHOD="well-known location"
61507
61508  # Let's start with an optimistic view of the world :-)
61509  FOUND_FREETYPE=yes
61510
61511  # First look for the canonical freetype main include file ft2build.h.
61512  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61513    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61514    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61515    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61516      # Fail.
61517      FOUND_FREETYPE=no
61518    fi
61519  fi
61520
61521  if test "x$FOUND_FREETYPE" = xyes; then
61522    # Include file found, let's continue the sanity check.
61523    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61524$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61525
61526    # Reset to default value
61527    FREETYPE_BASE_NAME=freetype
61528    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61529    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61530      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61531          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61532        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61533        # for the .6 version explicitly.
61534        FREETYPE_BASE_NAME=freetype.6
61535        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61536        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61537$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61538      else
61539        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61540$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61541        FOUND_FREETYPE=no
61542      fi
61543    else
61544      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61545        # On Windows, we will need both .lib and .dll file.
61546        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61547          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61548$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61549          FOUND_FREETYPE=no
61550        fi
61551      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61552          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61553        # Found lib in isa dir, use that instead.
61554        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61555        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61556$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61557      fi
61558    fi
61559  fi
61560
61561  if test "x$FOUND_FREETYPE" = xyes; then
61562
61563  # Only process if variable expands to non-empty
61564
61565  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61567
61568  # Input might be given as Windows format, start by converting to
61569  # unix format.
61570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61571  new_path=`$CYGPATH -u "$path"`
61572
61573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61576  # "foo.exe" is OK but "foo" is an error.
61577  #
61578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61579  # It is also a way to make sure we got the proper file name for the real test later on.
61580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61581  if test "x$test_shortpath" = x; then
61582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61584    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61585  fi
61586
61587  # Call helper function which possibly converts this using DOS-style short mode.
61588  # If so, the updated path is stored in $new_path.
61589
61590  input_path="$new_path"
61591  # Check if we need to convert this using DOS-style short mode. If the path
61592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61593  # take no chances and rewrite it.
61594  # Note: m4 eats our [], so we need to use [ and ] instead.
61595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61596  if test "x$has_forbidden_chars" != x; then
61597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61601      # Going to short mode and back again did indeed matter. Since short mode is
61602      # case insensitive, let's make it lowercase to improve readability.
61603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61604      # Now convert it back to Unix-style (cygpath)
61605      input_path=`$CYGPATH -u "$shortmode_path"`
61606      new_path="$input_path"
61607    fi
61608  fi
61609
61610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61611  if test "x$test_cygdrive_prefix" = x; then
61612    # As a simple fix, exclude /usr/bin since it's not a real path.
61613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61615      # a path prefixed by /cygdrive for fixpath to work.
61616      new_path="$CYGWIN_ROOT_PATH$input_path"
61617    fi
61618  fi
61619
61620
61621  if test "x$path" != "x$new_path"; then
61622    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61625  fi
61626
61627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61628
61629  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61630  has_colon=`$ECHO $path | $GREP ^.:`
61631  new_path="$path"
61632  if test "x$has_colon" = x; then
61633    # Not in mixed or Windows style, start by that.
61634    new_path=`cmd //c echo $path`
61635  fi
61636
61637
61638  input_path="$new_path"
61639  # Check if we need to convert this using DOS-style short mode. If the path
61640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61641  # take no chances and rewrite it.
61642  # Note: m4 eats our [], so we need to use [ and ] instead.
61643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61644  if test "x$has_forbidden_chars" != x; then
61645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61647  fi
61648
61649
61650  windows_path="$new_path"
61651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61652    unix_path=`$CYGPATH -u "$windows_path"`
61653    new_path="$unix_path"
61654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61656    new_path="$unix_path"
61657  fi
61658
61659  if test "x$path" != "x$new_path"; then
61660    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61663  fi
61664
61665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61667
61668    else
61669      # We're on a unix platform. Hooray! :)
61670      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61671      has_space=`$ECHO "$path" | $GREP " "`
61672      if test "x$has_space" != x; then
61673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61676      fi
61677
61678      # Use eval to expand a potential ~
61679      eval path="$path"
61680      if test ! -f "$path" && test ! -d "$path"; then
61681        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61682      fi
61683
61684      if test -d "$path"; then
61685        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61686      else
61687        dir="`$DIRNAME "$path"`"
61688        base="`$BASENAME "$path"`"
61689        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61690      fi
61691    fi
61692  fi
61693
61694
61695  # Only process if variable expands to non-empty
61696
61697  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61699
61700  # Input might be given as Windows format, start by converting to
61701  # unix format.
61702  path="$POTENTIAL_FREETYPE_LIB_PATH"
61703  new_path=`$CYGPATH -u "$path"`
61704
61705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61708  # "foo.exe" is OK but "foo" is an error.
61709  #
61710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61711  # It is also a way to make sure we got the proper file name for the real test later on.
61712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61713  if test "x$test_shortpath" = x; then
61714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61715$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61716    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61717  fi
61718
61719  # Call helper function which possibly converts this using DOS-style short mode.
61720  # If so, the updated path is stored in $new_path.
61721
61722  input_path="$new_path"
61723  # Check if we need to convert this using DOS-style short mode. If the path
61724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61725  # take no chances and rewrite it.
61726  # Note: m4 eats our [], so we need to use [ and ] instead.
61727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61728  if test "x$has_forbidden_chars" != x; then
61729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61733      # Going to short mode and back again did indeed matter. Since short mode is
61734      # case insensitive, let's make it lowercase to improve readability.
61735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61736      # Now convert it back to Unix-style (cygpath)
61737      input_path=`$CYGPATH -u "$shortmode_path"`
61738      new_path="$input_path"
61739    fi
61740  fi
61741
61742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61743  if test "x$test_cygdrive_prefix" = x; then
61744    # As a simple fix, exclude /usr/bin since it's not a real path.
61745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61747      # a path prefixed by /cygdrive for fixpath to work.
61748      new_path="$CYGWIN_ROOT_PATH$input_path"
61749    fi
61750  fi
61751
61752
61753  if test "x$path" != "x$new_path"; then
61754    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61757  fi
61758
61759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61760
61761  path="$POTENTIAL_FREETYPE_LIB_PATH"
61762  has_colon=`$ECHO $path | $GREP ^.:`
61763  new_path="$path"
61764  if test "x$has_colon" = x; then
61765    # Not in mixed or Windows style, start by that.
61766    new_path=`cmd //c echo $path`
61767  fi
61768
61769
61770  input_path="$new_path"
61771  # Check if we need to convert this using DOS-style short mode. If the path
61772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61773  # take no chances and rewrite it.
61774  # Note: m4 eats our [], so we need to use [ and ] instead.
61775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61776  if test "x$has_forbidden_chars" != x; then
61777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61779  fi
61780
61781
61782  windows_path="$new_path"
61783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61784    unix_path=`$CYGPATH -u "$windows_path"`
61785    new_path="$unix_path"
61786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61788    new_path="$unix_path"
61789  fi
61790
61791  if test "x$path" != "x$new_path"; then
61792    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61795  fi
61796
61797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61799
61800    else
61801      # We're on a unix platform. Hooray! :)
61802      path="$POTENTIAL_FREETYPE_LIB_PATH"
61803      has_space=`$ECHO "$path" | $GREP " "`
61804      if test "x$has_space" != x; then
61805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61807        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61808      fi
61809
61810      # Use eval to expand a potential ~
61811      eval path="$path"
61812      if test ! -f "$path" && test ! -d "$path"; then
61813        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61814      fi
61815
61816      if test -d "$path"; then
61817        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61818      else
61819        dir="`$DIRNAME "$path"`"
61820        base="`$BASENAME "$path"`"
61821        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61822      fi
61823    fi
61824  fi
61825
61826
61827    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61829$as_echo_n "checking for freetype includes... " >&6; }
61830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61831$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61832    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61834$as_echo_n "checking for freetype libraries... " >&6; }
61835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61836$as_echo "$FREETYPE_LIB_PATH" >&6; }
61837  fi
61838
61839          fi
61840          if test "x$FOUND_FREETYPE" != xyes; then
61841            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61842
61843  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61844  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61845  METHOD="well-known location"
61846
61847  # Let's start with an optimistic view of the world :-)
61848  FOUND_FREETYPE=yes
61849
61850  # First look for the canonical freetype main include file ft2build.h.
61851  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61852    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61853    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61854    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61855      # Fail.
61856      FOUND_FREETYPE=no
61857    fi
61858  fi
61859
61860  if test "x$FOUND_FREETYPE" = xyes; then
61861    # Include file found, let's continue the sanity check.
61862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61863$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61864
61865    # Reset to default value
61866    FREETYPE_BASE_NAME=freetype
61867    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61868    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61869      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61870          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61871        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61872        # for the .6 version explicitly.
61873        FREETYPE_BASE_NAME=freetype.6
61874        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61875        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61876$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61877      else
61878        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61879$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61880        FOUND_FREETYPE=no
61881      fi
61882    else
61883      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61884        # On Windows, we will need both .lib and .dll file.
61885        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61886          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61887$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61888          FOUND_FREETYPE=no
61889        fi
61890      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61891          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61892        # Found lib in isa dir, use that instead.
61893        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61894        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61895$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61896      fi
61897    fi
61898  fi
61899
61900  if test "x$FOUND_FREETYPE" = xyes; then
61901
61902  # Only process if variable expands to non-empty
61903
61904  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61906
61907  # Input might be given as Windows format, start by converting to
61908  # unix format.
61909  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61910  new_path=`$CYGPATH -u "$path"`
61911
61912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61915  # "foo.exe" is OK but "foo" is an error.
61916  #
61917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61918  # It is also a way to make sure we got the proper file name for the real test later on.
61919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61920  if test "x$test_shortpath" = x; then
61921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61923    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61924  fi
61925
61926  # Call helper function which possibly converts this using DOS-style short mode.
61927  # If so, the updated path is stored in $new_path.
61928
61929  input_path="$new_path"
61930  # Check if we need to convert this using DOS-style short mode. If the path
61931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61932  # take no chances and rewrite it.
61933  # Note: m4 eats our [], so we need to use [ and ] instead.
61934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61935  if test "x$has_forbidden_chars" != x; then
61936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61940      # Going to short mode and back again did indeed matter. Since short mode is
61941      # case insensitive, let's make it lowercase to improve readability.
61942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61943      # Now convert it back to Unix-style (cygpath)
61944      input_path=`$CYGPATH -u "$shortmode_path"`
61945      new_path="$input_path"
61946    fi
61947  fi
61948
61949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61950  if test "x$test_cygdrive_prefix" = x; then
61951    # As a simple fix, exclude /usr/bin since it's not a real path.
61952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61954      # a path prefixed by /cygdrive for fixpath to work.
61955      new_path="$CYGWIN_ROOT_PATH$input_path"
61956    fi
61957  fi
61958
61959
61960  if test "x$path" != "x$new_path"; then
61961    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61964  fi
61965
61966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61967
61968  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61969  has_colon=`$ECHO $path | $GREP ^.:`
61970  new_path="$path"
61971  if test "x$has_colon" = x; then
61972    # Not in mixed or Windows style, start by that.
61973    new_path=`cmd //c echo $path`
61974  fi
61975
61976
61977  input_path="$new_path"
61978  # Check if we need to convert this using DOS-style short mode. If the path
61979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61980  # take no chances and rewrite it.
61981  # Note: m4 eats our [], so we need to use [ and ] instead.
61982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61983  if test "x$has_forbidden_chars" != x; then
61984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61986  fi
61987
61988
61989  windows_path="$new_path"
61990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61991    unix_path=`$CYGPATH -u "$windows_path"`
61992    new_path="$unix_path"
61993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61995    new_path="$unix_path"
61996  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62006
62007    else
62008      # We're on a unix platform. Hooray! :)
62009      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62010      has_space=`$ECHO "$path" | $GREP " "`
62011      if test "x$has_space" != x; then
62012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62015      fi
62016
62017      # Use eval to expand a potential ~
62018      eval path="$path"
62019      if test ! -f "$path" && test ! -d "$path"; then
62020        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62021      fi
62022
62023      if test -d "$path"; then
62024        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62025      else
62026        dir="`$DIRNAME "$path"`"
62027        base="`$BASENAME "$path"`"
62028        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62029      fi
62030    fi
62031  fi
62032
62033
62034  # Only process if variable expands to non-empty
62035
62036  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62038
62039  # Input might be given as Windows format, start by converting to
62040  # unix format.
62041  path="$POTENTIAL_FREETYPE_LIB_PATH"
62042  new_path=`$CYGPATH -u "$path"`
62043
62044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62047  # "foo.exe" is OK but "foo" is an error.
62048  #
62049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62050  # It is also a way to make sure we got the proper file name for the real test later on.
62051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62052  if test "x$test_shortpath" = x; then
62053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62055    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62056  fi
62057
62058  # Call helper function which possibly converts this using DOS-style short mode.
62059  # If so, the updated path is stored in $new_path.
62060
62061  input_path="$new_path"
62062  # Check if we need to convert this using DOS-style short mode. If the path
62063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62064  # take no chances and rewrite it.
62065  # Note: m4 eats our [], so we need to use [ and ] instead.
62066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62067  if test "x$has_forbidden_chars" != x; then
62068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62072      # Going to short mode and back again did indeed matter. Since short mode is
62073      # case insensitive, let's make it lowercase to improve readability.
62074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62075      # Now convert it back to Unix-style (cygpath)
62076      input_path=`$CYGPATH -u "$shortmode_path"`
62077      new_path="$input_path"
62078    fi
62079  fi
62080
62081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62082  if test "x$test_cygdrive_prefix" = x; then
62083    # As a simple fix, exclude /usr/bin since it's not a real path.
62084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62086      # a path prefixed by /cygdrive for fixpath to work.
62087      new_path="$CYGWIN_ROOT_PATH$input_path"
62088    fi
62089  fi
62090
62091
62092  if test "x$path" != "x$new_path"; then
62093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62096  fi
62097
62098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62099
62100  path="$POTENTIAL_FREETYPE_LIB_PATH"
62101  has_colon=`$ECHO $path | $GREP ^.:`
62102  new_path="$path"
62103  if test "x$has_colon" = x; then
62104    # Not in mixed or Windows style, start by that.
62105    new_path=`cmd //c echo $path`
62106  fi
62107
62108
62109  input_path="$new_path"
62110  # Check if we need to convert this using DOS-style short mode. If the path
62111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62112  # take no chances and rewrite it.
62113  # Note: m4 eats our [], so we need to use [ and ] instead.
62114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62115  if test "x$has_forbidden_chars" != x; then
62116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62118  fi
62119
62120
62121  windows_path="$new_path"
62122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62123    unix_path=`$CYGPATH -u "$windows_path"`
62124    new_path="$unix_path"
62125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62127    new_path="$unix_path"
62128  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62138
62139    else
62140      # We're on a unix platform. Hooray! :)
62141      path="$POTENTIAL_FREETYPE_LIB_PATH"
62142      has_space=`$ECHO "$path" | $GREP " "`
62143      if test "x$has_space" != x; then
62144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62147      fi
62148
62149      # Use eval to expand a potential ~
62150      eval path="$path"
62151      if test ! -f "$path" && test ! -d "$path"; then
62152        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62153      fi
62154
62155      if test -d "$path"; then
62156        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62157      else
62158        dir="`$DIRNAME "$path"`"
62159        base="`$BASENAME "$path"`"
62160        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62161      fi
62162    fi
62163  fi
62164
62165
62166    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62168$as_echo_n "checking for freetype includes... " >&6; }
62169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62170$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62171    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62173$as_echo_n "checking for freetype libraries... " >&6; }
62174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62175$as_echo "$FREETYPE_LIB_PATH" >&6; }
62176  fi
62177
62178          fi
62179
62180          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62181            if test "x$FOUND_FREETYPE" != xyes; then
62182              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62183              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62184
62185  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62186  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62187  METHOD="well-known location"
62188
62189  # Let's start with an optimistic view of the world :-)
62190  FOUND_FREETYPE=yes
62191
62192  # First look for the canonical freetype main include file ft2build.h.
62193  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62194    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62195    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62196    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62197      # Fail.
62198      FOUND_FREETYPE=no
62199    fi
62200  fi
62201
62202  if test "x$FOUND_FREETYPE" = xyes; then
62203    # Include file found, let's continue the sanity check.
62204    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62205$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62206
62207    # Reset to default value
62208    FREETYPE_BASE_NAME=freetype
62209    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62210    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62211      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62212          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62213        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62214        # for the .6 version explicitly.
62215        FREETYPE_BASE_NAME=freetype.6
62216        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62217        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62218$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62219      else
62220        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62221$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62222        FOUND_FREETYPE=no
62223      fi
62224    else
62225      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62226        # On Windows, we will need both .lib and .dll file.
62227        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62228          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62229$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62230          FOUND_FREETYPE=no
62231        fi
62232      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62233          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62234        # Found lib in isa dir, use that instead.
62235        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62236        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62237$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62238      fi
62239    fi
62240  fi
62241
62242  if test "x$FOUND_FREETYPE" = xyes; then
62243
62244  # Only process if variable expands to non-empty
62245
62246  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62248
62249  # Input might be given as Windows format, start by converting to
62250  # unix format.
62251  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62252  new_path=`$CYGPATH -u "$path"`
62253
62254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62257  # "foo.exe" is OK but "foo" is an error.
62258  #
62259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62260  # It is also a way to make sure we got the proper file name for the real test later on.
62261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62262  if test "x$test_shortpath" = x; then
62263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62265    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62266  fi
62267
62268  # Call helper function which possibly converts this using DOS-style short mode.
62269  # If so, the updated path is stored in $new_path.
62270
62271  input_path="$new_path"
62272  # Check if we need to convert this using DOS-style short mode. If the path
62273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62274  # take no chances and rewrite it.
62275  # Note: m4 eats our [], so we need to use [ and ] instead.
62276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62277  if test "x$has_forbidden_chars" != x; then
62278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62282      # Going to short mode and back again did indeed matter. Since short mode is
62283      # case insensitive, let's make it lowercase to improve readability.
62284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62285      # Now convert it back to Unix-style (cygpath)
62286      input_path=`$CYGPATH -u "$shortmode_path"`
62287      new_path="$input_path"
62288    fi
62289  fi
62290
62291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62292  if test "x$test_cygdrive_prefix" = x; then
62293    # As a simple fix, exclude /usr/bin since it's not a real path.
62294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62296      # a path prefixed by /cygdrive for fixpath to work.
62297      new_path="$CYGWIN_ROOT_PATH$input_path"
62298    fi
62299  fi
62300
62301
62302  if test "x$path" != "x$new_path"; then
62303    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62306  fi
62307
62308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62309
62310  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62311  has_colon=`$ECHO $path | $GREP ^.:`
62312  new_path="$path"
62313  if test "x$has_colon" = x; then
62314    # Not in mixed or Windows style, start by that.
62315    new_path=`cmd //c echo $path`
62316  fi
62317
62318
62319  input_path="$new_path"
62320  # Check if we need to convert this using DOS-style short mode. If the path
62321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62322  # take no chances and rewrite it.
62323  # Note: m4 eats our [], so we need to use [ and ] instead.
62324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62325  if test "x$has_forbidden_chars" != x; then
62326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62328  fi
62329
62330
62331  windows_path="$new_path"
62332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62333    unix_path=`$CYGPATH -u "$windows_path"`
62334    new_path="$unix_path"
62335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62337    new_path="$unix_path"
62338  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62348
62349    else
62350      # We're on a unix platform. Hooray! :)
62351      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62352      has_space=`$ECHO "$path" | $GREP " "`
62353      if test "x$has_space" != x; then
62354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62355$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62356        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62357      fi
62358
62359      # Use eval to expand a potential ~
62360      eval path="$path"
62361      if test ! -f "$path" && test ! -d "$path"; then
62362        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62363      fi
62364
62365      if test -d "$path"; then
62366        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62367      else
62368        dir="`$DIRNAME "$path"`"
62369        base="`$BASENAME "$path"`"
62370        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62371      fi
62372    fi
62373  fi
62374
62375
62376  # Only process if variable expands to non-empty
62377
62378  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62380
62381  # Input might be given as Windows format, start by converting to
62382  # unix format.
62383  path="$POTENTIAL_FREETYPE_LIB_PATH"
62384  new_path=`$CYGPATH -u "$path"`
62385
62386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62389  # "foo.exe" is OK but "foo" is an error.
62390  #
62391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62392  # It is also a way to make sure we got the proper file name for the real test later on.
62393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62394  if test "x$test_shortpath" = x; then
62395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62397    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62398  fi
62399
62400  # Call helper function which possibly converts this using DOS-style short mode.
62401  # If so, the updated path is stored in $new_path.
62402
62403  input_path="$new_path"
62404  # Check if we need to convert this using DOS-style short mode. If the path
62405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62406  # take no chances and rewrite it.
62407  # Note: m4 eats our [], so we need to use [ and ] instead.
62408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62409  if test "x$has_forbidden_chars" != x; then
62410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62414      # Going to short mode and back again did indeed matter. Since short mode is
62415      # case insensitive, let's make it lowercase to improve readability.
62416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62417      # Now convert it back to Unix-style (cygpath)
62418      input_path=`$CYGPATH -u "$shortmode_path"`
62419      new_path="$input_path"
62420    fi
62421  fi
62422
62423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62424  if test "x$test_cygdrive_prefix" = x; then
62425    # As a simple fix, exclude /usr/bin since it's not a real path.
62426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62428      # a path prefixed by /cygdrive for fixpath to work.
62429      new_path="$CYGWIN_ROOT_PATH$input_path"
62430    fi
62431  fi
62432
62433
62434  if test "x$path" != "x$new_path"; then
62435    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62437$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62438  fi
62439
62440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62441
62442  path="$POTENTIAL_FREETYPE_LIB_PATH"
62443  has_colon=`$ECHO $path | $GREP ^.:`
62444  new_path="$path"
62445  if test "x$has_colon" = x; then
62446    # Not in mixed or Windows style, start by that.
62447    new_path=`cmd //c echo $path`
62448  fi
62449
62450
62451  input_path="$new_path"
62452  # Check if we need to convert this using DOS-style short mode. If the path
62453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62454  # take no chances and rewrite it.
62455  # Note: m4 eats our [], so we need to use [ and ] instead.
62456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62457  if test "x$has_forbidden_chars" != x; then
62458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62460  fi
62461
62462
62463  windows_path="$new_path"
62464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62465    unix_path=`$CYGPATH -u "$windows_path"`
62466    new_path="$unix_path"
62467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62469    new_path="$unix_path"
62470  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62480
62481    else
62482      # We're on a unix platform. Hooray! :)
62483      path="$POTENTIAL_FREETYPE_LIB_PATH"
62484      has_space=`$ECHO "$path" | $GREP " "`
62485      if test "x$has_space" != x; then
62486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62489      fi
62490
62491      # Use eval to expand a potential ~
62492      eval path="$path"
62493      if test ! -f "$path" && test ! -d "$path"; then
62494        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62495      fi
62496
62497      if test -d "$path"; then
62498        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62499      else
62500        dir="`$DIRNAME "$path"`"
62501        base="`$BASENAME "$path"`"
62502        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62503      fi
62504    fi
62505  fi
62506
62507
62508    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62510$as_echo_n "checking for freetype includes... " >&6; }
62511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62512$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62513    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62515$as_echo_n "checking for freetype libraries... " >&6; }
62516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62517$as_echo "$FREETYPE_LIB_PATH" >&6; }
62518  fi
62519
62520            fi
62521          fi
62522
62523          if test "x$FOUND_FREETYPE" != xyes; then
62524            FREETYPE_BASE_DIR="$SYSROOT/usr"
62525            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62526
62527  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62528  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62529  METHOD="well-known location"
62530
62531  # Let's start with an optimistic view of the world :-)
62532  FOUND_FREETYPE=yes
62533
62534  # First look for the canonical freetype main include file ft2build.h.
62535  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62536    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62537    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62538    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62539      # Fail.
62540      FOUND_FREETYPE=no
62541    fi
62542  fi
62543
62544  if test "x$FOUND_FREETYPE" = xyes; then
62545    # Include file found, let's continue the sanity check.
62546    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62547$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62548
62549    # Reset to default value
62550    FREETYPE_BASE_NAME=freetype
62551    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62552    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62553      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62554          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62555        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62556        # for the .6 version explicitly.
62557        FREETYPE_BASE_NAME=freetype.6
62558        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62559        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62560$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62561      else
62562        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62563$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62564        FOUND_FREETYPE=no
62565      fi
62566    else
62567      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62568        # On Windows, we will need both .lib and .dll file.
62569        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62570          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62571$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62572          FOUND_FREETYPE=no
62573        fi
62574      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62575          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62576        # Found lib in isa dir, use that instead.
62577        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62578        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62579$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62580      fi
62581    fi
62582  fi
62583
62584  if test "x$FOUND_FREETYPE" = xyes; then
62585
62586  # Only process if variable expands to non-empty
62587
62588  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62590
62591  # Input might be given as Windows format, start by converting to
62592  # unix format.
62593  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62594  new_path=`$CYGPATH -u "$path"`
62595
62596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62599  # "foo.exe" is OK but "foo" is an error.
62600  #
62601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62602  # It is also a way to make sure we got the proper file name for the real test later on.
62603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62604  if test "x$test_shortpath" = x; then
62605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62607    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62608  fi
62609
62610  # Call helper function which possibly converts this using DOS-style short mode.
62611  # If so, the updated path is stored in $new_path.
62612
62613  input_path="$new_path"
62614  # Check if we need to convert this using DOS-style short mode. If the path
62615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62616  # take no chances and rewrite it.
62617  # Note: m4 eats our [], so we need to use [ and ] instead.
62618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62619  if test "x$has_forbidden_chars" != x; then
62620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62624      # Going to short mode and back again did indeed matter. Since short mode is
62625      # case insensitive, let's make it lowercase to improve readability.
62626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62627      # Now convert it back to Unix-style (cygpath)
62628      input_path=`$CYGPATH -u "$shortmode_path"`
62629      new_path="$input_path"
62630    fi
62631  fi
62632
62633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62634  if test "x$test_cygdrive_prefix" = x; then
62635    # As a simple fix, exclude /usr/bin since it's not a real path.
62636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62638      # a path prefixed by /cygdrive for fixpath to work.
62639      new_path="$CYGWIN_ROOT_PATH$input_path"
62640    fi
62641  fi
62642
62643
62644  if test "x$path" != "x$new_path"; then
62645    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62648  fi
62649
62650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62651
62652  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62653  has_colon=`$ECHO $path | $GREP ^.:`
62654  new_path="$path"
62655  if test "x$has_colon" = x; then
62656    # Not in mixed or Windows style, start by that.
62657    new_path=`cmd //c echo $path`
62658  fi
62659
62660
62661  input_path="$new_path"
62662  # Check if we need to convert this using DOS-style short mode. If the path
62663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62664  # take no chances and rewrite it.
62665  # Note: m4 eats our [], so we need to use [ and ] instead.
62666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62667  if test "x$has_forbidden_chars" != x; then
62668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62670  fi
62671
62672
62673  windows_path="$new_path"
62674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62675    unix_path=`$CYGPATH -u "$windows_path"`
62676    new_path="$unix_path"
62677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62679    new_path="$unix_path"
62680  fi
62681
62682  if test "x$path" != "x$new_path"; then
62683    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62686  fi
62687
62688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62690
62691    else
62692      # We're on a unix platform. Hooray! :)
62693      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62694      has_space=`$ECHO "$path" | $GREP " "`
62695      if test "x$has_space" != x; then
62696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62699      fi
62700
62701      # Use eval to expand a potential ~
62702      eval path="$path"
62703      if test ! -f "$path" && test ! -d "$path"; then
62704        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62705      fi
62706
62707      if test -d "$path"; then
62708        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62709      else
62710        dir="`$DIRNAME "$path"`"
62711        base="`$BASENAME "$path"`"
62712        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62713      fi
62714    fi
62715  fi
62716
62717
62718  # Only process if variable expands to non-empty
62719
62720  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62722
62723  # Input might be given as Windows format, start by converting to
62724  # unix format.
62725  path="$POTENTIAL_FREETYPE_LIB_PATH"
62726  new_path=`$CYGPATH -u "$path"`
62727
62728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62731  # "foo.exe" is OK but "foo" is an error.
62732  #
62733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62734  # It is also a way to make sure we got the proper file name for the real test later on.
62735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62736  if test "x$test_shortpath" = x; then
62737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62739    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62740  fi
62741
62742  # Call helper function which possibly converts this using DOS-style short mode.
62743  # If so, the updated path is stored in $new_path.
62744
62745  input_path="$new_path"
62746  # Check if we need to convert this using DOS-style short mode. If the path
62747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62748  # take no chances and rewrite it.
62749  # Note: m4 eats our [], so we need to use [ and ] instead.
62750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62751  if test "x$has_forbidden_chars" != x; then
62752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62756      # Going to short mode and back again did indeed matter. Since short mode is
62757      # case insensitive, let's make it lowercase to improve readability.
62758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62759      # Now convert it back to Unix-style (cygpath)
62760      input_path=`$CYGPATH -u "$shortmode_path"`
62761      new_path="$input_path"
62762    fi
62763  fi
62764
62765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62766  if test "x$test_cygdrive_prefix" = x; then
62767    # As a simple fix, exclude /usr/bin since it's not a real path.
62768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62770      # a path prefixed by /cygdrive for fixpath to work.
62771      new_path="$CYGWIN_ROOT_PATH$input_path"
62772    fi
62773  fi
62774
62775
62776  if test "x$path" != "x$new_path"; then
62777    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62780  fi
62781
62782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62783
62784  path="$POTENTIAL_FREETYPE_LIB_PATH"
62785  has_colon=`$ECHO $path | $GREP ^.:`
62786  new_path="$path"
62787  if test "x$has_colon" = x; then
62788    # Not in mixed or Windows style, start by that.
62789    new_path=`cmd //c echo $path`
62790  fi
62791
62792
62793  input_path="$new_path"
62794  # Check if we need to convert this using DOS-style short mode. If the path
62795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62796  # take no chances and rewrite it.
62797  # Note: m4 eats our [], so we need to use [ and ] instead.
62798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62799  if test "x$has_forbidden_chars" != x; then
62800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62802  fi
62803
62804
62805  windows_path="$new_path"
62806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62807    unix_path=`$CYGPATH -u "$windows_path"`
62808    new_path="$unix_path"
62809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62811    new_path="$unix_path"
62812  fi
62813
62814  if test "x$path" != "x$new_path"; then
62815    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62817$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62818  fi
62819
62820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62822
62823    else
62824      # We're on a unix platform. Hooray! :)
62825      path="$POTENTIAL_FREETYPE_LIB_PATH"
62826      has_space=`$ECHO "$path" | $GREP " "`
62827      if test "x$has_space" != x; then
62828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62831      fi
62832
62833      # Use eval to expand a potential ~
62834      eval path="$path"
62835      if test ! -f "$path" && test ! -d "$path"; then
62836        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62837      fi
62838
62839      if test -d "$path"; then
62840        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62841      else
62842        dir="`$DIRNAME "$path"`"
62843        base="`$BASENAME "$path"`"
62844        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62845      fi
62846    fi
62847  fi
62848
62849
62850    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62852$as_echo_n "checking for freetype includes... " >&6; }
62853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62854$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62855    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62857$as_echo_n "checking for freetype libraries... " >&6; }
62858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62859$as_echo "$FREETYPE_LIB_PATH" >&6; }
62860  fi
62861
62862            else
62863
62864  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62865  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62866  METHOD="well-known location"
62867
62868  # Let's start with an optimistic view of the world :-)
62869  FOUND_FREETYPE=yes
62870
62871  # First look for the canonical freetype main include file ft2build.h.
62872  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62873    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62874    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62875    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62876      # Fail.
62877      FOUND_FREETYPE=no
62878    fi
62879  fi
62880
62881  if test "x$FOUND_FREETYPE" = xyes; then
62882    # Include file found, let's continue the sanity check.
62883    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62884$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62885
62886    # Reset to default value
62887    FREETYPE_BASE_NAME=freetype
62888    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62889    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62890      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62891          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62892        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62893        # for the .6 version explicitly.
62894        FREETYPE_BASE_NAME=freetype.6
62895        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62896        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62897$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62898      else
62899        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62900$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62901        FOUND_FREETYPE=no
62902      fi
62903    else
62904      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62905        # On Windows, we will need both .lib and .dll file.
62906        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62907          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62908$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62909          FOUND_FREETYPE=no
62910        fi
62911      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62912          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62913        # Found lib in isa dir, use that instead.
62914        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62915        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62916$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62917      fi
62918    fi
62919  fi
62920
62921  if test "x$FOUND_FREETYPE" = xyes; then
62922
62923  # Only process if variable expands to non-empty
62924
62925  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62927
62928  # Input might be given as Windows format, start by converting to
62929  # unix format.
62930  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62931  new_path=`$CYGPATH -u "$path"`
62932
62933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62936  # "foo.exe" is OK but "foo" is an error.
62937  #
62938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62939  # It is also a way to make sure we got the proper file name for the real test later on.
62940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62941  if test "x$test_shortpath" = x; then
62942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62944    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62945  fi
62946
62947  # Call helper function which possibly converts this using DOS-style short mode.
62948  # If so, the updated path is stored in $new_path.
62949
62950  input_path="$new_path"
62951  # Check if we need to convert this using DOS-style short mode. If the path
62952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62953  # take no chances and rewrite it.
62954  # Note: m4 eats our [], so we need to use [ and ] instead.
62955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62956  if test "x$has_forbidden_chars" != x; then
62957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62961      # Going to short mode and back again did indeed matter. Since short mode is
62962      # case insensitive, let's make it lowercase to improve readability.
62963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62964      # Now convert it back to Unix-style (cygpath)
62965      input_path=`$CYGPATH -u "$shortmode_path"`
62966      new_path="$input_path"
62967    fi
62968  fi
62969
62970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62971  if test "x$test_cygdrive_prefix" = x; then
62972    # As a simple fix, exclude /usr/bin since it's not a real path.
62973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62975      # a path prefixed by /cygdrive for fixpath to work.
62976      new_path="$CYGWIN_ROOT_PATH$input_path"
62977    fi
62978  fi
62979
62980
62981  if test "x$path" != "x$new_path"; then
62982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62985  fi
62986
62987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62988
62989  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62990  has_colon=`$ECHO $path | $GREP ^.:`
62991  new_path="$path"
62992  if test "x$has_colon" = x; then
62993    # Not in mixed or Windows style, start by that.
62994    new_path=`cmd //c echo $path`
62995  fi
62996
62997
62998  input_path="$new_path"
62999  # Check if we need to convert this using DOS-style short mode. If the path
63000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63001  # take no chances and rewrite it.
63002  # Note: m4 eats our [], so we need to use [ and ] instead.
63003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63004  if test "x$has_forbidden_chars" != x; then
63005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63007  fi
63008
63009
63010  windows_path="$new_path"
63011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63012    unix_path=`$CYGPATH -u "$windows_path"`
63013    new_path="$unix_path"
63014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63016    new_path="$unix_path"
63017  fi
63018
63019  if test "x$path" != "x$new_path"; then
63020    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63023  fi
63024
63025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63027
63028    else
63029      # We're on a unix platform. Hooray! :)
63030      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63031      has_space=`$ECHO "$path" | $GREP " "`
63032      if test "x$has_space" != x; then
63033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63034$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63036      fi
63037
63038      # Use eval to expand a potential ~
63039      eval path="$path"
63040      if test ! -f "$path" && test ! -d "$path"; then
63041        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63042      fi
63043
63044      if test -d "$path"; then
63045        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63046      else
63047        dir="`$DIRNAME "$path"`"
63048        base="`$BASENAME "$path"`"
63049        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63050      fi
63051    fi
63052  fi
63053
63054
63055  # Only process if variable expands to non-empty
63056
63057  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63059
63060  # Input might be given as Windows format, start by converting to
63061  # unix format.
63062  path="$POTENTIAL_FREETYPE_LIB_PATH"
63063  new_path=`$CYGPATH -u "$path"`
63064
63065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63068  # "foo.exe" is OK but "foo" is an error.
63069  #
63070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63071  # It is also a way to make sure we got the proper file name for the real test later on.
63072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63073  if test "x$test_shortpath" = x; then
63074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63076    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63077  fi
63078
63079  # Call helper function which possibly converts this using DOS-style short mode.
63080  # If so, the updated path is stored in $new_path.
63081
63082  input_path="$new_path"
63083  # Check if we need to convert this using DOS-style short mode. If the path
63084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63085  # take no chances and rewrite it.
63086  # Note: m4 eats our [], so we need to use [ and ] instead.
63087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63088  if test "x$has_forbidden_chars" != x; then
63089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63093      # Going to short mode and back again did indeed matter. Since short mode is
63094      # case insensitive, let's make it lowercase to improve readability.
63095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63096      # Now convert it back to Unix-style (cygpath)
63097      input_path=`$CYGPATH -u "$shortmode_path"`
63098      new_path="$input_path"
63099    fi
63100  fi
63101
63102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63103  if test "x$test_cygdrive_prefix" = x; then
63104    # As a simple fix, exclude /usr/bin since it's not a real path.
63105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63107      # a path prefixed by /cygdrive for fixpath to work.
63108      new_path="$CYGWIN_ROOT_PATH$input_path"
63109    fi
63110  fi
63111
63112
63113  if test "x$path" != "x$new_path"; then
63114    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63117  fi
63118
63119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63120
63121  path="$POTENTIAL_FREETYPE_LIB_PATH"
63122  has_colon=`$ECHO $path | $GREP ^.:`
63123  new_path="$path"
63124  if test "x$has_colon" = x; then
63125    # Not in mixed or Windows style, start by that.
63126    new_path=`cmd //c echo $path`
63127  fi
63128
63129
63130  input_path="$new_path"
63131  # Check if we need to convert this using DOS-style short mode. If the path
63132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63133  # take no chances and rewrite it.
63134  # Note: m4 eats our [], so we need to use [ and ] instead.
63135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63136  if test "x$has_forbidden_chars" != x; then
63137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63139  fi
63140
63141
63142  windows_path="$new_path"
63143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63144    unix_path=`$CYGPATH -u "$windows_path"`
63145    new_path="$unix_path"
63146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63148    new_path="$unix_path"
63149  fi
63150
63151  if test "x$path" != "x$new_path"; then
63152    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63154$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63155  fi
63156
63157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63159
63160    else
63161      # We're on a unix platform. Hooray! :)
63162      path="$POTENTIAL_FREETYPE_LIB_PATH"
63163      has_space=`$ECHO "$path" | $GREP " "`
63164      if test "x$has_space" != x; then
63165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63166$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63167        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63168      fi
63169
63170      # Use eval to expand a potential ~
63171      eval path="$path"
63172      if test ! -f "$path" && test ! -d "$path"; then
63173        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63174      fi
63175
63176      if test -d "$path"; then
63177        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63178      else
63179        dir="`$DIRNAME "$path"`"
63180        base="`$BASENAME "$path"`"
63181        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63182      fi
63183    fi
63184  fi
63185
63186
63187    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63189$as_echo_n "checking for freetype includes... " >&6; }
63190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63191$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63192    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63194$as_echo_n "checking for freetype libraries... " >&6; }
63195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63196$as_echo "$FREETYPE_LIB_PATH" >&6; }
63197  fi
63198
63199              if test "x$FOUND_FREETYPE" != xyes; then
63200
63201  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63202  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63203  METHOD="well-known location"
63204
63205  # Let's start with an optimistic view of the world :-)
63206  FOUND_FREETYPE=yes
63207
63208  # First look for the canonical freetype main include file ft2build.h.
63209  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63210    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63211    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63212    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63213      # Fail.
63214      FOUND_FREETYPE=no
63215    fi
63216  fi
63217
63218  if test "x$FOUND_FREETYPE" = xyes; then
63219    # Include file found, let's continue the sanity check.
63220    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63221$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63222
63223    # Reset to default value
63224    FREETYPE_BASE_NAME=freetype
63225    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63226    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63227      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63228          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63229        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63230        # for the .6 version explicitly.
63231        FREETYPE_BASE_NAME=freetype.6
63232        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63233        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63234$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63235      else
63236        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63237$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63238        FOUND_FREETYPE=no
63239      fi
63240    else
63241      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63242        # On Windows, we will need both .lib and .dll file.
63243        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63244          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63245$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63246          FOUND_FREETYPE=no
63247        fi
63248      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63249          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63250        # Found lib in isa dir, use that instead.
63251        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63252        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63253$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63254      fi
63255    fi
63256  fi
63257
63258  if test "x$FOUND_FREETYPE" = xyes; then
63259
63260  # Only process if variable expands to non-empty
63261
63262  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63264
63265  # Input might be given as Windows format, start by converting to
63266  # unix format.
63267  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63268  new_path=`$CYGPATH -u "$path"`
63269
63270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63273  # "foo.exe" is OK but "foo" is an error.
63274  #
63275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63276  # It is also a way to make sure we got the proper file name for the real test later on.
63277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63278  if test "x$test_shortpath" = x; then
63279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63281    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63282  fi
63283
63284  # Call helper function which possibly converts this using DOS-style short mode.
63285  # If so, the updated path is stored in $new_path.
63286
63287  input_path="$new_path"
63288  # Check if we need to convert this using DOS-style short mode. If the path
63289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63290  # take no chances and rewrite it.
63291  # Note: m4 eats our [], so we need to use [ and ] instead.
63292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63293  if test "x$has_forbidden_chars" != x; then
63294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63298      # Going to short mode and back again did indeed matter. Since short mode is
63299      # case insensitive, let's make it lowercase to improve readability.
63300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63301      # Now convert it back to Unix-style (cygpath)
63302      input_path=`$CYGPATH -u "$shortmode_path"`
63303      new_path="$input_path"
63304    fi
63305  fi
63306
63307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63308  if test "x$test_cygdrive_prefix" = x; then
63309    # As a simple fix, exclude /usr/bin since it's not a real path.
63310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63312      # a path prefixed by /cygdrive for fixpath to work.
63313      new_path="$CYGWIN_ROOT_PATH$input_path"
63314    fi
63315  fi
63316
63317
63318  if test "x$path" != "x$new_path"; then
63319    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63322  fi
63323
63324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63325
63326  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63327  has_colon=`$ECHO $path | $GREP ^.:`
63328  new_path="$path"
63329  if test "x$has_colon" = x; then
63330    # Not in mixed or Windows style, start by that.
63331    new_path=`cmd //c echo $path`
63332  fi
63333
63334
63335  input_path="$new_path"
63336  # Check if we need to convert this using DOS-style short mode. If the path
63337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63338  # take no chances and rewrite it.
63339  # Note: m4 eats our [], so we need to use [ and ] instead.
63340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63341  if test "x$has_forbidden_chars" != x; then
63342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63344  fi
63345
63346
63347  windows_path="$new_path"
63348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63349    unix_path=`$CYGPATH -u "$windows_path"`
63350    new_path="$unix_path"
63351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63353    new_path="$unix_path"
63354  fi
63355
63356  if test "x$path" != "x$new_path"; then
63357    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63360  fi
63361
63362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63364
63365    else
63366      # We're on a unix platform. Hooray! :)
63367      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63368      has_space=`$ECHO "$path" | $GREP " "`
63369      if test "x$has_space" != x; then
63370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63373      fi
63374
63375      # Use eval to expand a potential ~
63376      eval path="$path"
63377      if test ! -f "$path" && test ! -d "$path"; then
63378        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63379      fi
63380
63381      if test -d "$path"; then
63382        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63383      else
63384        dir="`$DIRNAME "$path"`"
63385        base="`$BASENAME "$path"`"
63386        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63387      fi
63388    fi
63389  fi
63390
63391
63392  # Only process if variable expands to non-empty
63393
63394  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63396
63397  # Input might be given as Windows format, start by converting to
63398  # unix format.
63399  path="$POTENTIAL_FREETYPE_LIB_PATH"
63400  new_path=`$CYGPATH -u "$path"`
63401
63402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63405  # "foo.exe" is OK but "foo" is an error.
63406  #
63407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63408  # It is also a way to make sure we got the proper file name for the real test later on.
63409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63410  if test "x$test_shortpath" = x; then
63411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63412$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63413    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63414  fi
63415
63416  # Call helper function which possibly converts this using DOS-style short mode.
63417  # If so, the updated path is stored in $new_path.
63418
63419  input_path="$new_path"
63420  # Check if we need to convert this using DOS-style short mode. If the path
63421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63422  # take no chances and rewrite it.
63423  # Note: m4 eats our [], so we need to use [ and ] instead.
63424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63425  if test "x$has_forbidden_chars" != x; then
63426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63430      # Going to short mode and back again did indeed matter. Since short mode is
63431      # case insensitive, let's make it lowercase to improve readability.
63432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63433      # Now convert it back to Unix-style (cygpath)
63434      input_path=`$CYGPATH -u "$shortmode_path"`
63435      new_path="$input_path"
63436    fi
63437  fi
63438
63439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63440  if test "x$test_cygdrive_prefix" = x; then
63441    # As a simple fix, exclude /usr/bin since it's not a real path.
63442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63444      # a path prefixed by /cygdrive for fixpath to work.
63445      new_path="$CYGWIN_ROOT_PATH$input_path"
63446    fi
63447  fi
63448
63449
63450  if test "x$path" != "x$new_path"; then
63451    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63454  fi
63455
63456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63457
63458  path="$POTENTIAL_FREETYPE_LIB_PATH"
63459  has_colon=`$ECHO $path | $GREP ^.:`
63460  new_path="$path"
63461  if test "x$has_colon" = x; then
63462    # Not in mixed or Windows style, start by that.
63463    new_path=`cmd //c echo $path`
63464  fi
63465
63466
63467  input_path="$new_path"
63468  # Check if we need to convert this using DOS-style short mode. If the path
63469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63470  # take no chances and rewrite it.
63471  # Note: m4 eats our [], so we need to use [ and ] instead.
63472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63473  if test "x$has_forbidden_chars" != x; then
63474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63476  fi
63477
63478
63479  windows_path="$new_path"
63480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63481    unix_path=`$CYGPATH -u "$windows_path"`
63482    new_path="$unix_path"
63483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63485    new_path="$unix_path"
63486  fi
63487
63488  if test "x$path" != "x$new_path"; then
63489    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63492  fi
63493
63494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63496
63497    else
63498      # We're on a unix platform. Hooray! :)
63499      path="$POTENTIAL_FREETYPE_LIB_PATH"
63500      has_space=`$ECHO "$path" | $GREP " "`
63501      if test "x$has_space" != x; then
63502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63503$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63505      fi
63506
63507      # Use eval to expand a potential ~
63508      eval path="$path"
63509      if test ! -f "$path" && test ! -d "$path"; then
63510        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63511      fi
63512
63513      if test -d "$path"; then
63514        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63515      else
63516        dir="`$DIRNAME "$path"`"
63517        base="`$BASENAME "$path"`"
63518        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63519      fi
63520    fi
63521  fi
63522
63523
63524    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63526$as_echo_n "checking for freetype includes... " >&6; }
63527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63528$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63529    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63531$as_echo_n "checking for freetype libraries... " >&6; }
63532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63533$as_echo "$FREETYPE_LIB_PATH" >&6; }
63534  fi
63535
63536              fi
63537            fi
63538          fi
63539        fi
63540      fi # end check in well-known locations
63541
63542      if test "x$FOUND_FREETYPE" != xyes; then
63543
63544  # Print a helpful message on how to acquire the necessary build dependency.
63545  # freetype is the help tag: freetype, cups, alsa etc
63546  MISSING_DEPENDENCY=freetype
63547
63548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63549    cygwin_help $MISSING_DEPENDENCY
63550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63551    msys_help $MISSING_DEPENDENCY
63552  else
63553    PKGHANDLER_COMMAND=
63554
63555    case $PKGHANDLER in
63556      apt-get)
63557        apt_help     $MISSING_DEPENDENCY ;;
63558      yum)
63559        yum_help     $MISSING_DEPENDENCY ;;
63560      brew)
63561        brew_help    $MISSING_DEPENDENCY ;;
63562      port)
63563        port_help    $MISSING_DEPENDENCY ;;
63564      pkgutil)
63565        pkgutil_help $MISSING_DEPENDENCY ;;
63566      pkgadd)
63567        pkgadd_help  $MISSING_DEPENDENCY ;;
63568    esac
63569
63570    if test "x$PKGHANDLER_COMMAND" != x; then
63571      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63572    fi
63573  fi
63574
63575        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63576      fi
63577    fi # end user specified settings
63578
63579    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63580    if test "x$FREETYPE_CFLAGS" = x; then
63581
63582  # Only process if variable expands to non-empty
63583
63584  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63586
63587  # Input might be given as Windows format, start by converting to
63588  # unix format.
63589  path="$FREETYPE_INCLUDE_PATH"
63590  new_path=`$CYGPATH -u "$path"`
63591
63592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63595  # "foo.exe" is OK but "foo" is an error.
63596  #
63597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63598  # It is also a way to make sure we got the proper file name for the real test later on.
63599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63600  if test "x$test_shortpath" = x; then
63601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63602$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63603    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63604  fi
63605
63606  # Call helper function which possibly converts this using DOS-style short mode.
63607  # If so, the updated path is stored in $new_path.
63608
63609  input_path="$new_path"
63610  # Check if we need to convert this using DOS-style short mode. If the path
63611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63612  # take no chances and rewrite it.
63613  # Note: m4 eats our [], so we need to use [ and ] instead.
63614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63615  if test "x$has_forbidden_chars" != x; then
63616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63620      # Going to short mode and back again did indeed matter. Since short mode is
63621      # case insensitive, let's make it lowercase to improve readability.
63622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63623      # Now convert it back to Unix-style (cygpath)
63624      input_path=`$CYGPATH -u "$shortmode_path"`
63625      new_path="$input_path"
63626    fi
63627  fi
63628
63629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63630  if test "x$test_cygdrive_prefix" = x; then
63631    # As a simple fix, exclude /usr/bin since it's not a real path.
63632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63634      # a path prefixed by /cygdrive for fixpath to work.
63635      new_path="$CYGWIN_ROOT_PATH$input_path"
63636    fi
63637  fi
63638
63639
63640  if test "x$path" != "x$new_path"; then
63641    FREETYPE_INCLUDE_PATH="$new_path"
63642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63643$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63644  fi
63645
63646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63647
63648  path="$FREETYPE_INCLUDE_PATH"
63649  has_colon=`$ECHO $path | $GREP ^.:`
63650  new_path="$path"
63651  if test "x$has_colon" = x; then
63652    # Not in mixed or Windows style, start by that.
63653    new_path=`cmd //c echo $path`
63654  fi
63655
63656
63657  input_path="$new_path"
63658  # Check if we need to convert this using DOS-style short mode. If the path
63659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63660  # take no chances and rewrite it.
63661  # Note: m4 eats our [], so we need to use [ and ] instead.
63662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63663  if test "x$has_forbidden_chars" != x; then
63664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63666  fi
63667
63668
63669  windows_path="$new_path"
63670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63671    unix_path=`$CYGPATH -u "$windows_path"`
63672    new_path="$unix_path"
63673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63675    new_path="$unix_path"
63676  fi
63677
63678  if test "x$path" != "x$new_path"; then
63679    FREETYPE_INCLUDE_PATH="$new_path"
63680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63681$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63682  fi
63683
63684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63686
63687    else
63688      # We're on a unix platform. Hooray! :)
63689      path="$FREETYPE_INCLUDE_PATH"
63690      has_space=`$ECHO "$path" | $GREP " "`
63691      if test "x$has_space" != x; then
63692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63693$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63695      fi
63696
63697      # Use eval to expand a potential ~
63698      eval path="$path"
63699      if test ! -f "$path" && test ! -d "$path"; then
63700        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63701      fi
63702
63703      if test -d "$path"; then
63704        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63705      else
63706        dir="`$DIRNAME "$path"`"
63707        base="`$BASENAME "$path"`"
63708        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63709      fi
63710    fi
63711  fi
63712
63713      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63714        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63715      else
63716        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63717      fi
63718    fi
63719
63720    if test "x$FREETYPE_LIBS" = x; then
63721
63722  # Only process if variable expands to non-empty
63723
63724  if test "x$FREETYPE_LIB_PATH" != x; then
63725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63726
63727  # Input might be given as Windows format, start by converting to
63728  # unix format.
63729  path="$FREETYPE_LIB_PATH"
63730  new_path=`$CYGPATH -u "$path"`
63731
63732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63735  # "foo.exe" is OK but "foo" is an error.
63736  #
63737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63738  # It is also a way to make sure we got the proper file name for the real test later on.
63739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63740  if test "x$test_shortpath" = x; then
63741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63742$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63743    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63744  fi
63745
63746  # Call helper function which possibly converts this using DOS-style short mode.
63747  # If so, the updated path is stored in $new_path.
63748
63749  input_path="$new_path"
63750  # Check if we need to convert this using DOS-style short mode. If the path
63751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63752  # take no chances and rewrite it.
63753  # Note: m4 eats our [], so we need to use [ and ] instead.
63754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63755  if test "x$has_forbidden_chars" != x; then
63756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63760      # Going to short mode and back again did indeed matter. Since short mode is
63761      # case insensitive, let's make it lowercase to improve readability.
63762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63763      # Now convert it back to Unix-style (cygpath)
63764      input_path=`$CYGPATH -u "$shortmode_path"`
63765      new_path="$input_path"
63766    fi
63767  fi
63768
63769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63770  if test "x$test_cygdrive_prefix" = x; then
63771    # As a simple fix, exclude /usr/bin since it's not a real path.
63772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63774      # a path prefixed by /cygdrive for fixpath to work.
63775      new_path="$CYGWIN_ROOT_PATH$input_path"
63776    fi
63777  fi
63778
63779
63780  if test "x$path" != "x$new_path"; then
63781    FREETYPE_LIB_PATH="$new_path"
63782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63783$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63784  fi
63785
63786    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63787
63788  path="$FREETYPE_LIB_PATH"
63789  has_colon=`$ECHO $path | $GREP ^.:`
63790  new_path="$path"
63791  if test "x$has_colon" = x; then
63792    # Not in mixed or Windows style, start by that.
63793    new_path=`cmd //c echo $path`
63794  fi
63795
63796
63797  input_path="$new_path"
63798  # Check if we need to convert this using DOS-style short mode. If the path
63799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63800  # take no chances and rewrite it.
63801  # Note: m4 eats our [], so we need to use [ and ] instead.
63802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63803  if test "x$has_forbidden_chars" != x; then
63804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63806  fi
63807
63808
63809  windows_path="$new_path"
63810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63811    unix_path=`$CYGPATH -u "$windows_path"`
63812    new_path="$unix_path"
63813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63815    new_path="$unix_path"
63816  fi
63817
63818  if test "x$path" != "x$new_path"; then
63819    FREETYPE_LIB_PATH="$new_path"
63820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63821$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63822  fi
63823
63824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63826
63827    else
63828      # We're on a unix platform. Hooray! :)
63829      path="$FREETYPE_LIB_PATH"
63830      has_space=`$ECHO "$path" | $GREP " "`
63831      if test "x$has_space" != x; then
63832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63833$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63834        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63835      fi
63836
63837      # Use eval to expand a potential ~
63838      eval path="$path"
63839      if test ! -f "$path" && test ! -d "$path"; then
63840        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63841      fi
63842
63843      if test -d "$path"; then
63844        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63845      else
63846        dir="`$DIRNAME "$path"`"
63847        base="`$BASENAME "$path"`"
63848        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63849      fi
63850    fi
63851  fi
63852
63853      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63854        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63855      else
63856        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63857      fi
63858    fi
63859
63860    # Try to compile it
63861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63862$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63863    ac_ext=cpp
63864ac_cpp='$CXXCPP $CPPFLAGS'
63865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63868
63869    PREV_CXXCFLAGS="$CXXFLAGS"
63870    PREV_LIBS="$LIBS"
63871    PREV_CXX="$CXX"
63872    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63873    LIBS="$LIBS $FREETYPE_LIBS"
63874    CXX="$FIXPATH $CXX"
63875    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63876/* end confdefs.h.  */
63877
63878          #include<ft2build.h>
63879          #include FT_FREETYPE_H
63880          int main () {
63881            FT_Init_FreeType(NULL);
63882            return 0;
63883          }
63884
63885_ACEOF
63886if ac_fn_cxx_try_link "$LINENO"; then :
63887
63888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63889$as_echo "yes" >&6; }
63890
63891else
63892
63893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63894$as_echo "no" >&6; }
63895          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63896$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63897          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63898$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63899
63900
63901  # Print a helpful message on how to acquire the necessary build dependency.
63902  # freetype is the help tag: freetype, cups, alsa etc
63903  MISSING_DEPENDENCY=freetype
63904
63905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63906    cygwin_help $MISSING_DEPENDENCY
63907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63908    msys_help $MISSING_DEPENDENCY
63909  else
63910    PKGHANDLER_COMMAND=
63911
63912    case $PKGHANDLER in
63913      apt-get)
63914        apt_help     $MISSING_DEPENDENCY ;;
63915      yum)
63916        yum_help     $MISSING_DEPENDENCY ;;
63917      brew)
63918        brew_help    $MISSING_DEPENDENCY ;;
63919      port)
63920        port_help    $MISSING_DEPENDENCY ;;
63921      pkgutil)
63922        pkgutil_help $MISSING_DEPENDENCY ;;
63923      pkgadd)
63924        pkgadd_help  $MISSING_DEPENDENCY ;;
63925    esac
63926
63927    if test "x$PKGHANDLER_COMMAND" != x; then
63928      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63929    fi
63930  fi
63931
63932
63933          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63934
63935
63936fi
63937rm -f core conftest.err conftest.$ac_objext \
63938    conftest$ac_exeext conftest.$ac_ext
63939    CXXCFLAGS="$PREV_CXXFLAGS"
63940    LIBS="$PREV_LIBS"
63941    CXX="$PREV_CXX"
63942    ac_ext=cpp
63943ac_cpp='$CXXCPP $CPPFLAGS'
63944ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63945ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63946ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63947
63948
63949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63950$as_echo_n "checking if we should bundle freetype... " >&6; }
63951    if test "x$BUNDLE_FREETYPE" = xyes; then
63952      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63953    fi
63954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63955$as_echo "$BUNDLE_FREETYPE" >&6; }
63956
63957  fi # end freetype needed
63958
63959  FREETYPE_LICENSE=""
63960  if test "x$with_freetype_license" = "xyes"; then
63961    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
63962  elif test "x$with_freetype_license" != "x"; then
63963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
63964$as_echo_n "checking for freetype license... " >&6; }
63965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
63966$as_echo "$with_freetype_license" >&6; }
63967    FREETYPE_LICENSE="$with_freetype_license"
63968
63969  # Only process if variable expands to non-empty
63970
63971  if test "x$FREETYPE_LICENSE" != x; then
63972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63973
63974  # Input might be given as Windows format, start by converting to
63975  # unix format.
63976  path="$FREETYPE_LICENSE"
63977  new_path=`$CYGPATH -u "$path"`
63978
63979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63982  # "foo.exe" is OK but "foo" is an error.
63983  #
63984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63985  # It is also a way to make sure we got the proper file name for the real test later on.
63986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63987  if test "x$test_shortpath" = x; then
63988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
63989$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
63990    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
63991  fi
63992
63993  # Call helper function which possibly converts this using DOS-style short mode.
63994  # If so, the updated path is stored in $new_path.
63995
63996  input_path="$new_path"
63997  # Check if we need to convert this using DOS-style short mode. If the path
63998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63999  # take no chances and rewrite it.
64000  # Note: m4 eats our [], so we need to use [ and ] instead.
64001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64002  if test "x$has_forbidden_chars" != x; then
64003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64007      # Going to short mode and back again did indeed matter. Since short mode is
64008      # case insensitive, let's make it lowercase to improve readability.
64009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64010      # Now convert it back to Unix-style (cygpath)
64011      input_path=`$CYGPATH -u "$shortmode_path"`
64012      new_path="$input_path"
64013    fi
64014  fi
64015
64016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64017  if test "x$test_cygdrive_prefix" = x; then
64018    # As a simple fix, exclude /usr/bin since it's not a real path.
64019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64021      # a path prefixed by /cygdrive for fixpath to work.
64022      new_path="$CYGWIN_ROOT_PATH$input_path"
64023    fi
64024  fi
64025
64026
64027  if test "x$path" != "x$new_path"; then
64028    FREETYPE_LICENSE="$new_path"
64029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64030$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64031  fi
64032
64033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64034
64035  path="$FREETYPE_LICENSE"
64036  has_colon=`$ECHO $path | $GREP ^.:`
64037  new_path="$path"
64038  if test "x$has_colon" = x; then
64039    # Not in mixed or Windows style, start by that.
64040    new_path=`cmd //c echo $path`
64041  fi
64042
64043
64044  input_path="$new_path"
64045  # Check if we need to convert this using DOS-style short mode. If the path
64046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64047  # take no chances and rewrite it.
64048  # Note: m4 eats our [], so we need to use [ and ] instead.
64049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64050  if test "x$has_forbidden_chars" != x; then
64051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64053  fi
64054
64055
64056  windows_path="$new_path"
64057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64058    unix_path=`$CYGPATH -u "$windows_path"`
64059    new_path="$unix_path"
64060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64062    new_path="$unix_path"
64063  fi
64064
64065  if test "x$path" != "x$new_path"; then
64066    FREETYPE_LICENSE="$new_path"
64067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64068$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64069  fi
64070
64071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64073
64074    else
64075      # We're on a unix platform. Hooray! :)
64076      path="$FREETYPE_LICENSE"
64077      has_space=`$ECHO "$path" | $GREP " "`
64078      if test "x$has_space" != x; then
64079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64080$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64082      fi
64083
64084      # Use eval to expand a potential ~
64085      eval path="$path"
64086      if test ! -f "$path" && test ! -d "$path"; then
64087        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64088      fi
64089
64090      if test -d "$path"; then
64091        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64092      else
64093        dir="`$DIRNAME "$path"`"
64094        base="`$BASENAME "$path"`"
64095        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64096      fi
64097    fi
64098  fi
64099
64100    if test ! -f "$FREETYPE_LICENSE"; then
64101      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64102    fi
64103  fi
64104
64105
64106
64107
64108
64109
64110
64111
64112# Check whether --with-alsa was given.
64113if test "${with_alsa+set}" = set; then :
64114  withval=$with_alsa;
64115fi
64116
64117
64118# Check whether --with-alsa-include was given.
64119if test "${with_alsa_include+set}" = set; then :
64120  withval=$with_alsa_include;
64121fi
64122
64123
64124# Check whether --with-alsa-lib was given.
64125if test "${with_alsa_lib+set}" = set; then :
64126  withval=$with_alsa_lib;
64127fi
64128
64129
64130  if test "x$NEEDS_LIB_ALSA" = xfalse; then
64131    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64132        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64133        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64134      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64135$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64136    fi
64137    ALSA_CFLAGS=
64138    ALSA_LIBS=
64139  else
64140    ALSA_FOUND=no
64141
64142    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64143      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64144    fi
64145
64146    if test "x${with_alsa}" != x; then
64147      ALSA_LIBS="-L${with_alsa}/lib -lasound"
64148      ALSA_CFLAGS="-I${with_alsa}/include"
64149      ALSA_FOUND=yes
64150    fi
64151    if test "x${with_alsa_include}" != x; then
64152      ALSA_CFLAGS="-I${with_alsa_include}"
64153      ALSA_FOUND=yes
64154    fi
64155    if test "x${with_alsa_lib}" != x; then
64156      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64157      ALSA_FOUND=yes
64158    fi
64159    # Do not try pkg-config if we have a sysroot set.
64160    if test "x$SYSROOT" = x; then
64161      if test "x$ALSA_FOUND" = xno; then
64162
64163pkg_failed=no
64164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64165$as_echo_n "checking for ALSA... " >&6; }
64166
64167if test -n "$ALSA_CFLAGS"; then
64168    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64169 elif test -n "$PKG_CONFIG"; then
64170    if test -n "$PKG_CONFIG" && \
64171    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64172  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64173  ac_status=$?
64174  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64175  test $ac_status = 0; }; then
64176  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64177else
64178  pkg_failed=yes
64179fi
64180 else
64181    pkg_failed=untried
64182fi
64183if test -n "$ALSA_LIBS"; then
64184    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64185 elif test -n "$PKG_CONFIG"; then
64186    if test -n "$PKG_CONFIG" && \
64187    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64188  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64189  ac_status=$?
64190  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64191  test $ac_status = 0; }; then
64192  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64193else
64194  pkg_failed=yes
64195fi
64196 else
64197    pkg_failed=untried
64198fi
64199
64200
64201
64202if test $pkg_failed = yes; then
64203
64204if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64205        _pkg_short_errors_supported=yes
64206else
64207        _pkg_short_errors_supported=no
64208fi
64209        if test $_pkg_short_errors_supported = yes; then
64210	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64211        else
64212	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64213        fi
64214	# Put the nasty error message in config.log where it belongs
64215	echo "$ALSA_PKG_ERRORS" >&5
64216
64217	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64218$as_echo "no" >&6; }
64219                ALSA_FOUND=no
64220elif test $pkg_failed = untried; then
64221	ALSA_FOUND=no
64222else
64223	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64224	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64226$as_echo "yes" >&6; }
64227	ALSA_FOUND=yes
64228fi
64229      fi
64230    fi
64231    if test "x$ALSA_FOUND" = xno; then
64232      for ac_header in alsa/asoundlib.h
64233do :
64234  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64235if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64236  cat >>confdefs.h <<_ACEOF
64237#define HAVE_ALSA_ASOUNDLIB_H 1
64238_ACEOF
64239
64240            ALSA_FOUND=yes
64241            ALSA_CFLAGS=-Iignoreme
64242            ALSA_LIBS=-lasound
64243            DEFAULT_ALSA=yes
64244
64245else
64246  ALSA_FOUND=no
64247
64248fi
64249
64250done
64251
64252    fi
64253    if test "x$ALSA_FOUND" = xno; then
64254
64255  # Print a helpful message on how to acquire the necessary build dependency.
64256  # alsa is the help tag: freetype, cups, alsa etc
64257  MISSING_DEPENDENCY=alsa
64258
64259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64260    cygwin_help $MISSING_DEPENDENCY
64261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64262    msys_help $MISSING_DEPENDENCY
64263  else
64264    PKGHANDLER_COMMAND=
64265
64266    case $PKGHANDLER in
64267      apt-get)
64268        apt_help     $MISSING_DEPENDENCY ;;
64269      yum)
64270        yum_help     $MISSING_DEPENDENCY ;;
64271      brew)
64272        brew_help    $MISSING_DEPENDENCY ;;
64273      port)
64274        port_help    $MISSING_DEPENDENCY ;;
64275      pkgutil)
64276        pkgutil_help $MISSING_DEPENDENCY ;;
64277      pkgadd)
64278        pkgadd_help  $MISSING_DEPENDENCY ;;
64279    esac
64280
64281    if test "x$PKGHANDLER_COMMAND" != x; then
64282      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64283    fi
64284  fi
64285
64286      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64287    fi
64288  fi
64289
64290
64291
64292
64293
64294
64295# Check whether --with-libffi was given.
64296if test "${with_libffi+set}" = set; then :
64297  withval=$with_libffi;
64298fi
64299
64300
64301# Check whether --with-libffi-include was given.
64302if test "${with_libffi_include+set}" = set; then :
64303  withval=$with_libffi_include;
64304fi
64305
64306
64307# Check whether --with-libffi-lib was given.
64308if test "${with_libffi_lib+set}" = set; then :
64309  withval=$with_libffi_lib;
64310fi
64311
64312  # Check whether --enable-libffi-bundling was given.
64313if test "${enable_libffi_bundling+set}" = set; then :
64314  enableval=$enable_libffi_bundling;
64315fi
64316
64317
64318  if test "x$NEEDS_LIB_FFI" = xfalse; then
64319    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64320        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64321        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64322      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64323$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64324    fi
64325    LIBFFI_CFLAGS=
64326    LIBFFI_LIBS=
64327  else
64328    LIBFFI_FOUND=no
64329
64330    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64331      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64332    fi
64333
64334    if test "x${with_libffi}" != x; then
64335      LIBFFI_LIB_PATH="${with_libffi}/lib"
64336      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64337      LIBFFI_CFLAGS="-I${with_libffi}/include"
64338      LIBFFI_FOUND=yes
64339    fi
64340    if test "x${with_libffi_include}" != x; then
64341      LIBFFI_CFLAGS="-I${with_libffi_include}"
64342      LIBFFI_FOUND=yes
64343    fi
64344    if test "x${with_libffi_lib}" != x; then
64345      LIBFFI_LIB_PATH="${with_libffi_lib}"
64346      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64347      LIBFFI_FOUND=yes
64348    fi
64349    # Do not try pkg-config if we have a sysroot set.
64350    if test "x$SYSROOT" = x; then
64351      if test "x$LIBFFI_FOUND" = xno; then
64352        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64353
64354pkg_failed=no
64355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64356$as_echo_n "checking for LIBFFI... " >&6; }
64357
64358if test -n "$LIBFFI_CFLAGS"; then
64359    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64360 elif test -n "$PKG_CONFIG"; then
64361    if test -n "$PKG_CONFIG" && \
64362    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64363  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64364  ac_status=$?
64365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64366  test $ac_status = 0; }; then
64367  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64368else
64369  pkg_failed=yes
64370fi
64371 else
64372    pkg_failed=untried
64373fi
64374if test -n "$LIBFFI_LIBS"; then
64375    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64376 elif test -n "$PKG_CONFIG"; then
64377    if test -n "$PKG_CONFIG" && \
64378    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64379  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64380  ac_status=$?
64381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64382  test $ac_status = 0; }; then
64383  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64384else
64385  pkg_failed=yes
64386fi
64387 else
64388    pkg_failed=untried
64389fi
64390
64391
64392
64393if test $pkg_failed = yes; then
64394
64395if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64396        _pkg_short_errors_supported=yes
64397else
64398        _pkg_short_errors_supported=no
64399fi
64400        if test $_pkg_short_errors_supported = yes; then
64401	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64402        else
64403	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64404        fi
64405	# Put the nasty error message in config.log where it belongs
64406	echo "$LIBFFI_PKG_ERRORS" >&5
64407
64408	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64409$as_echo "no" >&6; }
64410                LIBFFI_FOUND=no
64411elif test $pkg_failed = untried; then
64412	LIBFFI_FOUND=no
64413else
64414	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64415	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64417$as_echo "yes" >&6; }
64418	LIBFFI_FOUND=yes
64419fi
64420      fi
64421    fi
64422    if test "x$LIBFFI_FOUND" = xno; then
64423      for ac_header in ffi.h
64424do :
64425  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64426if test "x$ac_cv_header_ffi_h" = xyes; then :
64427  cat >>confdefs.h <<_ACEOF
64428#define HAVE_FFI_H 1
64429_ACEOF
64430
64431            LIBFFI_FOUND=yes
64432            LIBFFI_CFLAGS=
64433            LIBFFI_LIBS=-lffi
64434
64435else
64436  LIBFFI_FOUND=no
64437
64438fi
64439
64440done
64441
64442    fi
64443    if test "x$LIBFFI_FOUND" = xno; then
64444
64445  # Print a helpful message on how to acquire the necessary build dependency.
64446  # ffi is the help tag: freetype, cups, alsa etc
64447  MISSING_DEPENDENCY=ffi
64448
64449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64450    cygwin_help $MISSING_DEPENDENCY
64451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64452    msys_help $MISSING_DEPENDENCY
64453  else
64454    PKGHANDLER_COMMAND=
64455
64456    case $PKGHANDLER in
64457      apt-get)
64458        apt_help     $MISSING_DEPENDENCY ;;
64459      yum)
64460        yum_help     $MISSING_DEPENDENCY ;;
64461      brew)
64462        brew_help    $MISSING_DEPENDENCY ;;
64463      port)
64464        port_help    $MISSING_DEPENDENCY ;;
64465      pkgutil)
64466        pkgutil_help $MISSING_DEPENDENCY ;;
64467      pkgadd)
64468        pkgadd_help  $MISSING_DEPENDENCY ;;
64469    esac
64470
64471    if test "x$PKGHANDLER_COMMAND" != x; then
64472      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64473    fi
64474  fi
64475
64476      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64477    fi
64478
64479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64480$as_echo_n "checking if libffi works... " >&6; }
64481    ac_ext=c
64482ac_cpp='$CPP $CPPFLAGS'
64483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64485ac_compiler_gnu=$ac_cv_c_compiler_gnu
64486
64487    OLD_CFLAGS="$CFLAGS"
64488    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64489    OLD_LIBS="$LIBS"
64490    LIBS="$LIBS $LIBFFI_LIBS"
64491    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64492/* end confdefs.h.  */
64493#include <ffi.h>
64494int
64495main ()
64496{
64497
64498          ffi_call(NULL, NULL, NULL, NULL);
64499          return 0;
64500
64501  ;
64502  return 0;
64503}
64504_ACEOF
64505if ac_fn_c_try_link "$LINENO"; then :
64506  LIBFFI_WORKS=yes
64507else
64508  LIBFFI_WORKS=no
64509
64510fi
64511rm -f core conftest.err conftest.$ac_objext \
64512    conftest$ac_exeext conftest.$ac_ext
64513    CFLAGS="$OLD_CFLAGS"
64514    LIBS="$OLD_LIBS"
64515    ac_ext=cpp
64516ac_cpp='$CXXCPP $CPPFLAGS'
64517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64520
64521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64522$as_echo "$LIBFFI_WORKS" >&6; }
64523
64524    if test "x$LIBFFI_WORKS" = xno; then
64525
64526  # Print a helpful message on how to acquire the necessary build dependency.
64527  # ffi is the help tag: freetype, cups, alsa etc
64528  MISSING_DEPENDENCY=ffi
64529
64530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64531    cygwin_help $MISSING_DEPENDENCY
64532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64533    msys_help $MISSING_DEPENDENCY
64534  else
64535    PKGHANDLER_COMMAND=
64536
64537    case $PKGHANDLER in
64538      apt-get)
64539        apt_help     $MISSING_DEPENDENCY ;;
64540      yum)
64541        yum_help     $MISSING_DEPENDENCY ;;
64542      brew)
64543        brew_help    $MISSING_DEPENDENCY ;;
64544      port)
64545        port_help    $MISSING_DEPENDENCY ;;
64546      pkgutil)
64547        pkgutil_help $MISSING_DEPENDENCY ;;
64548      pkgadd)
64549        pkgadd_help  $MISSING_DEPENDENCY ;;
64550    esac
64551
64552    if test "x$PKGHANDLER_COMMAND" != x; then
64553      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64554    fi
64555  fi
64556
64557      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64558    fi
64559
64560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64561$as_echo_n "checking if libffi should be bundled... " >&6; }
64562    if test "x$enable_libffi_bundling" = "x"; then
64563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64564$as_echo "no" >&6; }
64565      ENABLE_LIBFFI_BUNDLING=false
64566    elif  test "x$enable_libffi_bundling" = "xno"; then
64567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64568$as_echo "no, forced" >&6; }
64569      ENABLE_LIBFFI_BUNDLING=false
64570    elif  test "x$enable_libffi_bundling" = "xyes"; then
64571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64572$as_echo "yes, forced" >&6; }
64573      ENABLE_LIBFFI_BUNDLING=true
64574    else
64575      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64576    fi
64577
64578    # Find the libffi.so.X to bundle
64579    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64581$as_echo_n "checking for libffi lib file location... " >&6; }
64582      if test "x${LIBFFI_LIB_PATH}" != x; then
64583        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64584          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64585        else
64586          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64587        fi
64588      else
64589        # If we don't have an explicit path, look in a few obvious places
64590        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64591          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64592            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64593          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64594            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64595          else
64596            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64597          fi
64598        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64599          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64600            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64601          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64602            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64603          else
64604            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64605          fi
64606        else
64607          # Fallback on the default /usr/lib dir
64608          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64609            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64610          else
64611            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64612          fi
64613        fi
64614      fi
64615      # Make sure the wildcard is evaluated
64616      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64618$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64619    fi
64620  fi
64621
64622
64623
64624
64625
64626
64627
64628  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64629    # Extract the first word of "llvm-config", so it can be a program name with args.
64630set dummy llvm-config; ac_word=$2
64631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64632$as_echo_n "checking for $ac_word... " >&6; }
64633if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64634  $as_echo_n "(cached) " >&6
64635else
64636  if test -n "$LLVM_CONFIG"; then
64637  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64638else
64639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64640for as_dir in $PATH
64641do
64642  IFS=$as_save_IFS
64643  test -z "$as_dir" && as_dir=.
64644    for ac_exec_ext in '' $ac_executable_extensions; do
64645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64646    ac_cv_prog_LLVM_CONFIG="llvm-config"
64647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64648    break 2
64649  fi
64650done
64651  done
64652IFS=$as_save_IFS
64653
64654fi
64655fi
64656LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64657if test -n "$LLVM_CONFIG"; then
64658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64659$as_echo "$LLVM_CONFIG" >&6; }
64660else
64661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64662$as_echo "no" >&6; }
64663fi
64664
64665
64666
64667    if test "x$LLVM_CONFIG" != xllvm-config; then
64668      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64669    fi
64670
64671    llvm_components="jit mcjit engine nativecodegen native"
64672    unset LLVM_CFLAGS
64673    for flag in $("$LLVM_CONFIG" --cxxflags); do
64674      if echo "${flag}" | grep -q '^-[ID]'; then
64675        if test "${flag}" != "-D_DEBUG" ; then
64676          if test "${LLVM_CFLAGS}" != "" ; then
64677            LLVM_CFLAGS="${LLVM_CFLAGS} "
64678          fi
64679          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64680        fi
64681      fi
64682    done
64683    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64684    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64685
64686    unset LLVM_LDFLAGS
64687    for flag in $("${LLVM_CONFIG}" --ldflags); do
64688      if echo "${flag}" | grep -q '^-L'; then
64689        if test "${LLVM_LDFLAGS}" != ""; then
64690          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64691        fi
64692        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64693      fi
64694    done
64695
64696    unset LLVM_LIBS
64697    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64698      if echo "${flag}" | grep -q '^-l'; then
64699        if test "${LLVM_LIBS}" != ""; then
64700          LLVM_LIBS="${LLVM_LIBS} "
64701        fi
64702        LLVM_LIBS="${LLVM_LIBS}${flag}"
64703      fi
64704    done
64705
64706    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64707    # always properly detect -ltinfo
64708    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64709
64710
64711
64712
64713  fi
64714
64715
64716
64717# Check whether --with-libjpeg was given.
64718if test "${with_libjpeg+set}" = set; then :
64719  withval=$with_libjpeg;
64720fi
64721
64722
64723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64724$as_echo_n "checking for which libjpeg to use... " >&6; }
64725  # default is bundled
64726  DEFAULT_LIBJPEG=bundled
64727  # if user didn't specify, use DEFAULT_LIBJPEG
64728  if test "x${with_libjpeg}" = "x"; then
64729    with_libjpeg=${DEFAULT_LIBJPEG}
64730  fi
64731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64732$as_echo "${with_libjpeg}" >&6; }
64733
64734  if test "x${with_libjpeg}" = "xbundled"; then
64735    USE_EXTERNAL_LIBJPEG=false
64736  elif test "x${with_libjpeg}" = "xsystem"; then
64737    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64738if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64739
64740else
64741   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64742fi
64743
64744
64745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64746$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64747if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64748  $as_echo_n "(cached) " >&6
64749else
64750  ac_check_lib_save_LIBS=$LIBS
64751LIBS="-ljpeg  $LIBS"
64752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64753/* end confdefs.h.  */
64754
64755/* Override any GCC internal prototype to avoid an error.
64756   Use char because int might match the return type of a GCC
64757   builtin and then its argument prototype would still apply.  */
64758#ifdef __cplusplus
64759extern "C"
64760#endif
64761char jpeg_CreateDecompress ();
64762int
64763main ()
64764{
64765return jpeg_CreateDecompress ();
64766  ;
64767  return 0;
64768}
64769_ACEOF
64770if ac_fn_cxx_try_link "$LINENO"; then :
64771  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64772else
64773  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64774fi
64775rm -f core conftest.err conftest.$ac_objext \
64776    conftest$ac_exeext conftest.$ac_ext
64777LIBS=$ac_check_lib_save_LIBS
64778fi
64779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64780$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64781if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64782  cat >>confdefs.h <<_ACEOF
64783#define HAVE_LIBJPEG 1
64784_ACEOF
64785
64786  LIBS="-ljpeg $LIBS"
64787
64788else
64789   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64790fi
64791
64792
64793    USE_EXTERNAL_LIBJPEG=true
64794  else
64795    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64796  fi
64797
64798
64799
64800
64801
64802# Check whether --with-giflib was given.
64803if test "${with_giflib+set}" = set; then :
64804  withval=$with_giflib;
64805fi
64806
64807
64808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64809$as_echo_n "checking for which giflib to use... " >&6; }
64810  # default is bundled
64811  DEFAULT_GIFLIB=bundled
64812  # if user didn't specify, use DEFAULT_GIFLIB
64813  if test "x${with_giflib}" = "x"; then
64814    with_giflib=${DEFAULT_GIFLIB}
64815  fi
64816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64817$as_echo "${with_giflib}" >&6; }
64818
64819  if test "x${with_giflib}" = "xbundled"; then
64820    USE_EXTERNAL_LIBGIF=false
64821  elif test "x${with_giflib}" = "xsystem"; then
64822    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64823if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64824
64825else
64826   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64827fi
64828
64829
64830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64831$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64832if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64833  $as_echo_n "(cached) " >&6
64834else
64835  ac_check_lib_save_LIBS=$LIBS
64836LIBS="-lgif  $LIBS"
64837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64838/* end confdefs.h.  */
64839
64840/* Override any GCC internal prototype to avoid an error.
64841   Use char because int might match the return type of a GCC
64842   builtin and then its argument prototype would still apply.  */
64843#ifdef __cplusplus
64844extern "C"
64845#endif
64846char DGifGetCode ();
64847int
64848main ()
64849{
64850return DGifGetCode ();
64851  ;
64852  return 0;
64853}
64854_ACEOF
64855if ac_fn_cxx_try_link "$LINENO"; then :
64856  ac_cv_lib_gif_DGifGetCode=yes
64857else
64858  ac_cv_lib_gif_DGifGetCode=no
64859fi
64860rm -f core conftest.err conftest.$ac_objext \
64861    conftest$ac_exeext conftest.$ac_ext
64862LIBS=$ac_check_lib_save_LIBS
64863fi
64864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64865$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64866if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64867  cat >>confdefs.h <<_ACEOF
64868#define HAVE_LIBGIF 1
64869_ACEOF
64870
64871  LIBS="-lgif $LIBS"
64872
64873else
64874   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64875fi
64876
64877
64878    USE_EXTERNAL_LIBGIF=true
64879  else
64880    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64881  fi
64882
64883
64884
64885
64886
64887# Check whether --with-libpng was given.
64888if test "${with_libpng+set}" = set; then :
64889  withval=$with_libpng;
64890fi
64891
64892
64893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64894$as_echo_n "checking for which libpng to use... " >&6; }
64895
64896  # default is bundled
64897  DEFAULT_LIBPNG=bundled
64898  # if user didn't specify, use DEFAULT_LIBPNG
64899  if test "x${with_libpng}" = "x"; then
64900    with_libpng=${DEFAULT_LIBPNG}
64901  fi
64902
64903  if test "x${with_libpng}" = "xbundled"; then
64904    USE_EXTERNAL_LIBPNG=false
64905    PNG_CFLAGS=""
64906    PNG_LIBS=""
64907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64908$as_echo "bundled" >&6; }
64909  elif test "x${with_libpng}" = "xsystem"; then
64910
64911pkg_failed=no
64912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64913$as_echo_n "checking for PNG... " >&6; }
64914
64915if test -n "$PNG_CFLAGS"; then
64916    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64917 elif test -n "$PKG_CONFIG"; then
64918    if test -n "$PKG_CONFIG" && \
64919    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64920  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64921  ac_status=$?
64922  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64923  test $ac_status = 0; }; then
64924  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64925else
64926  pkg_failed=yes
64927fi
64928 else
64929    pkg_failed=untried
64930fi
64931if test -n "$PNG_LIBS"; then
64932    pkg_cv_PNG_LIBS="$PNG_LIBS"
64933 elif test -n "$PKG_CONFIG"; then
64934    if test -n "$PKG_CONFIG" && \
64935    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64936  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64937  ac_status=$?
64938  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64939  test $ac_status = 0; }; then
64940  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64941else
64942  pkg_failed=yes
64943fi
64944 else
64945    pkg_failed=untried
64946fi
64947
64948
64949
64950if test $pkg_failed = yes; then
64951
64952if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64953        _pkg_short_errors_supported=yes
64954else
64955        _pkg_short_errors_supported=no
64956fi
64957        if test $_pkg_short_errors_supported = yes; then
64958	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64959        else
64960	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64961        fi
64962	# Put the nasty error message in config.log where it belongs
64963	echo "$PNG_PKG_ERRORS" >&5
64964
64965	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64966$as_echo "no" >&6; }
64967                LIBPNG_FOUND=no
64968elif test $pkg_failed = untried; then
64969	LIBPNG_FOUND=no
64970else
64971	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64972	PNG_LIBS=$pkg_cv_PNG_LIBS
64973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64974$as_echo "yes" >&6; }
64975	LIBPNG_FOUND=yes
64976fi
64977    if test "x${LIBPNG_FOUND}" = "xyes"; then
64978      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64979      USE_EXTERNAL_LIBPNG=true
64980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64981$as_echo "system" >&6; }
64982    else
64983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64984$as_echo "system not found" >&6; }
64985      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64986    fi
64987  else
64988    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64989  fi
64990
64991
64992
64993
64994
64995
64996
64997# Check whether --with-zlib was given.
64998if test "${with_zlib+set}" = set; then :
64999  withval=$with_zlib;
65000fi
65001
65002
65003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65004$as_echo_n "checking for compress in -lz... " >&6; }
65005if ${ac_cv_lib_z_compress+:} false; then :
65006  $as_echo_n "(cached) " >&6
65007else
65008  ac_check_lib_save_LIBS=$LIBS
65009LIBS="-lz  $LIBS"
65010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65011/* end confdefs.h.  */
65012
65013/* Override any GCC internal prototype to avoid an error.
65014   Use char because int might match the return type of a GCC
65015   builtin and then its argument prototype would still apply.  */
65016#ifdef __cplusplus
65017extern "C"
65018#endif
65019char compress ();
65020int
65021main ()
65022{
65023return compress ();
65024  ;
65025  return 0;
65026}
65027_ACEOF
65028if ac_fn_cxx_try_link "$LINENO"; then :
65029  ac_cv_lib_z_compress=yes
65030else
65031  ac_cv_lib_z_compress=no
65032fi
65033rm -f core conftest.err conftest.$ac_objext \
65034    conftest$ac_exeext conftest.$ac_ext
65035LIBS=$ac_check_lib_save_LIBS
65036fi
65037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65038$as_echo "$ac_cv_lib_z_compress" >&6; }
65039if test "x$ac_cv_lib_z_compress" = xyes; then :
65040   ZLIB_FOUND=yes
65041else
65042   ZLIB_FOUND=no
65043fi
65044
65045
65046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65047$as_echo_n "checking for which zlib to use... " >&6; }
65048
65049  DEFAULT_ZLIB=system
65050  if test "x$OPENJDK_TARGET_OS" = xwindows; then
65051    # On windows default is bundled...on others default is system
65052    DEFAULT_ZLIB=bundled
65053  fi
65054
65055  if test "x${ZLIB_FOUND}" != "xyes"; then
65056    # If we don't find any system...set default to bundled
65057    DEFAULT_ZLIB=bundled
65058  fi
65059
65060  # If user didn't specify, use DEFAULT_ZLIB
65061  if test "x${with_zlib}" = "x"; then
65062    with_zlib=${DEFAULT_ZLIB}
65063  fi
65064
65065  if test "x${with_zlib}" = "xbundled"; then
65066    USE_EXTERNAL_LIBZ=false
65067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65068$as_echo "bundled" >&6; }
65069  elif test "x${with_zlib}" = "xsystem"; then
65070    if test "x${ZLIB_FOUND}" = "xyes"; then
65071      USE_EXTERNAL_LIBZ=true
65072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65073$as_echo "system" >&6; }
65074    else
65075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65076$as_echo "system not found" >&6; }
65077      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65078    fi
65079  else
65080    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65081  fi
65082
65083
65084
65085
65086
65087# Check whether --with-lcms was given.
65088if test "${with_lcms+set}" = set; then :
65089  withval=$with_lcms;
65090fi
65091
65092
65093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65094$as_echo_n "checking for which lcms to use... " >&6; }
65095
65096  DEFAULT_LCMS=bundled
65097  # If user didn't specify, use DEFAULT_LCMS
65098  if test "x${with_lcms}" = "x"; then
65099    with_lcms=${DEFAULT_LCMS}
65100  fi
65101
65102  if test "x${with_lcms}" = "xbundled"; then
65103    USE_EXTERNAL_LCMS=false
65104    LCMS_CFLAGS=""
65105    LCMS_LIBS=""
65106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65107$as_echo "bundled" >&6; }
65108  elif test "x${with_lcms}" = "xsystem"; then
65109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65110$as_echo "system" >&6; }
65111
65112pkg_failed=no
65113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65114$as_echo_n "checking for LCMS... " >&6; }
65115
65116if test -n "$LCMS_CFLAGS"; then
65117    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65118 elif test -n "$PKG_CONFIG"; then
65119    if test -n "$PKG_CONFIG" && \
65120    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65121  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65122  ac_status=$?
65123  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65124  test $ac_status = 0; }; then
65125  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65126else
65127  pkg_failed=yes
65128fi
65129 else
65130    pkg_failed=untried
65131fi
65132if test -n "$LCMS_LIBS"; then
65133    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65134 elif test -n "$PKG_CONFIG"; then
65135    if test -n "$PKG_CONFIG" && \
65136    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65137  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65138  ac_status=$?
65139  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65140  test $ac_status = 0; }; then
65141  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65142else
65143  pkg_failed=yes
65144fi
65145 else
65146    pkg_failed=untried
65147fi
65148
65149
65150
65151if test $pkg_failed = yes; then
65152
65153if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65154        _pkg_short_errors_supported=yes
65155else
65156        _pkg_short_errors_supported=no
65157fi
65158        if test $_pkg_short_errors_supported = yes; then
65159	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65160        else
65161	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65162        fi
65163	# Put the nasty error message in config.log where it belongs
65164	echo "$LCMS_PKG_ERRORS" >&5
65165
65166	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65167$as_echo "no" >&6; }
65168                LCMS_FOUND=no
65169elif test $pkg_failed = untried; then
65170	LCMS_FOUND=no
65171else
65172	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65173	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65175$as_echo "yes" >&6; }
65176	LCMS_FOUND=yes
65177fi
65178    if test "x${LCMS_FOUND}" = "xyes"; then
65179      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65180      USE_EXTERNAL_LCMS=true
65181    else
65182      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65183    fi
65184  else
65185    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65186  fi
65187
65188
65189
65190
65191
65192
65193
65194
65195
65196
65197
65198
65199
65200  # Setup libm (the maths library)
65201  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65203$as_echo_n "checking for cos in -lm... " >&6; }
65204if ${ac_cv_lib_m_cos+:} false; then :
65205  $as_echo_n "(cached) " >&6
65206else
65207  ac_check_lib_save_LIBS=$LIBS
65208LIBS="-lm  $LIBS"
65209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65210/* end confdefs.h.  */
65211
65212/* Override any GCC internal prototype to avoid an error.
65213   Use char because int might match the return type of a GCC
65214   builtin and then its argument prototype would still apply.  */
65215#ifdef __cplusplus
65216extern "C"
65217#endif
65218char cos ();
65219int
65220main ()
65221{
65222return cos ();
65223  ;
65224  return 0;
65225}
65226_ACEOF
65227if ac_fn_cxx_try_link "$LINENO"; then :
65228  ac_cv_lib_m_cos=yes
65229else
65230  ac_cv_lib_m_cos=no
65231fi
65232rm -f core conftest.err conftest.$ac_objext \
65233    conftest$ac_exeext conftest.$ac_ext
65234LIBS=$ac_check_lib_save_LIBS
65235fi
65236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65237$as_echo "$ac_cv_lib_m_cos" >&6; }
65238if test "x$ac_cv_lib_m_cos" = xyes; then :
65239  cat >>confdefs.h <<_ACEOF
65240#define HAVE_LIBM 1
65241_ACEOF
65242
65243  LIBS="-lm $LIBS"
65244
65245else
65246
65247        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65248$as_echo "$as_me: Maths library was not found" >&6;}
65249
65250fi
65251
65252    LIBM="-lm"
65253  else
65254    LIBM=""
65255  fi
65256
65257
65258  # Setup libdl (for dynamic library loading)
65259  save_LIBS="$LIBS"
65260  LIBS=""
65261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65262$as_echo_n "checking for dlopen in -ldl... " >&6; }
65263if ${ac_cv_lib_dl_dlopen+:} false; then :
65264  $as_echo_n "(cached) " >&6
65265else
65266  ac_check_lib_save_LIBS=$LIBS
65267LIBS="-ldl  $LIBS"
65268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65269/* end confdefs.h.  */
65270
65271/* Override any GCC internal prototype to avoid an error.
65272   Use char because int might match the return type of a GCC
65273   builtin and then its argument prototype would still apply.  */
65274#ifdef __cplusplus
65275extern "C"
65276#endif
65277char dlopen ();
65278int
65279main ()
65280{
65281return dlopen ();
65282  ;
65283  return 0;
65284}
65285_ACEOF
65286if ac_fn_cxx_try_link "$LINENO"; then :
65287  ac_cv_lib_dl_dlopen=yes
65288else
65289  ac_cv_lib_dl_dlopen=no
65290fi
65291rm -f core conftest.err conftest.$ac_objext \
65292    conftest$ac_exeext conftest.$ac_ext
65293LIBS=$ac_check_lib_save_LIBS
65294fi
65295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65296$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65297if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65298  cat >>confdefs.h <<_ACEOF
65299#define HAVE_LIBDL 1
65300_ACEOF
65301
65302  LIBS="-ldl $LIBS"
65303
65304fi
65305
65306  LIBDL="$LIBS"
65307
65308  LIBS="$save_LIBS"
65309
65310  # Deprecated libraries, keep the flags for backwards compatibility
65311  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65312
65313
65314# Check whether --with-dxsdk was given.
65315if test "${with_dxsdk+set}" = set; then :
65316  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65317$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65318fi
65319
65320
65321
65322
65323# Check whether --with-dxsdk-lib was given.
65324if test "${with_dxsdk_lib+set}" = set; then :
65325  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65326$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65327fi
65328
65329
65330
65331
65332# Check whether --with-dxsdk-include was given.
65333if test "${with_dxsdk_include+set}" = set; then :
65334  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65335$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65336fi
65337
65338
65339  fi
65340
65341  # Control if libzip can use mmap. Available for purposes of overriding.
65342  LIBZIP_CAN_USE_MMAP=true
65343
65344
65345
65346  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65347    # Find the root of the Solaris Studio installation from the compiler path
65348    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65349    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65351$as_echo_n "checking for libstlport.so.1... " >&6; }
65352    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65353      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65354      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65355    fi
65356    if test -f "$STLPORT_LIB"; then
65357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65358$as_echo "yes, $STLPORT_LIB" >&6; }
65359
65360  # Only process if variable expands to non-empty
65361
65362  if test "x$STLPORT_LIB" != x; then
65363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65364
65365  # Input might be given as Windows format, start by converting to
65366  # unix format.
65367  path="$STLPORT_LIB"
65368  new_path=`$CYGPATH -u "$path"`
65369
65370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65373  # "foo.exe" is OK but "foo" is an error.
65374  #
65375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65376  # It is also a way to make sure we got the proper file name for the real test later on.
65377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65378  if test "x$test_shortpath" = x; then
65379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65380$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65381    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65382  fi
65383
65384  # Call helper function which possibly converts this using DOS-style short mode.
65385  # If so, the updated path is stored in $new_path.
65386
65387  input_path="$new_path"
65388  # Check if we need to convert this using DOS-style short mode. If the path
65389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65390  # take no chances and rewrite it.
65391  # Note: m4 eats our [], so we need to use [ and ] instead.
65392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65393  if test "x$has_forbidden_chars" != x; then
65394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65398      # Going to short mode and back again did indeed matter. Since short mode is
65399      # case insensitive, let's make it lowercase to improve readability.
65400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65401      # Now convert it back to Unix-style (cygpath)
65402      input_path=`$CYGPATH -u "$shortmode_path"`
65403      new_path="$input_path"
65404    fi
65405  fi
65406
65407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65408  if test "x$test_cygdrive_prefix" = x; then
65409    # As a simple fix, exclude /usr/bin since it's not a real path.
65410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65412      # a path prefixed by /cygdrive for fixpath to work.
65413      new_path="$CYGWIN_ROOT_PATH$input_path"
65414    fi
65415  fi
65416
65417
65418  if test "x$path" != "x$new_path"; then
65419    STLPORT_LIB="$new_path"
65420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65421$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65422  fi
65423
65424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65425
65426  path="$STLPORT_LIB"
65427  has_colon=`$ECHO $path | $GREP ^.:`
65428  new_path="$path"
65429  if test "x$has_colon" = x; then
65430    # Not in mixed or Windows style, start by that.
65431    new_path=`cmd //c echo $path`
65432  fi
65433
65434
65435  input_path="$new_path"
65436  # Check if we need to convert this using DOS-style short mode. If the path
65437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65438  # take no chances and rewrite it.
65439  # Note: m4 eats our [], so we need to use [ and ] instead.
65440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65441  if test "x$has_forbidden_chars" != x; then
65442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65444  fi
65445
65446
65447  windows_path="$new_path"
65448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65449    unix_path=`$CYGPATH -u "$windows_path"`
65450    new_path="$unix_path"
65451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65453    new_path="$unix_path"
65454  fi
65455
65456  if test "x$path" != "x$new_path"; then
65457    STLPORT_LIB="$new_path"
65458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65459$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65460  fi
65461
65462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65464
65465    else
65466      # We're on a unix platform. Hooray! :)
65467      path="$STLPORT_LIB"
65468      has_space=`$ECHO "$path" | $GREP " "`
65469      if test "x$has_space" != x; then
65470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65471$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65473      fi
65474
65475      # Use eval to expand a potential ~
65476      eval path="$path"
65477      if test ! -f "$path" && test ! -d "$path"; then
65478        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65479      fi
65480
65481      if test -d "$path"; then
65482        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65483      else
65484        dir="`$DIRNAME "$path"`"
65485        base="`$BASENAME "$path"`"
65486        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65487      fi
65488    fi
65489  fi
65490
65491    else
65492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65493$as_echo "no, not found at $STLPORT_LIB" >&6; }
65494      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65495    fi
65496
65497  fi
65498
65499
65500
65501
65502
65503
65504
65505
65506
65507
65508
65509
65510
65511
65512# Hotspot setup depends on lib checks (AOT needs libelf).
65513
65514
65515  # The user can in some cases supply additional jvm features. For the custom
65516  # variant, this defines the entire variant.
65517
65518# Check whether --with-jvm-features was given.
65519if test "${with_jvm_features+set}" = set; then :
65520  withval=$with_jvm_features;
65521fi
65522
65523  if test "x$with_jvm_features" != x; then
65524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65525$as_echo_n "checking additional JVM features... " >&6; }
65526    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65528$as_echo "$JVM_FEATURES" >&6; }
65529  fi
65530
65531  # Override hotspot cpu definitions for ARM platforms
65532  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65533    HOTSPOT_TARGET_CPU=arm_32
65534    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65535    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65536    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65537  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65538    HOTSPOT_TARGET_CPU=arm_64
65539    HOTSPOT_TARGET_CPU_ARCH=arm
65540    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65541    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65542  fi
65543
65544  # Verify that dependencies are met for explicitly set features.
65545  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65546    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65547  fi
65548
65549  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65550    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65551  fi
65552
65553  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65554    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65555  fi
65556
65557  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65558    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65559  fi
65560
65561  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65562    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65563  fi
65564
65565  # Turn on additional features based on other parts of configure
65566  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65567    JVM_FEATURES="$JVM_FEATURES dtrace"
65568  else
65569    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65570      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65571    fi
65572  fi
65573
65574  if test "x$STATIC_BUILD" = "xtrue"; then
65575    JVM_FEATURES="$JVM_FEATURES static-build"
65576  else
65577    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65578      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65579    fi
65580  fi
65581
65582  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65583    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65584      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65585    fi
65586  fi
65587
65588  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65589    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65590      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65591    fi
65592  fi
65593
65594  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65595  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65596     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65597     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65598    JVM_FEATURES_jvmci="jvmci"
65599  else
65600    JVM_FEATURES_jvmci=""
65601  fi
65602
65603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65604$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65605  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65607$as_echo "yes, forced" >&6; }
65608    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65609      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65610    fi
65611    INCLUDE_GRAAL="true"
65612  else
65613    # By default enable graal build where AOT is available
65614    if test "x$ENABLE_AOT" = "xtrue"; then
65615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65616$as_echo "yes" >&6; }
65617      JVM_FEATURES_graal="graal"
65618      INCLUDE_GRAAL="true"
65619    else
65620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65621$as_echo "no" >&6; }
65622      JVM_FEATURES_graal=""
65623      INCLUDE_GRAAL="false"
65624    fi
65625  fi
65626
65627
65628
65629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65630$as_echo_n "checking if aot should be enabled... " >&6; }
65631  if test "x$ENABLE_AOT" = "xtrue"; then
65632    if test "x$enable_aot" = "xyes"; then
65633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65634$as_echo "yes, forced" >&6; }
65635    else
65636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65637$as_echo "yes" >&6; }
65638    fi
65639    JVM_FEATURES_aot="aot"
65640  else
65641    if test "x$enable_aot" = "xno"; then
65642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65643$as_echo "no, forced" >&6; }
65644    else
65645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65646$as_echo "no" >&6; }
65647    fi
65648    JVM_FEATURES_aot=""
65649  fi
65650
65651  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65652    # Default to use link time optimizations on minimal on arm
65653    JVM_FEATURES_link_time_opt="link-time-opt"
65654  else
65655    JVM_FEATURES_link_time_opt=""
65656  fi
65657
65658  # All variants but minimal (and custom) get these features
65659  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65660
65661  # Enable features depending on variant.
65662  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65663  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65664  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65665  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65666  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65667  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65668  JVM_FEATURES_custom="$JVM_FEATURES"
65669
65670
65671
65672
65673
65674
65675
65676
65677
65678  # Used for verification of Makefiles by check-jvm-feature
65679
65680
65681  # We don't support --with-jvm-interpreter anymore, use zero instead.
65682
65683
65684# Check whether --with-jvm-interpreter was given.
65685if test "${with_jvm_interpreter+set}" = set; then :
65686  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65687$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65688fi
65689
65690
65691
65692
65693###############################################################################
65694#
65695# We need to do some final tweaking, when everything else is done.
65696#
65697###############################################################################
65698
65699
65700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65701$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65702
65703  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65704    ENABLE_INTREE_EC=true
65705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65706$as_echo "yes" >&6; }
65707  else
65708    ENABLE_INTREE_EC=false
65709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65710$as_echo "no" >&6; }
65711  fi
65712
65713
65714
65715
65716  # Check whether --enable-jtreg-failure-handler was given.
65717if test "${enable_jtreg_failure_handler+set}" = set; then :
65718  enableval=$enable_jtreg_failure_handler;
65719fi
65720
65721
65722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65723$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65724
65725  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65726    if test "x$JT_HOME" = "x"; then
65727      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65728    else
65729      BUILD_FAILURE_HANDLER=true
65730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65731$as_echo "yes, forced" >&6; }
65732    fi
65733  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65734    BUILD_FAILURE_HANDLER=false
65735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65736$as_echo "no, forced" >&6; }
65737  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65738      || test "x$enable_jtreg_failure_handler" = "x"; then
65739    if test "x$JT_HOME" = "x"; then
65740      BUILD_FAILURE_HANDLER=false
65741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65742$as_echo "no, missing jtreg" >&6; }
65743    else
65744      BUILD_FAILURE_HANDLER=true
65745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65746$as_echo "yes, jtreg present" >&6; }
65747    fi
65748  else
65749    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65750  fi
65751
65752
65753
65754
65755  # Check whether --enable-generate-classlist was given.
65756if test "${enable_generate_classlist+set}" = set; then :
65757  enableval=$enable_generate_classlist;
65758fi
65759
65760
65761  # Check if it's likely that it's possible to generate the classlist. Depending
65762  # on exact jvm configuration it could be possible anyway.
65763  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65764    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65765  else
65766    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65767  fi
65768
65769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65770$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65771  if test "x$enable_generate_classlist" = "xyes"; then
65772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65773$as_echo "yes, forced" >&6; }
65774    ENABLE_GENERATE_CLASSLIST="true"
65775    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65776      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65777$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65778    fi
65779  elif test "x$enable_generate_classlist" = "xno"; then
65780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65781$as_echo "no, forced" >&6; }
65782    ENABLE_GENERATE_CLASSLIST="false"
65783  elif test "x$enable_generate_classlist" = "x"; then
65784    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65786$as_echo "yes" >&6; }
65787      ENABLE_GENERATE_CLASSLIST="true"
65788    else
65789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65790$as_echo "no" >&6; }
65791      ENABLE_GENERATE_CLASSLIST="false"
65792    fi
65793  else
65794    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65795  fi
65796
65797
65798
65799
65800###############################################################################
65801#
65802# Configure parts of the build that only affect the build performance,
65803# not the result.
65804#
65805###############################################################################
65806
65807
65808  # How many cores do we have on this build system?
65809
65810# Check whether --with-num-cores was given.
65811if test "${with_num_cores+set}" = set; then :
65812  withval=$with_num_cores;
65813fi
65814
65815  if test "x$with_num_cores" = x; then
65816    # The number of cores were not specified, try to probe them.
65817
65818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65819$as_echo_n "checking for number of cores... " >&6; }
65820  NUM_CORES=1
65821  FOUND_CORES=no
65822
65823  if test -f /proc/cpuinfo; then
65824    # Looks like a Linux (or cygwin) system
65825    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65826    FOUND_CORES=yes
65827  elif test -x /usr/sbin/psrinfo; then
65828    # Looks like a Solaris system
65829    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65830    FOUND_CORES=yes
65831  elif test -x /usr/sbin/sysctl; then
65832    # Looks like a MacOSX system
65833    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65834    FOUND_CORES=yes
65835  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65836    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65837    FOUND_CORES=yes
65838  elif test -n "$NUMBER_OF_PROCESSORS"; then
65839    # On windows, look in the env
65840    NUM_CORES=$NUMBER_OF_PROCESSORS
65841    FOUND_CORES=yes
65842  fi
65843
65844  if test "x$FOUND_CORES" = xyes; then
65845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65846$as_echo "$NUM_CORES" >&6; }
65847  else
65848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65849$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65850    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65851$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65852  fi
65853
65854  else
65855    NUM_CORES=$with_num_cores
65856  fi
65857
65858
65859
65860  # How much memory do we have on this build system?
65861
65862# Check whether --with-memory-size was given.
65863if test "${with_memory_size+set}" = set; then :
65864  withval=$with_memory_size;
65865fi
65866
65867  if test "x$with_memory_size" = x; then
65868    # The memory size was not specified, try to probe it.
65869
65870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65871$as_echo_n "checking for memory size... " >&6; }
65872  # Default to 1024 MB
65873  MEMORY_SIZE=1024
65874  FOUND_MEM=no
65875
65876  if test -f /proc/meminfo; then
65877    # Looks like a Linux (or cygwin) system
65878    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65879    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65880    FOUND_MEM=yes
65881  elif test -x /usr/sbin/prtconf; then
65882    # Looks like a Solaris or AIX system
65883    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65884    FOUND_MEM=yes
65885  elif test -x /usr/sbin/sysctl; then
65886    # Looks like a MacOSX system
65887    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65888    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65889    FOUND_MEM=yes
65890  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65891    # Windows, but without cygwin
65892    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65893    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65894    FOUND_MEM=yes
65895  fi
65896
65897  if test "x$FOUND_MEM" = xyes; then
65898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65899$as_echo "$MEMORY_SIZE MB" >&6; }
65900  else
65901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65902$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65903    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65904$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65905  fi
65906
65907  else
65908    MEMORY_SIZE=$with_memory_size
65909  fi
65910
65911
65912
65913  # Provide a decent default number of parallel jobs for make depending on
65914  # number of cores, amount of memory and machine architecture.
65915
65916# Check whether --with-jobs was given.
65917if test "${with_jobs+set}" = set; then :
65918  withval=$with_jobs;
65919fi
65920
65921  if test "x$with_jobs" = x; then
65922    # Number of jobs was not specified, calculate.
65923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65924$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65925    # Approximate memory in GB.
65926    memory_gb=`expr $MEMORY_SIZE / 1024`
65927    # Pick the lowest of memory in gb and number of cores.
65928    if test "$memory_gb" -lt "$NUM_CORES"; then
65929      JOBS="$memory_gb"
65930    else
65931      JOBS="$NUM_CORES"
65932    fi
65933    if test "$JOBS" -eq "0"; then
65934      JOBS=1
65935    fi
65936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65937$as_echo "$JOBS" >&6; }
65938  else
65939    JOBS=$with_jobs
65940  fi
65941
65942
65943
65944  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65945
65946# Check whether --with-test-jobs was given.
65947if test "${with_test_jobs+set}" = set; then :
65948  withval=$with_test_jobs;
65949fi
65950
65951  if test "x$with_test_jobs" = x; then
65952      TEST_JOBS=0
65953  else
65954      TEST_JOBS=$with_test_jobs
65955  fi
65956
65957
65958
65959# Setup arguments for the boot jdk (after cores and memory have been setup)
65960
65961  ##############################################################################
65962  #
65963  # Specify jvm options for anything that is run with the Boot JDK.
65964  # Not all JVM:s accept the same arguments on the command line.
65965  #
65966
65967# Check whether --with-boot-jdk-jvmargs was given.
65968if test "${with_boot_jdk_jvmargs+set}" = set; then :
65969  withval=$with_boot_jdk_jvmargs;
65970fi
65971
65972
65973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65974$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65975
65976  # Disable special log output when a debug build is used as Boot JDK...
65977
65978  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65979  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65980  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65981  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65982  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65983  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65984    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65985    JVM_ARG_OK=true
65986  else
65987    $ECHO "Arg failed:" >&5
65988    $ECHO "$OUTPUT" >&5
65989    JVM_ARG_OK=false
65990  fi
65991
65992
65993  # Force en-US environment
65994
65995  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65996  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65997  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65998  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65999  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66000  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66001    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66002    JVM_ARG_OK=true
66003  else
66004    $ECHO "Arg failed:" >&5
66005    $ECHO "$OUTPUT" >&5
66006    JVM_ARG_OK=false
66007  fi
66008
66009
66010  # Apply user provided options.
66011
66012  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66013  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66014  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66015  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66016  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66017  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66018    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66019    JVM_ARG_OK=true
66020  else
66021    $ECHO "Arg failed:" >&5
66022    $ECHO "$OUTPUT" >&5
66023    JVM_ARG_OK=false
66024  fi
66025
66026
66027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66028$as_echo "$boot_jdk_jvmargs" >&6; }
66029
66030  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66031  JAVA_FLAGS=$boot_jdk_jvmargs
66032
66033
66034
66035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66036$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66037
66038  # Starting amount of heap memory.
66039
66040  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66041  $ECHO "Command: $JAVA -Xms64M -version" >&5
66042  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66043  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66044  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66046    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66047    JVM_ARG_OK=true
66048  else
66049    $ECHO "Arg failed:" >&5
66050    $ECHO "$OUTPUT" >&5
66051    JVM_ARG_OK=false
66052  fi
66053
66054  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66055
66056  # Maximum amount of heap memory and stack size.
66057  JVM_HEAP_LIMIT_32="1024"
66058  # Running a 64 bit JVM allows for and requires a bigger heap
66059  JVM_HEAP_LIMIT_64="1600"
66060  STACK_SIZE_32=768
66061  STACK_SIZE_64=1536
66062  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66063  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66064    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66065  fi
66066  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66067    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66068  fi
66069  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66070    JVM_HEAP_LIMIT_32=512
66071    JVM_HEAP_LIMIT_64=512
66072  fi
66073
66074  if test "x$BOOT_JDK_BITS" = "x32"; then
66075    STACK_SIZE=$STACK_SIZE_32
66076    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66077  else
66078    STACK_SIZE=$STACK_SIZE_64
66079    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66080  fi
66081
66082  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66083  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66084  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66085  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66086  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66087  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66088    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66089    JVM_ARG_OK=true
66090  else
66091    $ECHO "Arg failed:" >&5
66092    $ECHO "$OUTPUT" >&5
66093    JVM_ARG_OK=false
66094  fi
66095
66096
66097  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66098  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66099  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66100  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66101  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66103    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66104    JVM_ARG_OK=true
66105  else
66106    $ECHO "Arg failed:" >&5
66107    $ECHO "$OUTPUT" >&5
66108    JVM_ARG_OK=false
66109  fi
66110
66111
66112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66113$as_echo "$boot_jdk_jvmargs_big" >&6; }
66114
66115  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66116
66117
66118  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66119    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66120    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66121  else
66122    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66123    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66124  fi
66125  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66126  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66128$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66130$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66131
66132
66133  # By default, the main javac compilations use big
66134  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66135
66136
66137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66138$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66139
66140  # Use serial gc for small short lived tools if possible
66141
66142  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66143  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66144  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66145  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66146  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66148    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66149    JVM_ARG_OK=true
66150  else
66151    $ECHO "Arg failed:" >&5
66152    $ECHO "$OUTPUT" >&5
66153    JVM_ARG_OK=false
66154  fi
66155
66156
66157  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66158  $ECHO "Command: $JAVA -Xms32M -version" >&5
66159  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66160  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66161  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66162  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66163    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66164    JVM_ARG_OK=true
66165  else
66166    $ECHO "Arg failed:" >&5
66167    $ECHO "$OUTPUT" >&5
66168    JVM_ARG_OK=false
66169  fi
66170
66171
66172  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66173  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66174  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66175  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66176  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66177  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66178    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66179    JVM_ARG_OK=true
66180  else
66181    $ECHO "Arg failed:" >&5
66182    $ECHO "$OUTPUT" >&5
66183    JVM_ARG_OK=false
66184  fi
66185
66186
66187  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66188  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66189  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66190  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66191  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66192  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66193    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66194    JVM_ARG_OK=true
66195  else
66196    $ECHO "Arg failed:" >&5
66197    $ECHO "$OUTPUT" >&5
66198    JVM_ARG_OK=false
66199  fi
66200
66201
66202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66203$as_echo "$boot_jdk_jvmargs_small" >&6; }
66204
66205  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66206
66207
66208  JAVA_TOOL_FLAGS_SMALL=""
66209  for f in $JAVA_FLAGS_SMALL; do
66210    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66211  done
66212
66213
66214
66215# Setup smart javac (after cores and memory have been setup)
66216
66217
66218# Check whether --with-sjavac-server-java was given.
66219if test "${with_sjavac_server_java+set}" = set; then :
66220  withval=$with_sjavac_server_java;
66221fi
66222
66223
66224  if test "x$with_sjavac_server_java" != x; then
66225    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66226    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66227    if test "x$FOUND_VERSION" = x; then
66228      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66229    fi
66230  else
66231    SJAVAC_SERVER_JAVA="$JAVA"
66232  fi
66233
66234
66235  if test "$MEMORY_SIZE" -gt "3000"; then
66236    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66237      JVM_64BIT=true
66238    fi
66239  fi
66240
66241  MX_VALUE=`expr $MEMORY_SIZE / 2`
66242  if test "$JVM_64BIT" = true; then
66243    # Set ms lower than mx since more than one instance of the server might
66244    # get launched at the same time before they figure out which instance won.
66245    MS_VALUE=512
66246    if test "$MX_VALUE" -gt "2048"; then
66247      MX_VALUE=2048
66248    fi
66249  else
66250    MS_VALUE=256
66251    if test "$MX_VALUE" -gt "1500"; then
66252      MX_VALUE=1500
66253    fi
66254  fi
66255  if test "$MX_VALUE" -lt "512"; then
66256    MX_VALUE=512
66257  fi
66258
66259  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66260  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66261  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66262  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66263  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66265    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66266    JVM_ARG_OK=true
66267  else
66268    $ECHO "Arg failed:" >&5
66269    $ECHO "$OUTPUT" >&5
66270    JVM_ARG_OK=false
66271  fi
66272
66273
66274
66275  # Check whether --enable-sjavac was given.
66276if test "${enable_sjavac+set}" = set; then :
66277  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66278else
66279  ENABLE_SJAVAC="no"
66280fi
66281
66282  if test "x$JVM_ARG_OK" = "xfalse"; then
66283    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66284$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66285    ENABLE_SJAVAC="no"
66286  fi
66287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66288$as_echo_n "checking whether to use sjavac... " >&6; }
66289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66290$as_echo "$ENABLE_SJAVAC" >&6; }
66291
66292
66293  # Check whether --enable-javac-server was given.
66294if test "${enable_javac_server+set}" = set; then :
66295  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66296else
66297  ENABLE_JAVAC_SERVER="yes"
66298fi
66299
66300  if test "x$JVM_ARG_OK" = "xfalse"; then
66301    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66302$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66303    ENABLE_JAVAC_SERVER="no"
66304  fi
66305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66306$as_echo_n "checking whether to use javac server... " >&6; }
66307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66308$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66309
66310
66311  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66312    # When using a server javac, the small client instances do not need much
66313    # resources.
66314    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66315  fi
66316
66317
66318# Setup use of icecc if requested
66319
66320  # Check whether --enable-icecc was given.
66321if test "${enable_icecc+set}" = set; then :
66322  enableval=$enable_icecc;
66323fi
66324
66325
66326  if test "x${enable_icecc}" = "xyes"; then
66327
66328
66329
66330  # Publish this variable in the help.
66331
66332
66333  if [ -z "${ICECC_CMD+x}" ]; then
66334    # The variable is not set by user, try to locate tool using the code snippet
66335    for ac_prog in icecc
66336do
66337  # Extract the first word of "$ac_prog", so it can be a program name with args.
66338set dummy $ac_prog; ac_word=$2
66339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66340$as_echo_n "checking for $ac_word... " >&6; }
66341if ${ac_cv_path_ICECC_CMD+:} false; then :
66342  $as_echo_n "(cached) " >&6
66343else
66344  case $ICECC_CMD in
66345  [\\/]* | ?:[\\/]*)
66346  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66347  ;;
66348  *)
66349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66350for as_dir in $PATH
66351do
66352  IFS=$as_save_IFS
66353  test -z "$as_dir" && as_dir=.
66354    for ac_exec_ext in '' $ac_executable_extensions; do
66355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66356    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66358    break 2
66359  fi
66360done
66361  done
66362IFS=$as_save_IFS
66363
66364  ;;
66365esac
66366fi
66367ICECC_CMD=$ac_cv_path_ICECC_CMD
66368if test -n "$ICECC_CMD"; then
66369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66370$as_echo "$ICECC_CMD" >&6; }
66371else
66372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66373$as_echo "no" >&6; }
66374fi
66375
66376
66377  test -n "$ICECC_CMD" && break
66378done
66379
66380  else
66381    # The variable is set, but is it from the command line or the environment?
66382
66383    # Try to remove the string !ICECC_CMD! from our list.
66384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66386      # If it failed, the variable was not from the command line. Ignore it,
66387      # but warn the user (except for BASH, which is always set by the calling BASH).
66388      if test "xICECC_CMD" != xBASH; then
66389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66390$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66391      fi
66392      # Try to locate tool using the code snippet
66393      for ac_prog in icecc
66394do
66395  # Extract the first word of "$ac_prog", so it can be a program name with args.
66396set dummy $ac_prog; ac_word=$2
66397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66398$as_echo_n "checking for $ac_word... " >&6; }
66399if ${ac_cv_path_ICECC_CMD+:} false; then :
66400  $as_echo_n "(cached) " >&6
66401else
66402  case $ICECC_CMD in
66403  [\\/]* | ?:[\\/]*)
66404  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66405  ;;
66406  *)
66407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66408for as_dir in $PATH
66409do
66410  IFS=$as_save_IFS
66411  test -z "$as_dir" && as_dir=.
66412    for ac_exec_ext in '' $ac_executable_extensions; do
66413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66414    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66416    break 2
66417  fi
66418done
66419  done
66420IFS=$as_save_IFS
66421
66422  ;;
66423esac
66424fi
66425ICECC_CMD=$ac_cv_path_ICECC_CMD
66426if test -n "$ICECC_CMD"; then
66427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66428$as_echo "$ICECC_CMD" >&6; }
66429else
66430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66431$as_echo "no" >&6; }
66432fi
66433
66434
66435  test -n "$ICECC_CMD" && break
66436done
66437
66438    else
66439      # If it succeeded, then it was overridden by the user. We will use it
66440      # for the tool.
66441
66442      # First remove it from the list of overridden variables, so we can test
66443      # for unknown variables in the end.
66444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66445
66446      # Check if we try to supply an empty value
66447      if test "x$ICECC_CMD" = x; then
66448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66449$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66451$as_echo_n "checking for ICECC_CMD... " >&6; }
66452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66453$as_echo "disabled" >&6; }
66454      else
66455        # Check if the provided tool contains a complete path.
66456        tool_specified="$ICECC_CMD"
66457        tool_basename="${tool_specified##*/}"
66458        if test "x$tool_basename" = "x$tool_specified"; then
66459          # A command without a complete path is provided, search $PATH.
66460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66461$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66462          # Extract the first word of "$tool_basename", so it can be a program name with args.
66463set dummy $tool_basename; ac_word=$2
66464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66465$as_echo_n "checking for $ac_word... " >&6; }
66466if ${ac_cv_path_ICECC_CMD+:} false; then :
66467  $as_echo_n "(cached) " >&6
66468else
66469  case $ICECC_CMD in
66470  [\\/]* | ?:[\\/]*)
66471  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66472  ;;
66473  *)
66474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66475for as_dir in $PATH
66476do
66477  IFS=$as_save_IFS
66478  test -z "$as_dir" && as_dir=.
66479    for ac_exec_ext in '' $ac_executable_extensions; do
66480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66481    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66483    break 2
66484  fi
66485done
66486  done
66487IFS=$as_save_IFS
66488
66489  ;;
66490esac
66491fi
66492ICECC_CMD=$ac_cv_path_ICECC_CMD
66493if test -n "$ICECC_CMD"; then
66494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66495$as_echo "$ICECC_CMD" >&6; }
66496else
66497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66498$as_echo "no" >&6; }
66499fi
66500
66501
66502          if test "x$ICECC_CMD" = x; then
66503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66504          fi
66505        else
66506          # Otherwise we believe it is a complete path. Use it as it is.
66507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66508$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66510$as_echo_n "checking for ICECC_CMD... " >&6; }
66511          if test ! -x "$tool_specified"; then
66512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66513$as_echo "not found" >&6; }
66514            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66515          fi
66516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66517$as_echo "$tool_specified" >&6; }
66518        fi
66519      fi
66520    fi
66521
66522  fi
66523
66524
66525
66526  if test "x$ICECC_CMD" = x; then
66527    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66528  fi
66529
66530
66531    old_path="$PATH"
66532
66533    # Look for icecc-create-env in some known places
66534    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66535
66536
66537
66538  # Publish this variable in the help.
66539
66540
66541  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66542    # The variable is not set by user, try to locate tool using the code snippet
66543    for ac_prog in icecc-create-env
66544do
66545  # Extract the first word of "$ac_prog", so it can be a program name with args.
66546set dummy $ac_prog; ac_word=$2
66547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66548$as_echo_n "checking for $ac_word... " >&6; }
66549if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66550  $as_echo_n "(cached) " >&6
66551else
66552  case $ICECC_CREATE_ENV in
66553  [\\/]* | ?:[\\/]*)
66554  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66555  ;;
66556  *)
66557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66558for as_dir in $PATH
66559do
66560  IFS=$as_save_IFS
66561  test -z "$as_dir" && as_dir=.
66562    for ac_exec_ext in '' $ac_executable_extensions; do
66563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66564    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66566    break 2
66567  fi
66568done
66569  done
66570IFS=$as_save_IFS
66571
66572  ;;
66573esac
66574fi
66575ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66576if test -n "$ICECC_CREATE_ENV"; then
66577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66578$as_echo "$ICECC_CREATE_ENV" >&6; }
66579else
66580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66581$as_echo "no" >&6; }
66582fi
66583
66584
66585  test -n "$ICECC_CREATE_ENV" && break
66586done
66587
66588  else
66589    # The variable is set, but is it from the command line or the environment?
66590
66591    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66594      # If it failed, the variable was not from the command line. Ignore it,
66595      # but warn the user (except for BASH, which is always set by the calling BASH).
66596      if test "xICECC_CREATE_ENV" != xBASH; then
66597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66598$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66599      fi
66600      # Try to locate tool using the code snippet
66601      for ac_prog in icecc-create-env
66602do
66603  # Extract the first word of "$ac_prog", so it can be a program name with args.
66604set dummy $ac_prog; ac_word=$2
66605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66606$as_echo_n "checking for $ac_word... " >&6; }
66607if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66608  $as_echo_n "(cached) " >&6
66609else
66610  case $ICECC_CREATE_ENV in
66611  [\\/]* | ?:[\\/]*)
66612  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66613  ;;
66614  *)
66615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66616for as_dir in $PATH
66617do
66618  IFS=$as_save_IFS
66619  test -z "$as_dir" && as_dir=.
66620    for ac_exec_ext in '' $ac_executable_extensions; do
66621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66622    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66624    break 2
66625  fi
66626done
66627  done
66628IFS=$as_save_IFS
66629
66630  ;;
66631esac
66632fi
66633ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66634if test -n "$ICECC_CREATE_ENV"; then
66635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66636$as_echo "$ICECC_CREATE_ENV" >&6; }
66637else
66638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66639$as_echo "no" >&6; }
66640fi
66641
66642
66643  test -n "$ICECC_CREATE_ENV" && break
66644done
66645
66646    else
66647      # If it succeeded, then it was overridden by the user. We will use it
66648      # for the tool.
66649
66650      # First remove it from the list of overridden variables, so we can test
66651      # for unknown variables in the end.
66652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66653
66654      # Check if we try to supply an empty value
66655      if test "x$ICECC_CREATE_ENV" = x; then
66656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66657$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66659$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66661$as_echo "disabled" >&6; }
66662      else
66663        # Check if the provided tool contains a complete path.
66664        tool_specified="$ICECC_CREATE_ENV"
66665        tool_basename="${tool_specified##*/}"
66666        if test "x$tool_basename" = "x$tool_specified"; then
66667          # A command without a complete path is provided, search $PATH.
66668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66669$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66670          # Extract the first word of "$tool_basename", so it can be a program name with args.
66671set dummy $tool_basename; ac_word=$2
66672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66673$as_echo_n "checking for $ac_word... " >&6; }
66674if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66675  $as_echo_n "(cached) " >&6
66676else
66677  case $ICECC_CREATE_ENV in
66678  [\\/]* | ?:[\\/]*)
66679  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66680  ;;
66681  *)
66682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66683for as_dir in $PATH
66684do
66685  IFS=$as_save_IFS
66686  test -z "$as_dir" && as_dir=.
66687    for ac_exec_ext in '' $ac_executable_extensions; do
66688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66689    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66691    break 2
66692  fi
66693done
66694  done
66695IFS=$as_save_IFS
66696
66697  ;;
66698esac
66699fi
66700ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66701if test -n "$ICECC_CREATE_ENV"; then
66702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66703$as_echo "$ICECC_CREATE_ENV" >&6; }
66704else
66705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66706$as_echo "no" >&6; }
66707fi
66708
66709
66710          if test "x$ICECC_CREATE_ENV" = x; then
66711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66712          fi
66713        else
66714          # Otherwise we believe it is a complete path. Use it as it is.
66715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66716$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66718$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66719          if test ! -x "$tool_specified"; then
66720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66721$as_echo "not found" >&6; }
66722            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66723          fi
66724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66725$as_echo "$tool_specified" >&6; }
66726        fi
66727      fi
66728    fi
66729
66730  fi
66731
66732
66733
66734  if test "x$ICECC_CREATE_ENV" = x; then
66735    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66736  fi
66737
66738
66739    # Use icecc-create-env to create a minimal compilation environment that can
66740    # be sent to the other hosts in the icecream cluster.
66741    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66742    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66743    # Older versions of icecc does not have the --gcc parameter
66744    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66745      icecc_gcc_arg="--gcc"
66746    fi
66747    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66748
66749  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66750      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66751          ${icecc_create_env_log} 2>&1 )
66752  if test "$?" != "0"; then
66753    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66754$as_echo "$as_me: icecc-create-env output:" >&6;}
66755    cat \
66756          ${icecc_create_env_log}
66757    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66758  fi
66759
66760    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66761      # For clang, the icecc compilerwrapper is needed. It usually resides next
66762      # to icecc-create-env.
66763
66764
66765
66766  # Publish this variable in the help.
66767
66768
66769  if [ -z "${ICECC_WRAPPER+x}" ]; then
66770    # The variable is not set by user, try to locate tool using the code snippet
66771    for ac_prog in compilerwrapper
66772do
66773  # Extract the first word of "$ac_prog", so it can be a program name with args.
66774set dummy $ac_prog; ac_word=$2
66775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66776$as_echo_n "checking for $ac_word... " >&6; }
66777if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66778  $as_echo_n "(cached) " >&6
66779else
66780  case $ICECC_WRAPPER in
66781  [\\/]* | ?:[\\/]*)
66782  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66783  ;;
66784  *)
66785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66786for as_dir in $PATH
66787do
66788  IFS=$as_save_IFS
66789  test -z "$as_dir" && as_dir=.
66790    for ac_exec_ext in '' $ac_executable_extensions; do
66791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66792    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66794    break 2
66795  fi
66796done
66797  done
66798IFS=$as_save_IFS
66799
66800  ;;
66801esac
66802fi
66803ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66804if test -n "$ICECC_WRAPPER"; then
66805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66806$as_echo "$ICECC_WRAPPER" >&6; }
66807else
66808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66809$as_echo "no" >&6; }
66810fi
66811
66812
66813  test -n "$ICECC_WRAPPER" && break
66814done
66815
66816  else
66817    # The variable is set, but is it from the command line or the environment?
66818
66819    # Try to remove the string !ICECC_WRAPPER! from our list.
66820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66822      # If it failed, the variable was not from the command line. Ignore it,
66823      # but warn the user (except for BASH, which is always set by the calling BASH).
66824      if test "xICECC_WRAPPER" != xBASH; then
66825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66826$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66827      fi
66828      # Try to locate tool using the code snippet
66829      for ac_prog in compilerwrapper
66830do
66831  # Extract the first word of "$ac_prog", so it can be a program name with args.
66832set dummy $ac_prog; ac_word=$2
66833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66834$as_echo_n "checking for $ac_word... " >&6; }
66835if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66836  $as_echo_n "(cached) " >&6
66837else
66838  case $ICECC_WRAPPER in
66839  [\\/]* | ?:[\\/]*)
66840  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66841  ;;
66842  *)
66843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66844for as_dir in $PATH
66845do
66846  IFS=$as_save_IFS
66847  test -z "$as_dir" && as_dir=.
66848    for ac_exec_ext in '' $ac_executable_extensions; do
66849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66850    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66852    break 2
66853  fi
66854done
66855  done
66856IFS=$as_save_IFS
66857
66858  ;;
66859esac
66860fi
66861ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66862if test -n "$ICECC_WRAPPER"; then
66863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66864$as_echo "$ICECC_WRAPPER" >&6; }
66865else
66866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66867$as_echo "no" >&6; }
66868fi
66869
66870
66871  test -n "$ICECC_WRAPPER" && break
66872done
66873
66874    else
66875      # If it succeeded, then it was overridden by the user. We will use it
66876      # for the tool.
66877
66878      # First remove it from the list of overridden variables, so we can test
66879      # for unknown variables in the end.
66880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66881
66882      # Check if we try to supply an empty value
66883      if test "x$ICECC_WRAPPER" = x; then
66884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66885$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66887$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66889$as_echo "disabled" >&6; }
66890      else
66891        # Check if the provided tool contains a complete path.
66892        tool_specified="$ICECC_WRAPPER"
66893        tool_basename="${tool_specified##*/}"
66894        if test "x$tool_basename" = "x$tool_specified"; then
66895          # A command without a complete path is provided, search $PATH.
66896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66897$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66898          # Extract the first word of "$tool_basename", so it can be a program name with args.
66899set dummy $tool_basename; ac_word=$2
66900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66901$as_echo_n "checking for $ac_word... " >&6; }
66902if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66903  $as_echo_n "(cached) " >&6
66904else
66905  case $ICECC_WRAPPER in
66906  [\\/]* | ?:[\\/]*)
66907  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66908  ;;
66909  *)
66910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66911for as_dir in $PATH
66912do
66913  IFS=$as_save_IFS
66914  test -z "$as_dir" && as_dir=.
66915    for ac_exec_ext in '' $ac_executable_extensions; do
66916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66917    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66919    break 2
66920  fi
66921done
66922  done
66923IFS=$as_save_IFS
66924
66925  ;;
66926esac
66927fi
66928ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66929if test -n "$ICECC_WRAPPER"; then
66930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66931$as_echo "$ICECC_WRAPPER" >&6; }
66932else
66933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66934$as_echo "no" >&6; }
66935fi
66936
66937
66938          if test "x$ICECC_WRAPPER" = x; then
66939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66940          fi
66941        else
66942          # Otherwise we believe it is a complete path. Use it as it is.
66943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66944$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66946$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66947          if test ! -x "$tool_specified"; then
66948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66949$as_echo "not found" >&6; }
66950            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66951          fi
66952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66953$as_echo "$tool_specified" >&6; }
66954        fi
66955      fi
66956    fi
66957
66958  fi
66959
66960
66961
66962  if test "x$ICECC_WRAPPER" = x; then
66963    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66964  fi
66965
66966
66967
66968  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66969      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66970  if test "$?" != "0"; then
66971    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66972$as_echo "$as_me: icecc-create-env output:" >&6;}
66973    cat ${icecc_create_env_log}
66974    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66975  fi
66976
66977    else
66978      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66979    fi
66980    PATH="$old_path"
66981    # The bundle with the compiler gets a name based on checksums. Parse log file
66982    # to find it.
66983    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66984    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66985    if test ! -f ${ICECC_ENV_BUNDLE}; then
66986      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66987    fi
66988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66989$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66991$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66992    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66993
66994    if test "x${COMPILE_TYPE}" = "xcross"; then
66995      # If cross compiling, create a separate env package for the build compiler
66996      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66997      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66998      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66999
67000  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67001      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67002            ${icecc_create_env_log_build} 2>&1 )
67003  if test "$?" != "0"; then
67004    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67005$as_echo "$as_me: icecc-create-env output:" >&6;}
67006    cat \
67007            ${icecc_create_env_log_build}
67008    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67009  fi
67010
67011      elif test "x${BUILD_CC##*/}" = "xclang"; then
67012
67013  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67014      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67015  if test "$?" != "0"; then
67016    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67017$as_echo "$as_me: icecc-create-env output:" >&6;}
67018    cat ${icecc_create_env_log_build}
67019    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67020  fi
67021
67022      else
67023        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67024      fi
67025      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67026      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67027      if test ! -f ${ICECC_ENV_BUNDLE}; then
67028        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67029      fi
67030      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67031$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67033$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67034      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67035          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67036    else
67037      BUILD_ICECC="${ICECC}"
67038    fi
67039
67040
67041  fi
67042
67043
67044# Can the C/C++ compiler use precompiled headers?
67045
67046
67047  ###############################################################################
67048  #
67049  # Can the C/C++ compiler use precompiled headers?
67050  #
67051  # Check whether --enable-precompiled-headers was given.
67052if test "${enable_precompiled_headers+set}" = set; then :
67053  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67054else
67055  ENABLE_PRECOMPH=yes
67056fi
67057
67058
67059  USE_PRECOMPILED_HEADER=true
67060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67061$as_echo_n "checking If precompiled header is enabled... " >&6; }
67062  if test "x$ENABLE_PRECOMPH" = xno; then
67063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67064$as_echo "no, forced" >&6; }
67065    USE_PRECOMPILED_HEADER=false
67066  elif test "x$ICECC" != "x"; then
67067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67068$as_echo "no, does not work effectively with icecc" >&6; }
67069    USE_PRECOMPILED_HEADER=false
67070  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67072$as_echo "no, does not work with Solaris Studio" >&6; }
67073    USE_PRECOMPILED_HEADER=false
67074  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67076$as_echo "no, does not work with xlc" >&6; }
67077    USE_PRECOMPILED_HEADER=false
67078  else
67079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67080$as_echo "yes" >&6; }
67081  fi
67082
67083  if test "x$ENABLE_PRECOMPH" = xyes; then
67084    # Check that the compiler actually supports precomp headers.
67085    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67087$as_echo_n "checking that precompiled headers work... " >&6; }
67088      echo "int alfa();" > conftest.h
67089      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67090      if test ! -f conftest.hpp.gch; then
67091        USE_PRECOMPILED_HEADER=false
67092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67093$as_echo "no" >&6; }
67094      else
67095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67096$as_echo "yes" >&6; }
67097      fi
67098      $RM conftest.h conftest.hpp.gch
67099    fi
67100  fi
67101
67102
67103
67104
67105# Setup use of ccache, if available
67106
67107  # Check whether --enable-ccache was given.
67108if test "${enable_ccache+set}" = set; then :
67109  enableval=$enable_ccache;
67110fi
67111
67112
67113  CCACHE_STATUS=
67114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67115$as_echo_n "checking is ccache enabled... " >&6; }
67116  if test "x$enable_ccache" = xyes; then
67117    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67119$as_echo "yes" >&6; }
67120      OLD_PATH="$PATH"
67121      if test "x$TOOLCHAIN_PATH" != x; then
67122        PATH=$TOOLCHAIN_PATH:$PATH
67123      fi
67124
67125
67126
67127  # Publish this variable in the help.
67128
67129
67130  if [ -z "${CCACHE+x}" ]; then
67131    # The variable is not set by user, try to locate tool using the code snippet
67132    for ac_prog in ccache
67133do
67134  # Extract the first word of "$ac_prog", so it can be a program name with args.
67135set dummy $ac_prog; ac_word=$2
67136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67137$as_echo_n "checking for $ac_word... " >&6; }
67138if ${ac_cv_path_CCACHE+:} false; then :
67139  $as_echo_n "(cached) " >&6
67140else
67141  case $CCACHE in
67142  [\\/]* | ?:[\\/]*)
67143  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67144  ;;
67145  *)
67146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67147for as_dir in $PATH
67148do
67149  IFS=$as_save_IFS
67150  test -z "$as_dir" && as_dir=.
67151    for ac_exec_ext in '' $ac_executable_extensions; do
67152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67153    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67155    break 2
67156  fi
67157done
67158  done
67159IFS=$as_save_IFS
67160
67161  ;;
67162esac
67163fi
67164CCACHE=$ac_cv_path_CCACHE
67165if test -n "$CCACHE"; then
67166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67167$as_echo "$CCACHE" >&6; }
67168else
67169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67170$as_echo "no" >&6; }
67171fi
67172
67173
67174  test -n "$CCACHE" && break
67175done
67176
67177  else
67178    # The variable is set, but is it from the command line or the environment?
67179
67180    # Try to remove the string !CCACHE! from our list.
67181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67183      # If it failed, the variable was not from the command line. Ignore it,
67184      # but warn the user (except for BASH, which is always set by the calling BASH).
67185      if test "xCCACHE" != xBASH; then
67186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67187$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67188      fi
67189      # Try to locate tool using the code snippet
67190      for ac_prog in ccache
67191do
67192  # Extract the first word of "$ac_prog", so it can be a program name with args.
67193set dummy $ac_prog; ac_word=$2
67194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67195$as_echo_n "checking for $ac_word... " >&6; }
67196if ${ac_cv_path_CCACHE+:} false; then :
67197  $as_echo_n "(cached) " >&6
67198else
67199  case $CCACHE in
67200  [\\/]* | ?:[\\/]*)
67201  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67202  ;;
67203  *)
67204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67205for as_dir in $PATH
67206do
67207  IFS=$as_save_IFS
67208  test -z "$as_dir" && as_dir=.
67209    for ac_exec_ext in '' $ac_executable_extensions; do
67210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67211    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67213    break 2
67214  fi
67215done
67216  done
67217IFS=$as_save_IFS
67218
67219  ;;
67220esac
67221fi
67222CCACHE=$ac_cv_path_CCACHE
67223if test -n "$CCACHE"; then
67224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67225$as_echo "$CCACHE" >&6; }
67226else
67227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67228$as_echo "no" >&6; }
67229fi
67230
67231
67232  test -n "$CCACHE" && break
67233done
67234
67235    else
67236      # If it succeeded, then it was overridden by the user. We will use it
67237      # for the tool.
67238
67239      # First remove it from the list of overridden variables, so we can test
67240      # for unknown variables in the end.
67241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67242
67243      # Check if we try to supply an empty value
67244      if test "x$CCACHE" = x; then
67245        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67246$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67248$as_echo_n "checking for CCACHE... " >&6; }
67249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67250$as_echo "disabled" >&6; }
67251      else
67252        # Check if the provided tool contains a complete path.
67253        tool_specified="$CCACHE"
67254        tool_basename="${tool_specified##*/}"
67255        if test "x$tool_basename" = "x$tool_specified"; then
67256          # A command without a complete path is provided, search $PATH.
67257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67258$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67259          # Extract the first word of "$tool_basename", so it can be a program name with args.
67260set dummy $tool_basename; ac_word=$2
67261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67262$as_echo_n "checking for $ac_word... " >&6; }
67263if ${ac_cv_path_CCACHE+:} false; then :
67264  $as_echo_n "(cached) " >&6
67265else
67266  case $CCACHE in
67267  [\\/]* | ?:[\\/]*)
67268  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67269  ;;
67270  *)
67271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67272for as_dir in $PATH
67273do
67274  IFS=$as_save_IFS
67275  test -z "$as_dir" && as_dir=.
67276    for ac_exec_ext in '' $ac_executable_extensions; do
67277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67278    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67280    break 2
67281  fi
67282done
67283  done
67284IFS=$as_save_IFS
67285
67286  ;;
67287esac
67288fi
67289CCACHE=$ac_cv_path_CCACHE
67290if test -n "$CCACHE"; then
67291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67292$as_echo "$CCACHE" >&6; }
67293else
67294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67295$as_echo "no" >&6; }
67296fi
67297
67298
67299          if test "x$CCACHE" = x; then
67300            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67301          fi
67302        else
67303          # Otherwise we believe it is a complete path. Use it as it is.
67304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67305$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67306          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67307$as_echo_n "checking for CCACHE... " >&6; }
67308          if test ! -x "$tool_specified"; then
67309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67310$as_echo "not found" >&6; }
67311            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67312          fi
67313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67314$as_echo "$tool_specified" >&6; }
67315        fi
67316      fi
67317    fi
67318
67319  fi
67320
67321
67322
67323  if test "x$CCACHE" = x; then
67324    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67325  fi
67326
67327
67328      PATH="$OLD_PATH"
67329      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67330      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67331    else
67332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67333$as_echo "no" >&6; }
67334      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67335$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67336    fi
67337  elif test "x$enable_ccache" = xno; then
67338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67339$as_echo "no, explicitly disabled" >&6; }
67340    CCACHE_STATUS="Disabled"
67341  elif test "x$enable_ccache" = x; then
67342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67343$as_echo "no" >&6; }
67344  else
67345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67346$as_echo "unknown" >&6; }
67347    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67348  fi
67349
67350
67351
67352# Check whether --with-ccache-dir was given.
67353if test "${with_ccache_dir+set}" = set; then :
67354  withval=$with_ccache_dir;
67355fi
67356
67357
67358  if test "x$with_ccache_dir" != x; then
67359    # When using a non home ccache directory, assume the use is to share ccache files
67360    # with other users. Thus change the umask.
67361    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67362    if test "x$CCACHE" = x; then
67363      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67364$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67365    fi
67366  fi
67367
67368  if test "x$CCACHE" != x; then
67369
67370  if test "x$CCACHE" != x; then
67371    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67372      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67373          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67374      if test "x$HAS_BAD_CCACHE" != "x"; then
67375        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67376      fi
67377    fi
67378    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67379      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67380          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67381      if test "x$HAS_BAD_CCACHE" != "x"; then
67382        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67383      fi
67384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67385$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67386      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67387      PUSHED_FLAGS="$CXXFLAGS"
67388      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67389      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67390/* end confdefs.h.  */
67391
67392int
67393main ()
67394{
67395
67396  ;
67397  return 0;
67398}
67399_ACEOF
67400if ac_fn_cxx_try_compile "$LINENO"; then :
67401  CC_KNOWS_CCACHE_TRICK=yes
67402else
67403  CC_KNOWS_CCACHE_TRICK=no
67404fi
67405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67406      CXXFLAGS="$PUSHED_FLAGS"
67407      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67409$as_echo "yes" >&6; }
67410        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67411
67412        CCACHE_SLOPPINESS=pch_defines,time_macros
67413      else
67414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67415$as_echo "no" >&6; }
67416        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67417      fi
67418    fi
67419
67420    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67421        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67422
67423    if test "x$SET_CCACHE_DIR" != x; then
67424      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67425      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67426    fi
67427  fi
67428
67429  fi
67430
67431
67432###############################################################################
67433#
67434# And now the finish...
67435#
67436###############################################################################
67437
67438# Check for some common pitfalls
67439
67440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67441    file_to_test="$SRC_ROOT/LICENSE"
67442    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67443      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
67444    fi
67445  fi
67446
67447
67448  # Did user specify any unknown variables?
67449
67450  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67451    # Replace the separating ! with spaces before presenting for end user.
67452    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67454$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67455  fi
67456
67457
67458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67459$as_echo_n "checking if build directory is on local disk... " >&6; }
67460
67461  # df -l lists only local disks; if the given directory is not found then
67462  # a non-zero exit code is given
67463  if test "x$DF" = x; then
67464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67465      # msys does not have df; use Windows "net use" instead.
67466      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67467      if test "x$IS_NETWORK_DISK" = x; then
67468        OUTPUT_DIR_IS_LOCAL="yes"
67469      else
67470        OUTPUT_DIR_IS_LOCAL="no"
67471      fi
67472    else
67473      # No df here, say it's local
67474      OUTPUT_DIR_IS_LOCAL="yes"
67475    fi
67476  else
67477    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67478      OUTPUT_DIR_IS_LOCAL="yes"
67479    else
67480      OUTPUT_DIR_IS_LOCAL="no"
67481    fi
67482  fi
67483
67484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67485$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67486
67487
67488
67489  # Check if the user has any old-style ALT_ variables set.
67490  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67491
67492  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67493  # Since we can't properly handle the dependencies for this, warn the user about the situation
67494  if test -e $OUTPUT_ROOT/spec.gmk; then
67495    IS_RECONFIGURE=yes
67496  else
67497    IS_RECONFIGURE=no
67498  fi
67499
67500
67501# At the end, call the custom hook. (Dummy macro if no custom sources available)
67502
67503
67504# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67505
67506  # Keep feature lists sorted and free of duplicates
67507  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67508  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67509  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67510  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67511  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67512  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67513  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67514
67515  # Validate features
67516  for variant in $JVM_VARIANTS; do
67517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67518$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67519    features_var_name=JVM_FEATURES_$variant
67520    JVM_FEATURES_TO_TEST=${!features_var_name}
67521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67522$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67523    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67524    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67525    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67526    if test "x$INVALID_FEATURES" != x; then
67527      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67528    fi
67529  done
67530
67531
67532# We're messing a bit with internal autoconf variables to put the config.status
67533# in the output directory instead of the current directory.
67534CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67535
67536# Create the actual output files. Now the main work of configure is done.
67537cat >confcache <<\_ACEOF
67538# This file is a shell script that caches the results of configure
67539# tests run on this system so they can be shared between configure
67540# scripts and configure runs, see configure's option --config-cache.
67541# It is not useful on other systems.  If it contains results you don't
67542# want to keep, you may remove or edit it.
67543#
67544# config.status only pays attention to the cache file if you give it
67545# the --recheck option to rerun configure.
67546#
67547# `ac_cv_env_foo' variables (set or unset) will be overridden when
67548# loading this file, other *unset* `ac_cv_foo' will be assigned the
67549# following values.
67550
67551_ACEOF
67552
67553# The following way of writing the cache mishandles newlines in values,
67554# but we know of no workaround that is simple, portable, and efficient.
67555# So, we kill variables containing newlines.
67556# Ultrix sh set writes to stderr and can't be redirected directly,
67557# and sets the high bit in the cache file unless we assign to the vars.
67558(
67559  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67560    eval ac_val=\$$ac_var
67561    case $ac_val in #(
67562    *${as_nl}*)
67563      case $ac_var in #(
67564      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67565$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67566      esac
67567      case $ac_var in #(
67568      _ | IFS | as_nl) ;; #(
67569      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67570      *) { eval $ac_var=; unset $ac_var;} ;;
67571      esac ;;
67572    esac
67573  done
67574
67575  (set) 2>&1 |
67576    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67577    *${as_nl}ac_space=\ *)
67578      # `set' does not quote correctly, so add quotes: double-quote
67579      # substitution turns \\\\ into \\, and sed turns \\ into \.
67580      sed -n \
67581	"s/'/'\\\\''/g;
67582	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67583      ;; #(
67584    *)
67585      # `set' quotes correctly as required by POSIX, so do not add quotes.
67586      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67587      ;;
67588    esac |
67589    sort
67590) |
67591  sed '
67592     /^ac_cv_env_/b end
67593     t clear
67594     :clear
67595     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67596     t end
67597     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67598     :end' >>confcache
67599if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67600  if test -w "$cache_file"; then
67601    if test "x$cache_file" != "x/dev/null"; then
67602      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67603$as_echo "$as_me: updating cache $cache_file" >&6;}
67604      if test ! -f "$cache_file" || test -h "$cache_file"; then
67605	cat confcache >"$cache_file"
67606      else
67607        case $cache_file in #(
67608        */* | ?:*)
67609	  mv -f confcache "$cache_file"$$ &&
67610	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67611        *)
67612	  mv -f confcache "$cache_file" ;;
67613	esac
67614      fi
67615    fi
67616  else
67617    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67618$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67619  fi
67620fi
67621rm -f confcache
67622
67623test "x$prefix" = xNONE && prefix=$ac_default_prefix
67624# Let make expand exec_prefix.
67625test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67626
67627# Transform confdefs.h into DEFS.
67628# Protect against shell expansion while executing Makefile rules.
67629# Protect against Makefile macro expansion.
67630#
67631# If the first sed substitution is executed (which looks for macros that
67632# take arguments), then branch to the quote section.  Otherwise,
67633# look for a macro that doesn't take arguments.
67634ac_script='
67635:mline
67636/\\$/{
67637 N
67638 s,\\\n,,
67639 b mline
67640}
67641t clear
67642:clear
67643s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67644t quote
67645s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67646t quote
67647b any
67648:quote
67649s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67650s/\[/\\&/g
67651s/\]/\\&/g
67652s/\$/$$/g
67653H
67654:any
67655${
67656	g
67657	s/^\n//
67658	s/\n/ /g
67659	p
67660}
67661'
67662DEFS=`sed -n "$ac_script" confdefs.h`
67663
67664
67665ac_libobjs=
67666ac_ltlibobjs=
67667U=
67668for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67669  # 1. Remove the extension, and $U if already installed.
67670  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67671  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67672  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67673  #    will be set to the directory where LIBOBJS objects are built.
67674  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67675  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67676done
67677LIBOBJS=$ac_libobjs
67678
67679LTLIBOBJS=$ac_ltlibobjs
67680
67681
67682
67683: "${CONFIG_STATUS=./config.status}"
67684ac_write_fail=0
67685ac_clean_files_save=$ac_clean_files
67686ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67687{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67688$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67689as_write_fail=0
67690cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67691#! $SHELL
67692# Generated by $as_me.
67693# Run this file to recreate the current configuration.
67694# Compiler output produced by configure, useful for debugging
67695# configure, is in config.log if it exists.
67696
67697debug=false
67698ac_cs_recheck=false
67699ac_cs_silent=false
67700
67701SHELL=\${CONFIG_SHELL-$SHELL}
67702export SHELL
67703_ASEOF
67704cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67705## -------------------- ##
67706## M4sh Initialization. ##
67707## -------------------- ##
67708
67709# Be more Bourne compatible
67710DUALCASE=1; export DUALCASE # for MKS sh
67711if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67712  emulate sh
67713  NULLCMD=:
67714  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67715  # is contrary to our usage.  Disable this feature.
67716  alias -g '${1+"$@"}'='"$@"'
67717  setopt NO_GLOB_SUBST
67718else
67719  case `(set -o) 2>/dev/null` in #(
67720  *posix*) :
67721    set -o posix ;; #(
67722  *) :
67723     ;;
67724esac
67725fi
67726
67727
67728as_nl='
67729'
67730export as_nl
67731# Printing a long string crashes Solaris 7 /usr/bin/printf.
67732as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67733as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67734as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67735# Prefer a ksh shell builtin over an external printf program on Solaris,
67736# but without wasting forks for bash or zsh.
67737if test -z "$BASH_VERSION$ZSH_VERSION" \
67738    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67739  as_echo='print -r --'
67740  as_echo_n='print -rn --'
67741elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67742  as_echo='printf %s\n'
67743  as_echo_n='printf %s'
67744else
67745  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67746    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67747    as_echo_n='/usr/ucb/echo -n'
67748  else
67749    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67750    as_echo_n_body='eval
67751      arg=$1;
67752      case $arg in #(
67753      *"$as_nl"*)
67754	expr "X$arg" : "X\\(.*\\)$as_nl";
67755	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67756      esac;
67757      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67758    '
67759    export as_echo_n_body
67760    as_echo_n='sh -c $as_echo_n_body as_echo'
67761  fi
67762  export as_echo_body
67763  as_echo='sh -c $as_echo_body as_echo'
67764fi
67765
67766# The user is always right.
67767if test "${PATH_SEPARATOR+set}" != set; then
67768  PATH_SEPARATOR=:
67769  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67770    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67771      PATH_SEPARATOR=';'
67772  }
67773fi
67774
67775
67776# IFS
67777# We need space, tab and new line, in precisely that order.  Quoting is
67778# there to prevent editors from complaining about space-tab.
67779# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67780# splitting by setting IFS to empty value.)
67781IFS=" ""	$as_nl"
67782
67783# Find who we are.  Look in the path if we contain no directory separator.
67784as_myself=
67785case $0 in #((
67786  *[\\/]* ) as_myself=$0 ;;
67787  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67788for as_dir in $PATH
67789do
67790  IFS=$as_save_IFS
67791  test -z "$as_dir" && as_dir=.
67792    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67793  done
67794IFS=$as_save_IFS
67795
67796     ;;
67797esac
67798# We did not find ourselves, most probably we were run as `sh COMMAND'
67799# in which case we are not to be found in the path.
67800if test "x$as_myself" = x; then
67801  as_myself=$0
67802fi
67803if test ! -f "$as_myself"; then
67804  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67805  exit 1
67806fi
67807
67808# Unset variables that we do not need and which cause bugs (e.g. in
67809# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67810# suppresses any "Segmentation fault" message there.  '((' could
67811# trigger a bug in pdksh 5.2.14.
67812for as_var in BASH_ENV ENV MAIL MAILPATH
67813do eval test x\${$as_var+set} = xset \
67814  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67815done
67816PS1='$ '
67817PS2='> '
67818PS4='+ '
67819
67820# NLS nuisances.
67821LC_ALL=C
67822export LC_ALL
67823LANGUAGE=C
67824export LANGUAGE
67825
67826# CDPATH.
67827(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67828
67829
67830# as_fn_error STATUS ERROR [LINENO LOG_FD]
67831# ----------------------------------------
67832# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67833# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67834# script with STATUS, using 1 if that was 0.
67835as_fn_error ()
67836{
67837  as_status=$1; test $as_status -eq 0 && as_status=1
67838  if test "$4"; then
67839    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67840    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67841  fi
67842  $as_echo "$as_me: error: $2" >&2
67843  as_fn_exit $as_status
67844} # as_fn_error
67845
67846
67847# as_fn_set_status STATUS
67848# -----------------------
67849# Set $? to STATUS, without forking.
67850as_fn_set_status ()
67851{
67852  return $1
67853} # as_fn_set_status
67854
67855# as_fn_exit STATUS
67856# -----------------
67857# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67858as_fn_exit ()
67859{
67860  set +e
67861  as_fn_set_status $1
67862  exit $1
67863} # as_fn_exit
67864
67865# as_fn_unset VAR
67866# ---------------
67867# Portably unset VAR.
67868as_fn_unset ()
67869{
67870  { eval $1=; unset $1;}
67871}
67872as_unset=as_fn_unset
67873# as_fn_append VAR VALUE
67874# ----------------------
67875# Append the text in VALUE to the end of the definition contained in VAR. Take
67876# advantage of any shell optimizations that allow amortized linear growth over
67877# repeated appends, instead of the typical quadratic growth present in naive
67878# implementations.
67879if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67880  eval 'as_fn_append ()
67881  {
67882    eval $1+=\$2
67883  }'
67884else
67885  as_fn_append ()
67886  {
67887    eval $1=\$$1\$2
67888  }
67889fi # as_fn_append
67890
67891# as_fn_arith ARG...
67892# ------------------
67893# Perform arithmetic evaluation on the ARGs, and store the result in the
67894# global $as_val. Take advantage of shells that can avoid forks. The arguments
67895# must be portable across $(()) and expr.
67896if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67897  eval 'as_fn_arith ()
67898  {
67899    as_val=$(( $* ))
67900  }'
67901else
67902  as_fn_arith ()
67903  {
67904    as_val=`expr "$@" || test $? -eq 1`
67905  }
67906fi # as_fn_arith
67907
67908
67909if expr a : '\(a\)' >/dev/null 2>&1 &&
67910   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67911  as_expr=expr
67912else
67913  as_expr=false
67914fi
67915
67916if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67917  as_basename=basename
67918else
67919  as_basename=false
67920fi
67921
67922if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67923  as_dirname=dirname
67924else
67925  as_dirname=false
67926fi
67927
67928as_me=`$as_basename -- "$0" ||
67929$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67930	 X"$0" : 'X\(//\)$' \| \
67931	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67932$as_echo X/"$0" |
67933    sed '/^.*\/\([^/][^/]*\)\/*$/{
67934	    s//\1/
67935	    q
67936	  }
67937	  /^X\/\(\/\/\)$/{
67938	    s//\1/
67939	    q
67940	  }
67941	  /^X\/\(\/\).*/{
67942	    s//\1/
67943	    q
67944	  }
67945	  s/.*/./; q'`
67946
67947# Avoid depending upon Character Ranges.
67948as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67949as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67950as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67951as_cr_digits='0123456789'
67952as_cr_alnum=$as_cr_Letters$as_cr_digits
67953
67954ECHO_C= ECHO_N= ECHO_T=
67955case `echo -n x` in #(((((
67956-n*)
67957  case `echo 'xy\c'` in
67958  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67959  xy)  ECHO_C='\c';;
67960  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67961       ECHO_T='	';;
67962  esac;;
67963*)
67964  ECHO_N='-n';;
67965esac
67966
67967rm -f conf$$ conf$$.exe conf$$.file
67968if test -d conf$$.dir; then
67969  rm -f conf$$.dir/conf$$.file
67970else
67971  rm -f conf$$.dir
67972  mkdir conf$$.dir 2>/dev/null
67973fi
67974if (echo >conf$$.file) 2>/dev/null; then
67975  if ln -s conf$$.file conf$$ 2>/dev/null; then
67976    as_ln_s='ln -s'
67977    # ... but there are two gotchas:
67978    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67979    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67980    # In both cases, we have to default to `cp -pR'.
67981    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67982      as_ln_s='cp -pR'
67983  elif ln conf$$.file conf$$ 2>/dev/null; then
67984    as_ln_s=ln
67985  else
67986    as_ln_s='cp -pR'
67987  fi
67988else
67989  as_ln_s='cp -pR'
67990fi
67991rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67992rmdir conf$$.dir 2>/dev/null
67993
67994
67995# as_fn_mkdir_p
67996# -------------
67997# Create "$as_dir" as a directory, including parents if necessary.
67998as_fn_mkdir_p ()
67999{
68000
68001  case $as_dir in #(
68002  -*) as_dir=./$as_dir;;
68003  esac
68004  test -d "$as_dir" || eval $as_mkdir_p || {
68005    as_dirs=
68006    while :; do
68007      case $as_dir in #(
68008      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68009      *) as_qdir=$as_dir;;
68010      esac
68011      as_dirs="'$as_qdir' $as_dirs"
68012      as_dir=`$as_dirname -- "$as_dir" ||
68013$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68014	 X"$as_dir" : 'X\(//\)[^/]' \| \
68015	 X"$as_dir" : 'X\(//\)$' \| \
68016	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68017$as_echo X"$as_dir" |
68018    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68019	    s//\1/
68020	    q
68021	  }
68022	  /^X\(\/\/\)[^/].*/{
68023	    s//\1/
68024	    q
68025	  }
68026	  /^X\(\/\/\)$/{
68027	    s//\1/
68028	    q
68029	  }
68030	  /^X\(\/\).*/{
68031	    s//\1/
68032	    q
68033	  }
68034	  s/.*/./; q'`
68035      test -d "$as_dir" && break
68036    done
68037    test -z "$as_dirs" || eval "mkdir $as_dirs"
68038  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68039
68040
68041} # as_fn_mkdir_p
68042if mkdir -p . 2>/dev/null; then
68043  as_mkdir_p='mkdir -p "$as_dir"'
68044else
68045  test -d ./-p && rmdir ./-p
68046  as_mkdir_p=false
68047fi
68048
68049
68050# as_fn_executable_p FILE
68051# -----------------------
68052# Test if FILE is an executable regular file.
68053as_fn_executable_p ()
68054{
68055  test -f "$1" && test -x "$1"
68056} # as_fn_executable_p
68057as_test_x='test -x'
68058as_executable_p=as_fn_executable_p
68059
68060# Sed expression to map a string onto a valid CPP name.
68061as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68062
68063# Sed expression to map a string onto a valid variable name.
68064as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68065
68066
68067exec 6>&1
68068## ----------------------------------- ##
68069## Main body of $CONFIG_STATUS script. ##
68070## ----------------------------------- ##
68071_ASEOF
68072test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68073
68074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68075# Save the log message, to keep $0 and so on meaningful, and to
68076# report actual input values of CONFIG_FILES etc. instead of their
68077# values after options handling.
68078ac_log="
68079This file was extended by OpenJDK $as_me jdk9, which was
68080generated by GNU Autoconf 2.69.  Invocation command line was
68081
68082  CONFIG_FILES    = $CONFIG_FILES
68083  CONFIG_HEADERS  = $CONFIG_HEADERS
68084  CONFIG_LINKS    = $CONFIG_LINKS
68085  CONFIG_COMMANDS = $CONFIG_COMMANDS
68086  $ $0 $@
68087
68088on `(hostname || uname -n) 2>/dev/null | sed 1q`
68089"
68090
68091_ACEOF
68092
68093case $ac_config_files in *"
68094"*) set x $ac_config_files; shift; ac_config_files=$*;;
68095esac
68096
68097
68098
68099cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68100# Files that config.status was made for.
68101config_files="$ac_config_files"
68102
68103_ACEOF
68104
68105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68106ac_cs_usage="\
68107\`$as_me' instantiates files and other configuration actions
68108from templates according to the current configuration.  Unless the files
68109and actions are specified as TAGs, all are instantiated by default.
68110
68111Usage: $0 [OPTION]... [TAG]...
68112
68113  -h, --help       print this help, then exit
68114  -V, --version    print version number and configuration settings, then exit
68115      --config     print configuration, then exit
68116  -q, --quiet, --silent
68117                   do not print progress messages
68118  -d, --debug      don't remove temporary files
68119      --recheck    update $as_me by reconfiguring in the same conditions
68120      --file=FILE[:TEMPLATE]
68121                   instantiate the configuration file FILE
68122
68123Configuration files:
68124$config_files
68125
68126Report bugs to <build-dev@openjdk.java.net>.
68127OpenJDK home page: <http://openjdk.java.net>."
68128
68129_ACEOF
68130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68131ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68132ac_cs_version="\\
68133OpenJDK config.status jdk9
68134configured by $0, generated by GNU Autoconf 2.69,
68135  with options \\"\$ac_cs_config\\"
68136
68137Copyright (C) 2012 Free Software Foundation, Inc.
68138This config.status script is free software; the Free Software Foundation
68139gives unlimited permission to copy, distribute and modify it."
68140
68141ac_pwd='$ac_pwd'
68142srcdir='$srcdir'
68143AWK='$AWK'
68144test -n "\$AWK" || AWK=awk
68145_ACEOF
68146
68147cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68148# The default lists apply if the user does not specify any file.
68149ac_need_defaults=:
68150while test $# != 0
68151do
68152  case $1 in
68153  --*=?*)
68154    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68155    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68156    ac_shift=:
68157    ;;
68158  --*=)
68159    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68160    ac_optarg=
68161    ac_shift=:
68162    ;;
68163  *)
68164    ac_option=$1
68165    ac_optarg=$2
68166    ac_shift=shift
68167    ;;
68168  esac
68169
68170  case $ac_option in
68171  # Handling of the options.
68172  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68173    ac_cs_recheck=: ;;
68174  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68175    $as_echo "$ac_cs_version"; exit ;;
68176  --config | --confi | --conf | --con | --co | --c )
68177    $as_echo "$ac_cs_config"; exit ;;
68178  --debug | --debu | --deb | --de | --d | -d )
68179    debug=: ;;
68180  --file | --fil | --fi | --f )
68181    $ac_shift
68182    case $ac_optarg in
68183    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68184    '') as_fn_error $? "missing file argument" ;;
68185    esac
68186    as_fn_append CONFIG_FILES " '$ac_optarg'"
68187    ac_need_defaults=false;;
68188  --he | --h |  --help | --hel | -h )
68189    $as_echo "$ac_cs_usage"; exit ;;
68190  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68191  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68192    ac_cs_silent=: ;;
68193
68194  # This is an error.
68195  -*) as_fn_error $? "unrecognized option: \`$1'
68196Try \`$0 --help' for more information." ;;
68197
68198  *) as_fn_append ac_config_targets " $1"
68199     ac_need_defaults=false ;;
68200
68201  esac
68202  shift
68203done
68204
68205ac_configure_extra_args=
68206
68207if $ac_cs_silent; then
68208  exec 6>/dev/null
68209  ac_configure_extra_args="$ac_configure_extra_args --silent"
68210fi
68211
68212_ACEOF
68213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68214if \$ac_cs_recheck; then
68215  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68216  shift
68217  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68218  CONFIG_SHELL='$SHELL'
68219  export CONFIG_SHELL
68220  exec "\$@"
68221fi
68222
68223_ACEOF
68224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68225exec 5>>config.log
68226{
68227  echo
68228  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68229## Running $as_me. ##
68230_ASBOX
68231  $as_echo "$ac_log"
68232} >&5
68233
68234_ACEOF
68235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68236_ACEOF
68237
68238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68239
68240# Handling of arguments.
68241for ac_config_target in $ac_config_targets
68242do
68243  case $ac_config_target in
68244    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68245    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68246    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68247    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68248    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68249
68250  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68251  esac
68252done
68253
68254
68255# If the user did not use the arguments to specify the items to instantiate,
68256# then the envvar interface is used.  Set only those that are not.
68257# We use the long form for the default assignment because of an extremely
68258# bizarre bug on SunOS 4.1.3.
68259if $ac_need_defaults; then
68260  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68261fi
68262
68263# Have a temporary directory for convenience.  Make it in the build tree
68264# simply because there is no reason against having it here, and in addition,
68265# creating and moving files from /tmp can sometimes cause problems.
68266# Hook for its removal unless debugging.
68267# Note that there is a small window in which the directory will not be cleaned:
68268# after its creation but before its name has been assigned to `$tmp'.
68269$debug ||
68270{
68271  tmp= ac_tmp=
68272  trap 'exit_status=$?
68273  : "${ac_tmp:=$tmp}"
68274  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68275' 0
68276  trap 'as_fn_exit 1' 1 2 13 15
68277}
68278# Create a (secure) tmp directory for tmp files.
68279
68280{
68281  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68282  test -d "$tmp"
68283}  ||
68284{
68285  tmp=./conf$$-$RANDOM
68286  (umask 077 && mkdir "$tmp")
68287} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68288ac_tmp=$tmp
68289
68290# Set up the scripts for CONFIG_FILES section.
68291# No need to generate them if there are no CONFIG_FILES.
68292# This happens for instance with `./config.status config.h'.
68293if test -n "$CONFIG_FILES"; then
68294
68295
68296ac_cr=`echo X | tr X '\015'`
68297# On cygwin, bash can eat \r inside `` if the user requested igncr.
68298# But we know of no other shell where ac_cr would be empty at this
68299# point, so we can use a bashism as a fallback.
68300if test "x$ac_cr" = x; then
68301  eval ac_cr=\$\'\\r\'
68302fi
68303ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68304if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68305  ac_cs_awk_cr='\\r'
68306else
68307  ac_cs_awk_cr=$ac_cr
68308fi
68309
68310echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68311_ACEOF
68312
68313
68314{
68315  echo "cat >conf$$subs.awk <<_ACEOF" &&
68316  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68317  echo "_ACEOF"
68318} >conf$$subs.sh ||
68319  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68320ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68321ac_delim='%!_!# '
68322for ac_last_try in false false false false false :; do
68323  . ./conf$$subs.sh ||
68324    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68325
68326  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68327  if test $ac_delim_n = $ac_delim_num; then
68328    break
68329  elif $ac_last_try; then
68330    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68331  else
68332    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68333  fi
68334done
68335rm -f conf$$subs.sh
68336
68337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68338cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68339_ACEOF
68340sed -n '
68341h
68342s/^/S["/; s/!.*/"]=/
68343p
68344g
68345s/^[^!]*!//
68346:repl
68347t repl
68348s/'"$ac_delim"'$//
68349t delim
68350:nl
68351h
68352s/\(.\{148\}\)..*/\1/
68353t more1
68354s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68355p
68356n
68357b repl
68358:more1
68359s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68360p
68361g
68362s/.\{148\}//
68363t nl
68364:delim
68365h
68366s/\(.\{148\}\)..*/\1/
68367t more2
68368s/["\\]/\\&/g; s/^/"/; s/$/"/
68369p
68370b
68371:more2
68372s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68373p
68374g
68375s/.\{148\}//
68376t delim
68377' <conf$$subs.awk | sed '
68378/^[^""]/{
68379  N
68380  s/\n//
68381}
68382' >>$CONFIG_STATUS || ac_write_fail=1
68383rm -f conf$$subs.awk
68384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68385_ACAWK
68386cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68387  for (key in S) S_is_set[key] = 1
68388  FS = ""
68389
68390}
68391{
68392  line = $ 0
68393  nfields = split(line, field, "@")
68394  substed = 0
68395  len = length(field[1])
68396  for (i = 2; i < nfields; i++) {
68397    key = field[i]
68398    keylen = length(key)
68399    if (S_is_set[key]) {
68400      value = S[key]
68401      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68402      len += length(value) + length(field[++i])
68403      substed = 1
68404    } else
68405      len += 1 + keylen
68406  }
68407
68408  print line
68409}
68410
68411_ACAWK
68412_ACEOF
68413cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68414if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68415  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68416else
68417  cat
68418fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68419  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68420_ACEOF
68421
68422# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68423# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68424# trailing colons and then remove the whole line if VPATH becomes empty
68425# (actually we leave an empty line to preserve line numbers).
68426if test "x$srcdir" = x.; then
68427  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68428h
68429s///
68430s/^/:/
68431s/[	 ]*$/:/
68432s/:\$(srcdir):/:/g
68433s/:\${srcdir}:/:/g
68434s/:@srcdir@:/:/g
68435s/^:*//
68436s/:*$//
68437x
68438s/\(=[	 ]*\).*/\1/
68439G
68440s/\n//
68441s/^[^=]*=[	 ]*$//
68442}'
68443fi
68444
68445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68446fi # test -n "$CONFIG_FILES"
68447
68448
68449eval set X "  :F $CONFIG_FILES      "
68450shift
68451for ac_tag
68452do
68453  case $ac_tag in
68454  :[FHLC]) ac_mode=$ac_tag; continue;;
68455  esac
68456  case $ac_mode$ac_tag in
68457  :[FHL]*:*);;
68458  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68459  :[FH]-) ac_tag=-:-;;
68460  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68461  esac
68462  ac_save_IFS=$IFS
68463  IFS=:
68464  set x $ac_tag
68465  IFS=$ac_save_IFS
68466  shift
68467  ac_file=$1
68468  shift
68469
68470  case $ac_mode in
68471  :L) ac_source=$1;;
68472  :[FH])
68473    ac_file_inputs=
68474    for ac_f
68475    do
68476      case $ac_f in
68477      -) ac_f="$ac_tmp/stdin";;
68478      *) # Look for the file first in the build tree, then in the source tree
68479	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68480	 # because $ac_f cannot contain `:'.
68481	 test -f "$ac_f" ||
68482	   case $ac_f in
68483	   [\\/$]*) false;;
68484	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68485	   esac ||
68486	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68487      esac
68488      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68489      as_fn_append ac_file_inputs " '$ac_f'"
68490    done
68491
68492    # Let's still pretend it is `configure' which instantiates (i.e., don't
68493    # use $as_me), people would be surprised to read:
68494    #    /* config.h.  Generated by config.status.  */
68495    configure_input='Generated from '`
68496	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68497	`' by configure.'
68498    if test x"$ac_file" != x-; then
68499      configure_input="$ac_file.  $configure_input"
68500      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68501$as_echo "$as_me: creating $ac_file" >&6;}
68502    fi
68503    # Neutralize special characters interpreted by sed in replacement strings.
68504    case $configure_input in #(
68505    *\&* | *\|* | *\\* )
68506       ac_sed_conf_input=`$as_echo "$configure_input" |
68507       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68508    *) ac_sed_conf_input=$configure_input;;
68509    esac
68510
68511    case $ac_tag in
68512    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68513      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68514    esac
68515    ;;
68516  esac
68517
68518  ac_dir=`$as_dirname -- "$ac_file" ||
68519$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68520	 X"$ac_file" : 'X\(//\)[^/]' \| \
68521	 X"$ac_file" : 'X\(//\)$' \| \
68522	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68523$as_echo X"$ac_file" |
68524    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68525	    s//\1/
68526	    q
68527	  }
68528	  /^X\(\/\/\)[^/].*/{
68529	    s//\1/
68530	    q
68531	  }
68532	  /^X\(\/\/\)$/{
68533	    s//\1/
68534	    q
68535	  }
68536	  /^X\(\/\).*/{
68537	    s//\1/
68538	    q
68539	  }
68540	  s/.*/./; q'`
68541  as_dir="$ac_dir"; as_fn_mkdir_p
68542  ac_builddir=.
68543
68544case "$ac_dir" in
68545.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68546*)
68547  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68548  # A ".." for each directory in $ac_dir_suffix.
68549  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68550  case $ac_top_builddir_sub in
68551  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68552  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68553  esac ;;
68554esac
68555ac_abs_top_builddir=$ac_pwd
68556ac_abs_builddir=$ac_pwd$ac_dir_suffix
68557# for backward compatibility:
68558ac_top_builddir=$ac_top_build_prefix
68559
68560case $srcdir in
68561  .)  # We are building in place.
68562    ac_srcdir=.
68563    ac_top_srcdir=$ac_top_builddir_sub
68564    ac_abs_top_srcdir=$ac_pwd ;;
68565  [\\/]* | ?:[\\/]* )  # Absolute name.
68566    ac_srcdir=$srcdir$ac_dir_suffix;
68567    ac_top_srcdir=$srcdir
68568    ac_abs_top_srcdir=$srcdir ;;
68569  *) # Relative name.
68570    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68571    ac_top_srcdir=$ac_top_build_prefix$srcdir
68572    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68573esac
68574ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68575
68576
68577  case $ac_mode in
68578  :F)
68579  #
68580  # CONFIG_FILE
68581  #
68582
68583_ACEOF
68584
68585cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68586# If the template does not know about datarootdir, expand it.
68587# FIXME: This hack should be removed a few years after 2.60.
68588ac_datarootdir_hack=; ac_datarootdir_seen=
68589ac_sed_dataroot='
68590/datarootdir/ {
68591  p
68592  q
68593}
68594/@datadir@/p
68595/@docdir@/p
68596/@infodir@/p
68597/@localedir@/p
68598/@mandir@/p'
68599case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68600*datarootdir*) ac_datarootdir_seen=yes;;
68601*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68602  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68603$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68604_ACEOF
68605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68606  ac_datarootdir_hack='
68607  s&@datadir@&$datadir&g
68608  s&@docdir@&$docdir&g
68609  s&@infodir@&$infodir&g
68610  s&@localedir@&$localedir&g
68611  s&@mandir@&$mandir&g
68612  s&\\\${datarootdir}&$datarootdir&g' ;;
68613esac
68614_ACEOF
68615
68616# Neutralize VPATH when `$srcdir' = `.'.
68617# Shell code in configure.ac might set extrasub.
68618# FIXME: do we really want to maintain this feature?
68619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68620ac_sed_extra="$ac_vpsub
68621$extrasub
68622_ACEOF
68623cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68624:t
68625/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68626s|@configure_input@|$ac_sed_conf_input|;t t
68627s&@top_builddir@&$ac_top_builddir_sub&;t t
68628s&@top_build_prefix@&$ac_top_build_prefix&;t t
68629s&@srcdir@&$ac_srcdir&;t t
68630s&@abs_srcdir@&$ac_abs_srcdir&;t t
68631s&@top_srcdir@&$ac_top_srcdir&;t t
68632s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68633s&@builddir@&$ac_builddir&;t t
68634s&@abs_builddir@&$ac_abs_builddir&;t t
68635s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68636$ac_datarootdir_hack
68637"
68638eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68639  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68640
68641test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68642  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68643  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68644      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68645  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68646which seems to be undefined.  Please make sure it is defined" >&5
68647$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68648which seems to be undefined.  Please make sure it is defined" >&2;}
68649
68650  rm -f "$ac_tmp/stdin"
68651  case $ac_file in
68652  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68653  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68654  esac \
68655  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68656 ;;
68657
68658
68659
68660  esac
68661
68662done # for ac_tag
68663
68664
68665as_fn_exit 0
68666_ACEOF
68667ac_clean_files=$ac_clean_files_save
68668
68669test $ac_write_fail = 0 ||
68670  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68671
68672
68673# configure is writing to config.log, and then calls config.status.
68674# config.status does its own redirection, appending to config.log.
68675# Unfortunately, on DOS this fails, as config.log is still kept open
68676# by configure, so config.status won't be able to write to it; its
68677# output is simply discarded.  So we exec the FD to /dev/null,
68678# effectively closing config.log, so it can be properly (re)opened and
68679# appended to by config.status.  When coming back to configure, we
68680# need to make the FD available again.
68681if test "$no_create" != yes; then
68682  ac_cs_success=:
68683  ac_config_status_args=
68684  test "$silent" = yes &&
68685    ac_config_status_args="$ac_config_status_args --quiet"
68686  exec 5>/dev/null
68687  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68688  exec 5>>config.log
68689  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68690  # would make configure fail if this is the last instruction.
68691  $ac_cs_success || as_fn_exit 1
68692fi
68693if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68694  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68695$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68696fi
68697
68698
68699# After AC_OUTPUT, we need to do final work
68700
68701
68702  # Try to move config.log (generated by autoconf) to the configure-support directory.
68703  if test -e ./config.log; then
68704    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68705  fi
68706
68707  # Rotate our log file (configure.log)
68708  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68709    $RM -f "$OUTPUT_ROOT/configure.log.old"
68710  fi
68711  if test -e "$OUTPUT_ROOT/configure.log"; then
68712    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68713  fi
68714
68715  # Move configure.log from current directory to the build output root
68716  if test -e ./configure.log; then
68717    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68718  fi
68719
68720  # Make the compare script executable
68721  $CHMOD +x $OUTPUT_ROOT/compare.sh
68722
68723
68724# Finally output some useful information to the user
68725
68726  # Finally output some useful information to the user
68727
68728  printf "\n"
68729  printf "====================================================\n"
68730  if test "x$no_create" != "xyes"; then
68731    if test "x$IS_RECONFIGURE" != "xyes"; then
68732      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68733    else
68734      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68735    fi
68736  else
68737    if test "x$IS_RECONFIGURE" != "xyes"; then
68738      printf "A configuration has been successfully checked but not created\n"
68739    else
68740      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68741    fi
68742  fi
68743  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68744    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68745  else
68746    printf "using default settings.\n"
68747  fi
68748
68749  printf "\n"
68750  printf "Configuration summary:\n"
68751  printf "* Debug level:    $DEBUG_LEVEL\n"
68752  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68753  printf "* JDK variant:    $JDK_VARIANT\n"
68754  printf "* JVM variants:   $JVM_VARIANTS\n"
68755  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68756  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68757
68758  printf "\n"
68759  printf "Tools summary:\n"
68760  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68761    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68762  fi
68763  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68764  if test "x$TOOLCHAIN_VERSION" != "x"; then
68765    print_version=" $TOOLCHAIN_VERSION"
68766  fi
68767  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68768  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68769  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68770
68771  printf "\n"
68772  printf "Build performance summary:\n"
68773  printf "* Cores to use:   $JOBS\n"
68774  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68775  if test "x$CCACHE_STATUS" != "x"; then
68776    printf "* ccache status:  $CCACHE_STATUS\n"
68777  fi
68778  printf "\n"
68779
68780  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68781    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68782    printf "will result in longer build times.\n"
68783    printf "\n"
68784  fi
68785
68786  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68787    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68788    printf "These are not respected, and will be ignored. It is recommended\n"
68789    printf "that you clean your environment. The following variables are set:\n"
68790    printf "$FOUND_ALT_VARIABLES\n"
68791    printf "\n"
68792  fi
68793
68794  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68795    printf "WARNING: Your build output directory is not on a local disk.\n"
68796    printf "This will severely degrade build performance!\n"
68797    printf "It is recommended that you create an output directory on a local disk,\n"
68798    printf "and run the configure script again from that directory.\n"
68799    printf "\n"
68800  fi
68801
68802  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68803    printf "WARNING: The result of this configuration has overridden an older\n"
68804    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68805    printf "proper build. Failure to do so might result in strange build problems.\n"
68806    printf "\n"
68807  fi
68808
68809  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68810    printf "WARNING: The result of this configuration was not saved.\n"
68811    printf "You should run without '--no-create | -n' to create the configuration.\n"
68812    printf "\n"
68813  fi
68814
68815
68816
68817  # Locate config.log.
68818  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68819    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68820  elif test -e "./config.log"; then
68821    CONFIG_LOG_PATH="."
68822  fi
68823
68824  if test -e "$CONFIG_LOG_PATH/config.log"; then
68825    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68826    if test $? -eq 0; then
68827      printf "The following warnings were produced. Repeated here for convenience:\n"
68828      # We must quote sed expression (using []) to stop m4 from eating the [].
68829      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68830      printf "\n"
68831    fi
68832  fi
68833
68834