generated-configure.sh revision 2071:a79c570f52a6
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
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655JVM_VARIANT_CORE
656JVM_VARIANT_ZEROSHARK
657JVM_VARIANT_ZERO
658JVM_VARIANT_HOTSPOT
659JVM_VARIANT_MINIMAL1
660JVM_VARIANT_CLIENT
661JVM_VARIANT_SERVER
662JVM_VARIANTS_COMMA
663TEST_IN_BUILD
664HOTSPOT_MAKE_ARGS
665MACOSX_UNIVERSAL
666DEBUG_CLASSFILES
667FASTDEBUG
668VARIANT
669USE_NEW_HOTSPOT_BUILD
670LIBZIP_CAN_USE_MMAP
671LIBDL
672LIBM
673USE_EXTERNAL_LCMS
674LCMS_LIBS
675LCMS_CFLAGS
676USE_EXTERNAL_LIBZ
677USE_EXTERNAL_LIBPNG
678PNG_LIBS
679PNG_CFLAGS
680USE_EXTERNAL_LIBGIF
681USE_EXTERNAL_LIBJPEG
682LLVM_LIBS
683LLVM_LDFLAGS
684LLVM_CFLAGS
685LLVM_CONFIG
686LIBFFI_LIBS
687LIBFFI_CFLAGS
688ALSA_LIBS
689ALSA_CFLAGS
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
702STATIC_CXX_SETTING
703FIXPATH_DETACH_FLAG
704FIXPATH
705VALID_JVM_FEATURES
706JVM_FEATURES_custom
707JVM_FEATURES_zeroshark
708JVM_FEATURES_zero
709JVM_FEATURES_minimal
710JVM_FEATURES_core
711JVM_FEATURES_client
712JVM_FEATURES_server
713INCLUDE_DTRACE
714GCOV_ENABLED
715STRIP_POLICY
716DEBUG_BINARIES
717ZIP_EXTERNAL_DEBUG_SYMBOLS
718COPY_DEBUG_SYMBOLS
719COMPILE_WITH_DEBUG_SYMBOLS
720CFLAGS_WARNINGS_ARE_ERRORS
721BUILD_CC_DISABLE_WARNING_PREFIX
722DISABLE_WARNING_PREFIX
723HOTSPOT_SET_WARNINGS_AS_ERRORS
724WARNINGS_AS_ERRORS
725COMPILER_SUPPORTS_TARGET_BITS_FLAG
726ZERO_ARCHFLAG
727LDFLAGS_TESTEXE
728LDFLAGS_TESTLIB
729CXXFLAGS_TESTEXE
730CXXFLAGS_TESTLIB
731CFLAGS_TESTEXE
732CFLAGS_TESTLIB
733OPENJDK_BUILD_JVM_LIBS
734OPENJDK_BUILD_JVM_ASFLAGS
735OPENJDK_BUILD_JVM_LDFLAGS
736OPENJDK_BUILD_JVM_CFLAGS
737OPENJDK_BUILD_LDFLAGS_HASH_STYLE
738OPENJDK_BUILD_LDFLAGS_CXX_JDK
739OPENJDK_BUILD_JDKEXE_LIBS
740OPENJDK_BUILD_JDKLIB_LIBS
741OPENJDK_BUILD_LDFLAGS_JDKEXE
742OPENJDK_BUILD_LDFLAGS_JDKLIB
743OPENJDK_BUILD_CXXFLAGS_JDKEXE
744OPENJDK_BUILD_CXXFLAGS_JDKLIB
745OPENJDK_BUILD_CFLAGS_JDKEXE
746OPENJDK_BUILD_CFLAGS_JDKLIB
747OPENJDK_BUILD_CXXSTD_CXXFLAG
748JVM_LIBS
749JVM_ASFLAGS
750JVM_LDFLAGS
751JVM_CFLAGS
752LDFLAGS_HASH_STYLE
753LDFLAGS_CXX_JDK
754JDKEXE_LIBS
755JDKLIB_LIBS
756LDFLAGS_JDKEXE
757LDFLAGS_JDKLIB
758CXXFLAGS_JDKEXE
759CXXFLAGS_JDKLIB
760CFLAGS_JDKEXE
761CFLAGS_JDKLIB
762MACOSX_VERSION_MIN
763NO_LIFETIME_DSE_CFLAG
764NO_NULL_POINTER_CHECK_CFLAG
765CXXSTD_CXXFLAG
766CXX_O_FLAG_SIZE
767CXX_O_FLAG_NONE
768CXX_O_FLAG_DEBUG
769CXX_O_FLAG_NORM
770CXX_O_FLAG_HI
771CXX_O_FLAG_HIGHEST
772CXX_O_FLAG_HIGHEST_JVM
773C_O_FLAG_SIZE
774C_O_FLAG_NONE
775C_O_FLAG_DEBUG
776C_O_FLAG_NORM
777C_O_FLAG_HI
778C_O_FLAG_HIGHEST
779C_O_FLAG_HIGHEST_JVM
780JVM_CFLAGS_SYMBOLS
781CXXFLAGS_DEBUG_SYMBOLS
782CFLAGS_DEBUG_SYMBOLS
783CXX_FLAG_DEPS
784C_FLAG_DEPS
785SHARED_LIBRARY_FLAGS
786SET_SHARED_LIBRARY_MAPFILE
787SET_SHARED_LIBRARY_NAME
788SET_SHARED_LIBRARY_ORIGIN
789SET_EXECUTABLE_ORIGIN
790CXX_FLAG_REORDER
791C_FLAG_REORDER
792JVM_RCFLAGS
793RC_FLAGS
794AR_OUT_OPTION
795LD_OUT_OPTION
796EXE_OUT_OPTION
797CC_OUT_OPTION
798STRIPFLAGS
799ARFLAGS
800COMPILER_BINDCMD_FILE_FLAG
801COMPILER_COMMAND_FILE_FLAG
802COMPILER_TARGET_BITS_FLAG
803JT_HOME
804JTREGEXE
805HOTSPOT_TOOLCHAIN_TYPE
806USING_BROKEN_SUSE_LD
807PACKAGE_PATH
808USE_CLANG
809HOTSPOT_LD
810HOTSPOT_CXX
811HOTSPOT_RC
812HOTSPOT_MT
813BUILD_AS
814BUILD_LDCXX
815BUILD_LD
816BUILD_STRIP
817BUILD_OBJCOPY
818BUILD_AR
819BUILD_NM
820BUILD_CXX
821BUILD_CC
822BUILD_SYSROOT_LDFLAGS
823BUILD_SYSROOT_CFLAGS
824ac_ct_OBJDUMP
825OBJDUMP
826ac_ct_OBJCOPY
827OBJCOPY
828ac_ct_NM
829ac_ct_STRIP
830GNM
831NM
832STRIP
833MSBUILD
834DUMPBIN
835RC
836MT
837LIPO
838ac_ct_AR
839AR
840AS
841LDCXX
842LD
843CXXCPP
844CPP
845CXX_VERSION_NUMBER
846CC_VERSION_NUMBER
847ac_ct_CXX
848CXXFLAGS
849CXX
850TOOLCHAIN_PATH_CXX
851POTENTIAL_CXX
852OBJEXT
853EXEEXT
854ac_ct_CC
855CPPFLAGS
856LDFLAGS
857CFLAGS
858CC
859TOOLCHAIN_PATH_CC
860POTENTIAL_CC
861TOOLCHAIN_VERSION
862VS_LIB
863VS_INCLUDE
864VS_PATH
865CYGWIN_LINK
866SYSROOT_LDFLAGS
867SYSROOT_CFLAGS
868EXTRA_LDFLAGS
869EXTRA_CXXFLAGS
870EXTRA_CFLAGS
871LEGACY_EXTRA_LDFLAGS
872LEGACY_EXTRA_CXXFLAGS
873LEGACY_EXTRA_CFLAGS
874EXE_SUFFIX
875OBJ_SUFFIX
876STATIC_LIBRARY
877SHARED_LIBRARY
878STATIC_LIBRARY_SUFFIX
879SHARED_LIBRARY_SUFFIX
880LIBRARY_PREFIX
881TOOLCHAIN_TYPE
882STATIC_BUILD
883IMPORT_MODULES_MAKE
884IMPORT_MODULES_SRC
885IMPORT_MODULES_CONF
886IMPORT_MODULES_LIBS
887IMPORT_MODULES_CMDS
888IMPORT_MODULES_CLASSES
889BUILD_HOTSPOT
890HOTSPOT_DIST
891BUILD_OUTPUT
892JDK_TOPDIR
893NASHORN_TOPDIR
894HOTSPOT_TOPDIR
895JAXWS_TOPDIR
896JAXP_TOPDIR
897CORBA_TOPDIR
898LANGTOOLS_TOPDIR
899BUILD_JDK
900CREATE_BUILDJDK
901BOOT_JDK_BITS
902JAVAC_FLAGS
903BOOT_JDK_MODULAR
904BOOT_JDK_SOURCETARGET
905JARSIGNER
906JAR
907JAVAH
908JAVAC
909JAVA
910BOOT_JDK
911JAVA_CHECK
912JAVAC_CHECK
913VERSION_IS_GA
914VERSION_SHORT
915VERSION_STRING
916VERSION_NUMBER_FOUR_POSITIONS
917VERSION_NUMBER
918VERSION_OPT
919VERSION_BUILD
920VERSION_PRE
921VERSION_PATCH
922VERSION_SECURITY
923VERSION_MINOR
924VERSION_MAJOR
925MACOSX_BUNDLE_ID_BASE
926MACOSX_BUNDLE_NAME_BASE
927HOTSPOT_VM_DISTRO
928COMPANY_NAME
929JDK_RC_PLATFORM_NAME
930PRODUCT_SUFFIX
931PRODUCT_NAME
932LAUNCHER_NAME
933JLINK_KEEP_PACKAGED_MODULES
934COPYRIGHT_YEAR
935COMPRESS_JARS
936INCLUDE_SA
937UNLIMITED_CRYPTO
938CACERTS_FILE
939BUILD_HEADLESS
940SUPPORT_HEADFUL
941SUPPORT_HEADLESS
942DEFAULT_MAKE_TARGET
943OS_VERSION_MICRO
944OS_VERSION_MINOR
945OS_VERSION_MAJOR
946PKG_CONFIG
947BASH_ARGS
948SETFILE
949CODESIGN
950XATTR
951DSYMUTIL
952IS_GNU_TIME
953PATCH
954DTRACE
955TIME
956STAT
957HG
958READELF
959OTOOL
960LDD
961ZIP
962UNZIP
963FIND_DELETE
964OUTPUT_SYNC
965OUTPUT_SYNC_SUPPORTED
966CHECK_TOOLSDIR_MAKE
967CHECK_TOOLSDIR_GMAKE
968CHECK_MAKE
969CHECK_GMAKE
970MAKE
971PKGHANDLER
972CONFIGURESUPPORT_OUTPUTDIR
973OUTPUT_ROOT
974CONF_NAME
975SPEC
976SDKROOT
977XCODEBUILD
978VALID_JVM_VARIANTS
979JVM_VARIANTS
980DEBUG_LEVEL
981HOTSPOT_DEBUG_LEVEL
982JDK_VARIANT
983SET_OPENJDK
984USERNAME
985CANONICAL_TOPDIR
986ORIGINAL_TOPDIR
987TOPDIR
988PATH_SEP
989ZERO_ARCHDEF
990HOTSPOT_BUILD_CPU_DEFINE
991HOTSPOT_BUILD_CPU_ARCH
992HOTSPOT_BUILD_CPU
993HOTSPOT_BUILD_OS_TYPE
994HOTSPOT_BUILD_OS
995OPENJDK_BUILD_OS_EXPORT_DIR
996OPENJDK_BUILD_CPU_JLI_CFLAGS
997OPENJDK_BUILD_CPU_OSARCH
998OPENJDK_BUILD_CPU_ISADIR
999OPENJDK_BUILD_CPU_LIBDIR
1000OPENJDK_BUILD_CPU_LEGACY_LIB
1001OPENJDK_BUILD_CPU_LEGACY
1002HOTSPOT_TARGET_CPU_DEFINE
1003HOTSPOT_TARGET_CPU_ARCH
1004HOTSPOT_TARGET_CPU
1005HOTSPOT_TARGET_OS_TYPE
1006HOTSPOT_TARGET_OS
1007DEFINE_CROSS_COMPILE_ARCH
1008LP64
1009OPENJDK_TARGET_OS_EXPORT_DIR
1010OPENJDK_TARGET_CPU_JLI_CFLAGS
1011OPENJDK_TARGET_CPU_OSARCH
1012OPENJDK_TARGET_CPU_ISADIR
1013OPENJDK_TARGET_CPU_LIBDIR
1014OPENJDK_TARGET_CPU_LEGACY_LIB
1015OPENJDK_TARGET_CPU_LEGACY
1016REQUIRED_OS_VERSION
1017REQUIRED_OS_NAME
1018COMPILE_TYPE
1019OPENJDK_TARGET_CPU_ENDIAN
1020OPENJDK_TARGET_CPU_BITS
1021OPENJDK_TARGET_CPU_ARCH
1022OPENJDK_TARGET_CPU
1023OPENJDK_TARGET_OS_ENV
1024OPENJDK_TARGET_OS_TYPE
1025OPENJDK_TARGET_OS
1026OPENJDK_BUILD_CPU_ENDIAN
1027OPENJDK_BUILD_CPU_BITS
1028OPENJDK_BUILD_CPU_ARCH
1029OPENJDK_BUILD_CPU
1030OPENJDK_BUILD_OS_ENV
1031OPENJDK_BUILD_OS_TYPE
1032OPENJDK_BUILD_OS
1033OPENJDK_BUILD_AUTOCONF_NAME
1034OPENJDK_TARGET_AUTOCONF_NAME
1035target_os
1036target_vendor
1037target_cpu
1038target
1039host_os
1040host_vendor
1041host_cpu
1042host
1043build_os
1044build_vendor
1045build_cpu
1046build
1047NICE
1048CPIO
1049DF
1050READLINK
1051CYGPATH
1052SED
1053FGREP
1054EGREP
1055GREP
1056AWK
1057XARGS
1058WHICH
1059WC
1060UNIQ
1061UNAME
1062TR
1063TOUCH
1064TEE
1065TAR
1066TAIL
1067SORT
1068SH
1069RMDIR
1070RM
1071PRINTF
1072NAWK
1073MV
1074MKTEMP
1075MKDIR
1076LS
1077LN
1078HEAD
1079FIND
1080FILE
1081EXPR
1082ECHO
1083DIRNAME
1084DIFF
1085DATE
1086CUT
1087CP
1088COMM
1089CMP
1090CHMOD
1091CAT
1092BASH
1093BASENAME
1094DATE_WHEN_CONFIGURED
1095ORIGINAL_PATH
1096CONFIGURE_COMMAND_LINE
1097target_alias
1098host_alias
1099build_alias
1100LIBS
1101ECHO_T
1102ECHO_N
1103ECHO_C
1104DEFS
1105mandir
1106localedir
1107libdir
1108psdir
1109pdfdir
1110dvidir
1111htmldir
1112infodir
1113docdir
1114oldincludedir
1115includedir
1116localstatedir
1117sharedstatedir
1118sysconfdir
1119datadir
1120datarootdir
1121libexecdir
1122sbindir
1123bindir
1124program_transform_name
1125prefix
1126exec_prefix
1127PACKAGE_URL
1128PACKAGE_BUGREPORT
1129PACKAGE_STRING
1130PACKAGE_VERSION
1131PACKAGE_TARNAME
1132PACKAGE_NAME
1133PATH_SEPARATOR
1134SHELL'
1135ac_subst_files=''
1136ac_user_opts='
1137enable_option_checking
1138with_target_bits
1139enable_openjdk_only
1140with_custom_make_dir
1141with_jdk_variant
1142enable_debug
1143with_debug_level
1144with_jvm_variants
1145with_devkit
1146with_sys_root
1147with_sysroot
1148with_tools_dir
1149with_toolchain_path
1150with_extra_path
1151with_sdk_name
1152with_conf_name
1153with_output_sync
1154with_default_make_target
1155enable_headful
1156with_cacerts_file
1157enable_unlimited_crypto
1158with_copyright_year
1159enable_keep_packaged_modules
1160with_milestone
1161with_update_version
1162with_user_release_suffix
1163with_build_number
1164with_version_string
1165with_version_pre
1166with_version_opt
1167with_version_build
1168with_version_major
1169with_version_minor
1170with_version_security
1171with_version_patch
1172with_boot_jdk
1173with_build_jdk
1174with_add_source_root
1175with_override_source_root
1176with_adds_and_overrides
1177with_override_langtools
1178with_override_corba
1179with_override_jaxp
1180with_override_jaxws
1181with_override_hotspot
1182with_override_nashorn
1183with_override_jdk
1184with_import_hotspot
1185with_import_modules
1186enable_static_build
1187with_toolchain_type
1188with_extra_cflags
1189with_extra_cxxflags
1190with_extra_ldflags
1191with_toolchain_version
1192with_build_devkit
1193with_jtreg
1194enable_warnings_as_errors
1195with_native_debug_symbols
1196enable_debug_symbols
1197enable_zip_debug_info
1198enable_native_coverage
1199enable_dtrace
1200with_jvm_features
1201with_jvm_interpreter
1202with_stdc__lib
1203with_msvcr_dll
1204with_msvcp_dll
1205with_x
1206with_cups
1207with_cups_include
1208with_freetype
1209with_freetype_include
1210with_freetype_lib
1211with_freetype_src
1212enable_freetype_bundling
1213with_alsa
1214with_alsa_include
1215with_alsa_lib
1216with_libffi
1217with_libffi_include
1218with_libffi_lib
1219with_libjpeg
1220with_giflib
1221with_libpng
1222with_zlib
1223with_lcms
1224with_dxsdk
1225with_dxsdk_lib
1226with_dxsdk_include
1227enable_jtreg_failure_handler
1228enable_new_hotspot_build
1229enable_hotspot_test_in_build
1230with_num_cores
1231with_memory_size
1232with_jobs
1233with_test_jobs
1234with_boot_jdk_jvmargs
1235with_sjavac_server_java
1236enable_sjavac
1237enable_javac_server
1238enable_icecc
1239enable_precompiled_headers
1240enable_ccache
1241with_ccache_dir
1242'
1243      ac_precious_vars='build_alias
1244host_alias
1245target_alias
1246BASENAME
1247BASH
1248CAT
1249CHMOD
1250CMP
1251COMM
1252CP
1253CUT
1254DATE
1255DIFF
1256DIRNAME
1257ECHO
1258EXPR
1259FILE
1260FIND
1261HEAD
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293MAKE
1294UNZIP
1295ZIP
1296LDD
1297OTOOL
1298READELF
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --disable-headful       disable building headful support (graphical UI
1977                          support) [enabled]
1978  --enable-unlimited-crypto
1979                          Enable unlimited crypto policy [disabled]
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  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --disable-new-hotspot-build
2001                          disable the new hotspot build system (use the old)
2002                          [enabled]
2003  --enable-hotspot-test-in-build
2004                          run the Queens test after Hotspot build [disabled]
2005  --enable-jtreg-failure-handler
2006                          forces build of the jtreg failure handler to be
2007                          enabled, missing dependencies become fatal errors.
2008                          Default is auto, where the failure handler is built
2009                          if all dependencies are present and otherwise just
2010                          disabled.
2011  --enable-sjavac         use sjavac to do fast incremental compiles
2012                          [disabled]
2013  --disable-javac-server  disable javac server [enabled]
2014  --enable-icecc          enable distribted compilation of native code using
2015                          icecc/icecream [disabled]
2016  --disable-precompiled-headers
2017                          disable using precompiled headers when compiling C++
2018                          [enabled]
2019  --enable-ccache         enable using ccache to speed up recompilations
2020                          [disabled]
2021
2022Optional Packages:
2023  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2024  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2025  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2026                          support it), e.g. --with-target-bits=32 [guessed]
2027  --with-custom-make-dir  Deprecated. Option is kept for backwards
2028                          compatibility and is ignored
2029  --with-jdk-variant      JDK variant to build (normal) [normal]
2030  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2031                          optimized) [release]
2032  --with-jvm-variants     JVM variants (separated by commas) to build
2033                          (server,client,minimal,core,zero,zeroshark,custom)
2034                          [server]
2035  --with-devkit           use this devkit for compilers, tools and resources
2036  --with-sys-root         alias for --with-sysroot for backwards compatability
2037  --with-sysroot          use this directory as sysroot
2038  --with-tools-dir        alias for --with-toolchain-path for backwards
2039                          compatibility
2040  --with-toolchain-path   prepend these directories when searching for
2041                          toolchain binaries (compilers etc)
2042  --with-extra-path       prepend these directories to the default path
2043  --with-sdk-name         use the platform SDK of the given name. [macosx]
2044  --with-conf-name        use this as the name of the configuration [generated
2045                          from important configuration options]
2046  --with-output-sync      set make output sync type if supported by make.
2047                          [recurse]
2048  --with-default-make-target
2049                          set the default make target [exploded-image]
2050  --with-cacerts-file     specify alternative cacerts file
2051  --with-copyright-year   Set copyright year value for build [current year]
2052  --with-milestone        Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-update-version   Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-user-release-suffix
2057                          Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-build-number     Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-version-string   Set version string [calculated]
2062  --with-version-pre      Set the base part of the version 'PRE' field
2063                          (pre-release identifier) ['internal']
2064  --with-version-opt      Set version 'OPT' field (build metadata)
2065                          [<timestamp>.<user>.<dirname>]
2066  --with-version-build    Set version 'BUILD' field (build number) [not
2067                          specified]
2068  --with-version-major    Set version 'MAJOR' field (first number) [current
2069                          source value]
2070  --with-version-minor    Set version 'MINOR' field (second number) [current
2071                          source value]
2072  --with-version-security Set version 'SECURITY' field (third number) [current
2073                          source value]
2074  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2075                          specified]
2076  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2077  --with-build-jdk        path to JDK of same version as is being built[the
2078                          newly built JDK]
2079  --with-add-source-root  Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-override-source-root
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-adds-and-overrides
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-langtools
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-corba   Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jaxp    Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-jaxws   Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-hotspot Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-nashorn Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-jdk     Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-import-hotspot   import hotspot binaries from this jdk image or
2103                          hotspot build dist dir instead of building from
2104                          source
2105  --with-import-modules   import a set of prebuilt modules either as a zip
2106                          file or an exploded directory
2107  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2108                          to show possible values [platform dependent]
2109  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2110  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2111  --with-extra-ldflags    extra flags to be used when linking jdk
2112  --with-toolchain-version
2113                          the version of the toolchain to look for, use
2114                          '--help' to show possible values [platform
2115                          dependent]
2116  --with-build-devkit     Devkit to use for the build platform toolchain
2117  --with-jtreg            Regression Test Harness [probed]
2118  --with-native-debug-symbols
2119                          set the native debug symbol configuration (none,
2120                          internal, external, zipped) [varying]
2121  --with-jvm-features     additional JVM features to enable (separated by
2122                          comma), use '--help' to show possible values [none]
2123  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2124                          compatibility and is ignored
2125  --with-stdc++lib=<static>,<dynamic>,<default>
2126                          force linking of the C++ runtime on Linux to either
2127                          static or dynamic, default is static with dynamic as
2128                          fallback
2129  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2130                          (Windows only) [probed]
2131  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2132                          (Windows only) [probed]
2133  --with-x                use the X Window System
2134  --with-cups             specify prefix directory for the cups package
2135                          (expecting the headers under PATH/include)
2136  --with-cups-include     specify directory for the cups include files
2137  --with-freetype         specify prefix directory for the freetype package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-freetype-include specify directory for the freetype include files
2141  --with-freetype-lib     specify directory for the freetype library
2142  --with-freetype-src     specify directory with freetype sources to
2143                          automatically build the library (experimental,
2144                          Windows-only)
2145  --with-alsa             specify prefix directory for the alsa package
2146                          (expecting the libraries under PATH/lib and the
2147                          headers under PATH/include)
2148  --with-alsa-include     specify directory for the alsa include files
2149  --with-alsa-lib         specify directory for the alsa library
2150  --with-libffi           specify prefix directory for the libffi package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-libffi-include   specify directory for the libffi include files
2154  --with-libffi-lib       specify directory for the libffi library
2155  --with-libjpeg          use libjpeg from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-giflib           use giflib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-libpng           use libpng from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-zlib             use zlib from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-lcms             use lcms2 from build system or OpenJDK source
2164                          (system, bundled) [bundled]
2165  --with-dxsdk            Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-dxsdk-include    Deprecated. Option is kept for backwards
2170                          compatibility and is ignored
2171  --with-num-cores        number of cores in the build system, e.g.
2172                          --with-num-cores=8 [probed]
2173  --with-memory-size      memory (in MB) available in the build system, e.g.
2174                          --with-memory-size=1024 [probed]
2175  --with-jobs             number of parallel jobs to let make run [calculated
2176                          based on cores and memory]
2177  --with-test-jobs        number of parallel tests jobs to run [based on build
2178                          jobs]
2179  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2180                          invocations of boot JDK, overriding the default
2181                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2182                          -enableassertions"
2183  --with-sjavac-server-java
2184                          use this java binary for running the sjavac
2185                          background server [Boot JDK java]
2186  --with-ccache-dir       where to store ccache files [~/.ccache]
2187
2188Some influential environment variables:
2189  BASENAME    Override default value for BASENAME
2190  BASH        Override default value for BASH
2191  CAT         Override default value for CAT
2192  CHMOD       Override default value for CHMOD
2193  CMP         Override default value for CMP
2194  COMM        Override default value for COMM
2195  CP          Override default value for CP
2196  CUT         Override default value for CUT
2197  DATE        Override default value for DATE
2198  DIFF        Override default value for DIFF
2199  DIRNAME     Override default value for DIRNAME
2200  ECHO        Override default value for ECHO
2201  EXPR        Override default value for EXPR
2202  FILE        Override default value for FILE
2203  FIND        Override default value for FIND
2204  HEAD        Override default value for HEAD
2205  LN          Override default value for LN
2206  LS          Override default value for LS
2207  MKDIR       Override default value for MKDIR
2208  MKTEMP      Override default value for MKTEMP
2209  MV          Override default value for MV
2210  NAWK        Override default value for NAWK
2211  PRINTF      Override default value for PRINTF
2212  RM          Override default value for RM
2213  RMDIR       Override default value for RMDIR
2214  SH          Override default value for SH
2215  SORT        Override default value for SORT
2216  TAIL        Override default value for TAIL
2217  TAR         Override default value for TAR
2218  TEE         Override default value for TEE
2219  TOUCH       Override default value for TOUCH
2220  TR          Override default value for TR
2221  UNAME       Override default value for UNAME
2222  UNIQ        Override default value for UNIQ
2223  WC          Override default value for WC
2224  WHICH       Override default value for WHICH
2225  XARGS       Override default value for XARGS
2226  AWK         Override default value for AWK
2227  GREP        Override default value for GREP
2228  EGREP       Override default value for EGREP
2229  FGREP       Override default value for FGREP
2230  SED         Override default value for SED
2231  CYGPATH     Override default value for CYGPATH
2232  READLINK    Override default value for READLINK
2233  DF          Override default value for DF
2234  CPIO        Override default value for CPIO
2235  NICE        Override default value for NICE
2236  MAKE        Override default value for MAKE
2237  UNZIP       Override default value for UNZIP
2238  ZIP         Override default value for ZIP
2239  LDD         Override default value for LDD
2240  OTOOL       Override default value for OTOOL
2241  READELF     Override default value for READELF
2242  HG          Override default value for HG
2243  STAT        Override default value for STAT
2244  TIME        Override default value for TIME
2245  DTRACE      Override default value for DTRACE
2246  PATCH       Override default value for PATCH
2247  DSYMUTIL    Override default value for DSYMUTIL
2248  XATTR       Override default value for XATTR
2249  CODESIGN    Override default value for CODESIGN
2250  SETFILE     Override default value for SETFILE
2251  PKG_CONFIG  path to pkg-config utility
2252  JAVA        Override default value for JAVA
2253  JAVAC       Override default value for JAVAC
2254  JAVAH       Override default value for JAVAH
2255  JAR         Override default value for JAR
2256  JARSIGNER   Override default value for JARSIGNER
2257  CC          C compiler command
2258  CFLAGS      C compiler flags
2259  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2260              nonstandard directory <lib dir>
2261  LIBS        libraries to pass to the linker, e.g. -l<library>
2262  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2263              you have headers in a nonstandard directory <include dir>
2264  CXX         C++ compiler command
2265  CXXFLAGS    C++ compiler flags
2266  CPP         C preprocessor
2267  CXXCPP      C++ preprocessor
2268  AS          Override default value for AS
2269  AR          Override default value for AR
2270  LIPO        Override default value for LIPO
2271  STRIP       Override default value for STRIP
2272  NM          Override default value for NM
2273  GNM         Override default value for GNM
2274  OBJCOPY     Override default value for OBJCOPY
2275  OBJDUMP     Override default value for OBJDUMP
2276  BUILD_CC    Override default value for BUILD_CC
2277  BUILD_CXX   Override default value for BUILD_CXX
2278  BUILD_NM    Override default value for BUILD_NM
2279  BUILD_AR    Override default value for BUILD_AR
2280  BUILD_OBJCOPY
2281              Override default value for BUILD_OBJCOPY
2282  BUILD_STRIP Override default value for BUILD_STRIP
2283  JTREGEXE    Override default value for JTREGEXE
2284  XMKMF       Path to xmkmf, Makefile generator for X Window System
2285  FREETYPE_CFLAGS
2286              C compiler flags for FREETYPE, overriding pkg-config
2287  FREETYPE_LIBS
2288              linker flags for FREETYPE, overriding pkg-config
2289  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2290  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2291  LIBFFI_CFLAGS
2292              C compiler flags for LIBFFI, overriding pkg-config
2293  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2294  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2295  PNG_LIBS    linker flags for PNG, overriding pkg-config
2296  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2297  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2298  ICECC_CMD   Override default value for ICECC_CMD
2299  ICECC_CREATE_ENV
2300              Override default value for ICECC_CREATE_ENV
2301  ICECC_WRAPPER
2302              Override default value for ICECC_WRAPPER
2303  CCACHE      Override default value for CCACHE
2304
2305Use these variables to override the choices made by `configure' or to help
2306it to find libraries and programs with nonstandard names/locations.
2307
2308Report bugs to <build-dev@openjdk.java.net>.
2309OpenJDK home page: <http://openjdk.java.net>.
2310_ACEOF
2311ac_status=$?
2312fi
2313
2314if test "$ac_init_help" = "recursive"; then
2315  # If there are subdirs, report their specific --help.
2316  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2317    test -d "$ac_dir" ||
2318      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2319      continue
2320    ac_builddir=.
2321
2322case "$ac_dir" in
2323.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324*)
2325  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2326  # A ".." for each directory in $ac_dir_suffix.
2327  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2328  case $ac_top_builddir_sub in
2329  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2330  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2331  esac ;;
2332esac
2333ac_abs_top_builddir=$ac_pwd
2334ac_abs_builddir=$ac_pwd$ac_dir_suffix
2335# for backward compatibility:
2336ac_top_builddir=$ac_top_build_prefix
2337
2338case $srcdir in
2339  .)  # We are building in place.
2340    ac_srcdir=.
2341    ac_top_srcdir=$ac_top_builddir_sub
2342    ac_abs_top_srcdir=$ac_pwd ;;
2343  [\\/]* | ?:[\\/]* )  # Absolute name.
2344    ac_srcdir=$srcdir$ac_dir_suffix;
2345    ac_top_srcdir=$srcdir
2346    ac_abs_top_srcdir=$srcdir ;;
2347  *) # Relative name.
2348    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2349    ac_top_srcdir=$ac_top_build_prefix$srcdir
2350    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2351esac
2352ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2353
2354    cd "$ac_dir" || { ac_status=$?; continue; }
2355    # Check for guested configure.
2356    if test -f "$ac_srcdir/configure.gnu"; then
2357      echo &&
2358      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2359    elif test -f "$ac_srcdir/configure"; then
2360      echo &&
2361      $SHELL "$ac_srcdir/configure" --help=recursive
2362    else
2363      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2364    fi || ac_status=$?
2365    cd "$ac_pwd" || { ac_status=$?; break; }
2366  done
2367fi
2368
2369test -n "$ac_init_help" && exit $ac_status
2370if $ac_init_version; then
2371  cat <<\_ACEOF
2372OpenJDK configure jdk9
2373generated by GNU Autoconf 2.69
2374
2375Copyright (C) 2012 Free Software Foundation, Inc.
2376This configure script is free software; the Free Software Foundation
2377gives unlimited permission to copy, distribute and modify it.
2378_ACEOF
2379  exit
2380fi
2381
2382## ------------------------ ##
2383## Autoconf initialization. ##
2384## ------------------------ ##
2385
2386# ac_fn_c_try_compile LINENO
2387# --------------------------
2388# Try to compile conftest.$ac_ext, and return whether this succeeded.
2389ac_fn_c_try_compile ()
2390{
2391  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392  rm -f conftest.$ac_objext
2393  if { { ac_try="$ac_compile"
2394case "(($ac_try" in
2395  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2396  *) ac_try_echo=$ac_try;;
2397esac
2398eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2399$as_echo "$ac_try_echo"; } >&5
2400  (eval "$ac_compile") 2>conftest.err
2401  ac_status=$?
2402  if test -s conftest.err; then
2403    grep -v '^ *+' conftest.err >conftest.er1
2404    cat conftest.er1 >&5
2405    mv -f conftest.er1 conftest.err
2406  fi
2407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2408  test $ac_status = 0; } && {
2409	 test -z "$ac_c_werror_flag" ||
2410	 test ! -s conftest.err
2411       } && test -s conftest.$ac_objext; then :
2412  ac_retval=0
2413else
2414  $as_echo "$as_me: failed program was:" >&5
2415sed 's/^/| /' conftest.$ac_ext >&5
2416
2417	ac_retval=1
2418fi
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_c_try_compile
2423
2424# ac_fn_cxx_try_compile LINENO
2425# ----------------------------
2426# Try to compile conftest.$ac_ext, and return whether this succeeded.
2427ac_fn_cxx_try_compile ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  rm -f conftest.$ac_objext
2431  if { { ac_try="$ac_compile"
2432case "(($ac_try" in
2433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434  *) ac_try_echo=$ac_try;;
2435esac
2436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437$as_echo "$ac_try_echo"; } >&5
2438  (eval "$ac_compile") 2>conftest.err
2439  ac_status=$?
2440  if test -s conftest.err; then
2441    grep -v '^ *+' conftest.err >conftest.er1
2442    cat conftest.er1 >&5
2443    mv -f conftest.er1 conftest.err
2444  fi
2445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2446  test $ac_status = 0; } && {
2447	 test -z "$ac_cxx_werror_flag" ||
2448	 test ! -s conftest.err
2449       } && test -s conftest.$ac_objext; then :
2450  ac_retval=0
2451else
2452  $as_echo "$as_me: failed program was:" >&5
2453sed 's/^/| /' conftest.$ac_ext >&5
2454
2455	ac_retval=1
2456fi
2457  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458  as_fn_set_status $ac_retval
2459
2460} # ac_fn_cxx_try_compile
2461
2462# ac_fn_c_try_cpp LINENO
2463# ----------------------
2464# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2465ac_fn_c_try_cpp ()
2466{
2467  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468  if { { ac_try="$ac_cpp conftest.$ac_ext"
2469case "(($ac_try" in
2470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2471  *) ac_try_echo=$ac_try;;
2472esac
2473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2474$as_echo "$ac_try_echo"; } >&5
2475  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2476  ac_status=$?
2477  if test -s conftest.err; then
2478    grep -v '^ *+' conftest.err >conftest.er1
2479    cat conftest.er1 >&5
2480    mv -f conftest.er1 conftest.err
2481  fi
2482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483  test $ac_status = 0; } > conftest.i && {
2484	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2485	 test ! -s conftest.err
2486       }; then :
2487  ac_retval=0
2488else
2489  $as_echo "$as_me: failed program was:" >&5
2490sed 's/^/| /' conftest.$ac_ext >&5
2491
2492    ac_retval=1
2493fi
2494  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2495  as_fn_set_status $ac_retval
2496
2497} # ac_fn_c_try_cpp
2498
2499# ac_fn_cxx_try_cpp LINENO
2500# ------------------------
2501# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2502ac_fn_cxx_try_cpp ()
2503{
2504  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2505  if { { ac_try="$ac_cpp conftest.$ac_ext"
2506case "(($ac_try" in
2507  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2508  *) ac_try_echo=$ac_try;;
2509esac
2510eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2511$as_echo "$ac_try_echo"; } >&5
2512  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2513  ac_status=$?
2514  if test -s conftest.err; then
2515    grep -v '^ *+' conftest.err >conftest.er1
2516    cat conftest.er1 >&5
2517    mv -f conftest.er1 conftest.err
2518  fi
2519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2520  test $ac_status = 0; } > conftest.i && {
2521	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2522	 test ! -s conftest.err
2523       }; then :
2524  ac_retval=0
2525else
2526  $as_echo "$as_me: failed program was:" >&5
2527sed 's/^/| /' conftest.$ac_ext >&5
2528
2529    ac_retval=1
2530fi
2531  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2532  as_fn_set_status $ac_retval
2533
2534} # ac_fn_cxx_try_cpp
2535
2536# ac_fn_c_try_link LINENO
2537# -----------------------
2538# Try to link conftest.$ac_ext, and return whether this succeeded.
2539ac_fn_c_try_link ()
2540{
2541  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2542  rm -f conftest.$ac_objext conftest$ac_exeext
2543  if { { ac_try="$ac_link"
2544case "(($ac_try" in
2545  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546  *) ac_try_echo=$ac_try;;
2547esac
2548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549$as_echo "$ac_try_echo"; } >&5
2550  (eval "$ac_link") 2>conftest.err
2551  ac_status=$?
2552  if test -s conftest.err; then
2553    grep -v '^ *+' conftest.err >conftest.er1
2554    cat conftest.er1 >&5
2555    mv -f conftest.er1 conftest.err
2556  fi
2557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2558  test $ac_status = 0; } && {
2559	 test -z "$ac_c_werror_flag" ||
2560	 test ! -s conftest.err
2561       } && test -s conftest$ac_exeext && {
2562	 test "$cross_compiling" = yes ||
2563	 test -x conftest$ac_exeext
2564       }; then :
2565  ac_retval=0
2566else
2567  $as_echo "$as_me: failed program was:" >&5
2568sed 's/^/| /' conftest.$ac_ext >&5
2569
2570	ac_retval=1
2571fi
2572  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2573  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2574  # interfere with the next link command; also delete a directory that is
2575  # left behind by Apple's compiler.  We do this before executing the actions.
2576  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2577  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2578  as_fn_set_status $ac_retval
2579
2580} # ac_fn_c_try_link
2581
2582# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2583# ---------------------------------------------------------
2584# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2585# the include files in INCLUDES and setting the cache variable VAR
2586# accordingly.
2587ac_fn_cxx_check_header_mongrel ()
2588{
2589  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590  if eval \${$3+:} false; then :
2591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2592$as_echo_n "checking for $2... " >&6; }
2593if eval \${$3+:} false; then :
2594  $as_echo_n "(cached) " >&6
2595fi
2596eval ac_res=\$$3
2597	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2598$as_echo "$ac_res" >&6; }
2599else
2600  # Is the header compilable?
2601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2602$as_echo_n "checking $2 usability... " >&6; }
2603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606#include <$2>
2607_ACEOF
2608if ac_fn_cxx_try_compile "$LINENO"; then :
2609  ac_header_compiler=yes
2610else
2611  ac_header_compiler=no
2612fi
2613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2615$as_echo "$ac_header_compiler" >&6; }
2616
2617# Is the header present?
2618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2619$as_echo_n "checking $2 presence... " >&6; }
2620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622#include <$2>
2623_ACEOF
2624if ac_fn_cxx_try_cpp "$LINENO"; then :
2625  ac_header_preproc=yes
2626else
2627  ac_header_preproc=no
2628fi
2629rm -f conftest.err conftest.i conftest.$ac_ext
2630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2631$as_echo "$ac_header_preproc" >&6; }
2632
2633# So?  What about this header?
2634case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2635  yes:no: )
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2637$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2639$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2640    ;;
2641  no:yes:* )
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2643$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2645$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2647$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2649$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2651$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2652( $as_echo "## ----------------------------------------- ##
2653## Report this to build-dev@openjdk.java.net ##
2654## ----------------------------------------- ##"
2655     ) | sed "s/^/$as_me: WARNING:     /" >&2
2656    ;;
2657esac
2658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2659$as_echo_n "checking for $2... " >&6; }
2660if eval \${$3+:} false; then :
2661  $as_echo_n "(cached) " >&6
2662else
2663  eval "$3=\$ac_header_compiler"
2664fi
2665eval ac_res=\$$3
2666	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2667$as_echo "$ac_res" >&6; }
2668fi
2669  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2670
2671} # ac_fn_cxx_check_header_mongrel
2672
2673# ac_fn_cxx_try_run LINENO
2674# ------------------------
2675# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2676# that executables *can* be run.
2677ac_fn_cxx_try_run ()
2678{
2679  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2680  if { { ac_try="$ac_link"
2681case "(($ac_try" in
2682  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2683  *) ac_try_echo=$ac_try;;
2684esac
2685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2686$as_echo "$ac_try_echo"; } >&5
2687  (eval "$ac_link") 2>&5
2688  ac_status=$?
2689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2690  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2691  { { case "(($ac_try" in
2692  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2693  *) ac_try_echo=$ac_try;;
2694esac
2695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2696$as_echo "$ac_try_echo"; } >&5
2697  (eval "$ac_try") 2>&5
2698  ac_status=$?
2699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2700  test $ac_status = 0; }; }; then :
2701  ac_retval=0
2702else
2703  $as_echo "$as_me: program exited with status $ac_status" >&5
2704       $as_echo "$as_me: failed program was:" >&5
2705sed 's/^/| /' conftest.$ac_ext >&5
2706
2707       ac_retval=$ac_status
2708fi
2709  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711  as_fn_set_status $ac_retval
2712
2713} # ac_fn_cxx_try_run
2714
2715# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2716# ---------------------------------------------------------
2717# Tests whether HEADER exists and can be compiled using the include files in
2718# INCLUDES, setting the cache variable VAR accordingly.
2719ac_fn_cxx_check_header_compile ()
2720{
2721  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2723$as_echo_n "checking for $2... " >&6; }
2724if eval \${$3+:} false; then :
2725  $as_echo_n "(cached) " >&6
2726else
2727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728/* end confdefs.h.  */
2729$4
2730#include <$2>
2731_ACEOF
2732if ac_fn_cxx_try_compile "$LINENO"; then :
2733  eval "$3=yes"
2734else
2735  eval "$3=no"
2736fi
2737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2738fi
2739eval ac_res=\$$3
2740	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2741$as_echo "$ac_res" >&6; }
2742  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743
2744} # ac_fn_cxx_check_header_compile
2745
2746# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2747# ----------------------------------------------
2748# Tries to find the compile-time value of EXPR in a program that includes
2749# INCLUDES, setting VAR accordingly. Returns whether the value could be
2750# computed
2751ac_fn_cxx_compute_int ()
2752{
2753  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2754  if test "$cross_compiling" = yes; then
2755    # Depending upon the size, compute the lo and hi bounds.
2756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2757/* end confdefs.h.  */
2758$4
2759int
2760main ()
2761{
2762static int test_array [1 - 2 * !(($2) >= 0)];
2763test_array [0] = 0;
2764return test_array [0];
2765
2766  ;
2767  return 0;
2768}
2769_ACEOF
2770if ac_fn_cxx_try_compile "$LINENO"; then :
2771  ac_lo=0 ac_mid=0
2772  while :; do
2773    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2774/* end confdefs.h.  */
2775$4
2776int
2777main ()
2778{
2779static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2780test_array [0] = 0;
2781return test_array [0];
2782
2783  ;
2784  return 0;
2785}
2786_ACEOF
2787if ac_fn_cxx_try_compile "$LINENO"; then :
2788  ac_hi=$ac_mid; break
2789else
2790  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2791			if test $ac_lo -le $ac_mid; then
2792			  ac_lo= ac_hi=
2793			  break
2794			fi
2795			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2796fi
2797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2798  done
2799else
2800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802$4
2803int
2804main ()
2805{
2806static int test_array [1 - 2 * !(($2) < 0)];
2807test_array [0] = 0;
2808return test_array [0];
2809
2810  ;
2811  return 0;
2812}
2813_ACEOF
2814if ac_fn_cxx_try_compile "$LINENO"; then :
2815  ac_hi=-1 ac_mid=-1
2816  while :; do
2817    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2818/* end confdefs.h.  */
2819$4
2820int
2821main ()
2822{
2823static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2824test_array [0] = 0;
2825return test_array [0];
2826
2827  ;
2828  return 0;
2829}
2830_ACEOF
2831if ac_fn_cxx_try_compile "$LINENO"; then :
2832  ac_lo=$ac_mid; break
2833else
2834  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2835			if test $ac_mid -le $ac_hi; then
2836			  ac_lo= ac_hi=
2837			  break
2838			fi
2839			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2840fi
2841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842  done
2843else
2844  ac_lo= ac_hi=
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849# Binary search between lo and hi bounds.
2850while test "x$ac_lo" != "x$ac_hi"; do
2851  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2853/* end confdefs.h.  */
2854$4
2855int
2856main ()
2857{
2858static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2859test_array [0] = 0;
2860return test_array [0];
2861
2862  ;
2863  return 0;
2864}
2865_ACEOF
2866if ac_fn_cxx_try_compile "$LINENO"; then :
2867  ac_hi=$ac_mid
2868else
2869  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872done
2873case $ac_lo in #((
2874?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2875'') ac_retval=1 ;;
2876esac
2877  else
2878    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$4
2881static long int longval () { return $2; }
2882static unsigned long int ulongval () { return $2; }
2883#include <stdio.h>
2884#include <stdlib.h>
2885int
2886main ()
2887{
2888
2889  FILE *f = fopen ("conftest.val", "w");
2890  if (! f)
2891    return 1;
2892  if (($2) < 0)
2893    {
2894      long int i = longval ();
2895      if (i != ($2))
2896	return 1;
2897      fprintf (f, "%ld", i);
2898    }
2899  else
2900    {
2901      unsigned long int i = ulongval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%lu", i);
2905    }
2906  /* Do not output a trailing newline, as this causes \r\n confusion
2907     on some platforms.  */
2908  return ferror (f) || fclose (f) != 0;
2909
2910  ;
2911  return 0;
2912}
2913_ACEOF
2914if ac_fn_cxx_try_run "$LINENO"; then :
2915  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2916else
2917  ac_retval=1
2918fi
2919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2920  conftest.$ac_objext conftest.beam conftest.$ac_ext
2921rm -f conftest.val
2922
2923  fi
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925  as_fn_set_status $ac_retval
2926
2927} # ac_fn_cxx_compute_int
2928
2929# ac_fn_cxx_try_link LINENO
2930# -------------------------
2931# Try to link conftest.$ac_ext, and return whether this succeeded.
2932ac_fn_cxx_try_link ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  rm -f conftest.$ac_objext conftest$ac_exeext
2936  if { { ac_try="$ac_link"
2937case "(($ac_try" in
2938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939  *) ac_try_echo=$ac_try;;
2940esac
2941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2942$as_echo "$ac_try_echo"; } >&5
2943  (eval "$ac_link") 2>conftest.err
2944  ac_status=$?
2945  if test -s conftest.err; then
2946    grep -v '^ *+' conftest.err >conftest.er1
2947    cat conftest.er1 >&5
2948    mv -f conftest.er1 conftest.err
2949  fi
2950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2951  test $ac_status = 0; } && {
2952	 test -z "$ac_cxx_werror_flag" ||
2953	 test ! -s conftest.err
2954       } && test -s conftest$ac_exeext && {
2955	 test "$cross_compiling" = yes ||
2956	 test -x conftest$ac_exeext
2957       }; then :
2958  ac_retval=0
2959else
2960  $as_echo "$as_me: failed program was:" >&5
2961sed 's/^/| /' conftest.$ac_ext >&5
2962
2963	ac_retval=1
2964fi
2965  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2966  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2967  # interfere with the next link command; also delete a directory that is
2968  # left behind by Apple's compiler.  We do this before executing the actions.
2969  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2970  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2971  as_fn_set_status $ac_retval
2972
2973} # ac_fn_cxx_try_link
2974
2975# ac_fn_cxx_check_func LINENO FUNC VAR
2976# ------------------------------------
2977# Tests whether FUNC exists, setting the cache variable VAR accordingly
2978ac_fn_cxx_check_func ()
2979{
2980  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2982$as_echo_n "checking for $2... " >&6; }
2983if eval \${$3+:} false; then :
2984  $as_echo_n "(cached) " >&6
2985else
2986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2987/* end confdefs.h.  */
2988/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2989   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2990#define $2 innocuous_$2
2991
2992/* System header to define __stub macros and hopefully few prototypes,
2993    which can conflict with char $2 (); below.
2994    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2995    <limits.h> exists even on freestanding compilers.  */
2996
2997#ifdef __STDC__
2998# include <limits.h>
2999#else
3000# include <assert.h>
3001#endif
3002
3003#undef $2
3004
3005/* Override any GCC internal prototype to avoid an error.
3006   Use char because int might match the return type of a GCC
3007   builtin and then its argument prototype would still apply.  */
3008#ifdef __cplusplus
3009extern "C"
3010#endif
3011char $2 ();
3012/* The GNU C library defines this for functions which it implements
3013    to always fail with ENOSYS.  Some functions are actually named
3014    something starting with __ and the normal name is an alias.  */
3015#if defined __stub_$2 || defined __stub___$2
3016choke me
3017#endif
3018
3019int
3020main ()
3021{
3022return $2 ();
3023  ;
3024  return 0;
3025}
3026_ACEOF
3027if ac_fn_cxx_try_link "$LINENO"; then :
3028  eval "$3=yes"
3029else
3030  eval "$3=no"
3031fi
3032rm -f core conftest.err conftest.$ac_objext \
3033    conftest$ac_exeext conftest.$ac_ext
3034fi
3035eval ac_res=\$$3
3036	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3037$as_echo "$ac_res" >&6; }
3038  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3039
3040} # ac_fn_cxx_check_func
3041
3042# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3043# -------------------------------------------------------
3044# Tests whether HEADER exists and can be compiled using the include files in
3045# INCLUDES, setting the cache variable VAR accordingly.
3046ac_fn_c_check_header_compile ()
3047{
3048  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3050$as_echo_n "checking for $2... " >&6; }
3051if eval \${$3+:} false; then :
3052  $as_echo_n "(cached) " >&6
3053else
3054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3055/* end confdefs.h.  */
3056$4
3057#include <$2>
3058_ACEOF
3059if ac_fn_c_try_compile "$LINENO"; then :
3060  eval "$3=yes"
3061else
3062  eval "$3=no"
3063fi
3064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3065fi
3066eval ac_res=\$$3
3067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3068$as_echo "$ac_res" >&6; }
3069  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3070
3071} # ac_fn_c_check_header_compile
3072cat >config.log <<_ACEOF
3073This file contains any messages produced by compilers while
3074running configure, to aid debugging if configure makes a mistake.
3075
3076It was created by OpenJDK $as_me jdk9, which was
3077generated by GNU Autoconf 2.69.  Invocation command line was
3078
3079  $ $0 $@
3080
3081_ACEOF
3082exec 5>>config.log
3083{
3084cat <<_ASUNAME
3085## --------- ##
3086## Platform. ##
3087## --------- ##
3088
3089hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3090uname -m = `(uname -m) 2>/dev/null || echo unknown`
3091uname -r = `(uname -r) 2>/dev/null || echo unknown`
3092uname -s = `(uname -s) 2>/dev/null || echo unknown`
3093uname -v = `(uname -v) 2>/dev/null || echo unknown`
3094
3095/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3096/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3097
3098/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3099/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3100/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3101/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3102/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3103/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3104/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3105
3106_ASUNAME
3107
3108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH
3110do
3111  IFS=$as_save_IFS
3112  test -z "$as_dir" && as_dir=.
3113    $as_echo "PATH: $as_dir"
3114  done
3115IFS=$as_save_IFS
3116
3117} >&5
3118
3119cat >&5 <<_ACEOF
3120
3121
3122## ----------- ##
3123## Core tests. ##
3124## ----------- ##
3125
3126_ACEOF
3127
3128
3129# Keep a trace of the command line.
3130# Strip out --no-create and --no-recursion so they do not pile up.
3131# Strip out --silent because we don't want to record it for future runs.
3132# Also quote any args containing shell meta-characters.
3133# Make two passes to allow for proper duplicate-argument suppression.
3134ac_configure_args=
3135ac_configure_args0=
3136ac_configure_args1=
3137ac_must_keep_next=false
3138for ac_pass in 1 2
3139do
3140  for ac_arg
3141  do
3142    case $ac_arg in
3143    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3144    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3145    | -silent | --silent | --silen | --sile | --sil)
3146      continue ;;
3147    *\'*)
3148      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3149    esac
3150    case $ac_pass in
3151    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3152    2)
3153      as_fn_append ac_configure_args1 " '$ac_arg'"
3154      if test $ac_must_keep_next = true; then
3155	ac_must_keep_next=false # Got value, back to normal.
3156      else
3157	case $ac_arg in
3158	  *=* | --config-cache | -C | -disable-* | --disable-* \
3159	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3160	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3161	  | -with-* | --with-* | -without-* | --without-* | --x)
3162	    case "$ac_configure_args0 " in
3163	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3164	    esac
3165	    ;;
3166	  -* ) ac_must_keep_next=true ;;
3167	esac
3168      fi
3169      as_fn_append ac_configure_args " '$ac_arg'"
3170      ;;
3171    esac
3172  done
3173done
3174{ ac_configure_args0=; unset ac_configure_args0;}
3175{ ac_configure_args1=; unset ac_configure_args1;}
3176
3177# When interrupted or exit'd, cleanup temporary files, and complete
3178# config.log.  We remove comments because anyway the quotes in there
3179# would cause problems or look ugly.
3180# WARNING: Use '\'' to represent an apostrophe within the trap.
3181# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3182trap 'exit_status=$?
3183  # Save into config.log some information that might help in debugging.
3184  {
3185    echo
3186
3187    $as_echo "## ---------------- ##
3188## Cache variables. ##
3189## ---------------- ##"
3190    echo
3191    # The following way of writing the cache mishandles newlines in values,
3192(
3193  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3194    eval ac_val=\$$ac_var
3195    case $ac_val in #(
3196    *${as_nl}*)
3197      case $ac_var in #(
3198      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3199$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3200      esac
3201      case $ac_var in #(
3202      _ | IFS | as_nl) ;; #(
3203      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3204      *) { eval $ac_var=; unset $ac_var;} ;;
3205      esac ;;
3206    esac
3207  done
3208  (set) 2>&1 |
3209    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3210    *${as_nl}ac_space=\ *)
3211      sed -n \
3212	"s/'\''/'\''\\\\'\'''\''/g;
3213	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3214      ;; #(
3215    *)
3216      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3217      ;;
3218    esac |
3219    sort
3220)
3221    echo
3222
3223    $as_echo "## ----------------- ##
3224## Output variables. ##
3225## ----------------- ##"
3226    echo
3227    for ac_var in $ac_subst_vars
3228    do
3229      eval ac_val=\$$ac_var
3230      case $ac_val in
3231      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3232      esac
3233      $as_echo "$ac_var='\''$ac_val'\''"
3234    done | sort
3235    echo
3236
3237    if test -n "$ac_subst_files"; then
3238      $as_echo "## ------------------- ##
3239## File substitutions. ##
3240## ------------------- ##"
3241      echo
3242      for ac_var in $ac_subst_files
3243      do
3244	eval ac_val=\$$ac_var
3245	case $ac_val in
3246	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3247	esac
3248	$as_echo "$ac_var='\''$ac_val'\''"
3249      done | sort
3250      echo
3251    fi
3252
3253    if test -s confdefs.h; then
3254      $as_echo "## ----------- ##
3255## confdefs.h. ##
3256## ----------- ##"
3257      echo
3258      cat confdefs.h
3259      echo
3260    fi
3261    test "$ac_signal" != 0 &&
3262      $as_echo "$as_me: caught signal $ac_signal"
3263    $as_echo "$as_me: exit $exit_status"
3264  } >&5
3265  rm -f core *.core core.conftest.* &&
3266    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3267    exit $exit_status
3268' 0
3269for ac_signal in 1 2 13 15; do
3270  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3271done
3272ac_signal=0
3273
3274# confdefs.h avoids OS command line length limits that DEFS can exceed.
3275rm -f -r conftest* confdefs.h
3276
3277$as_echo "/* confdefs.h */" > confdefs.h
3278
3279# Predefined preprocessor variables.
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_NAME "$PACKAGE_NAME"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_VERSION "$PACKAGE_VERSION"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_STRING "$PACKAGE_STRING"
3295_ACEOF
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_URL "$PACKAGE_URL"
3303_ACEOF
3304
3305
3306# Let the site file select an alternate cache file if it wants to.
3307# Prefer an explicitly selected file to automatically selected ones.
3308ac_site_file1=NONE
3309ac_site_file2=NONE
3310if test -n "$CONFIG_SITE"; then
3311  # We do not want a PATH search for config.site.
3312  case $CONFIG_SITE in #((
3313    -*)  ac_site_file1=./$CONFIG_SITE;;
3314    */*) ac_site_file1=$CONFIG_SITE;;
3315    *)   ac_site_file1=./$CONFIG_SITE;;
3316  esac
3317elif test "x$prefix" != xNONE; then
3318  ac_site_file1=$prefix/share/config.site
3319  ac_site_file2=$prefix/etc/config.site
3320else
3321  ac_site_file1=$ac_default_prefix/share/config.site
3322  ac_site_file2=$ac_default_prefix/etc/config.site
3323fi
3324for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3325do
3326  test "x$ac_site_file" = xNONE && continue
3327  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3328    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3329$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3330    sed 's/^/| /' "$ac_site_file" >&5
3331    . "$ac_site_file" \
3332      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3334as_fn_error $? "failed to load site script $ac_site_file
3335See \`config.log' for more details" "$LINENO" 5; }
3336  fi
3337done
3338
3339if test -r "$cache_file"; then
3340  # Some versions of bash will fail to source /dev/null (special files
3341  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3342  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3343    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3344$as_echo "$as_me: loading cache $cache_file" >&6;}
3345    case $cache_file in
3346      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3347      *)                      . "./$cache_file";;
3348    esac
3349  fi
3350else
3351  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3352$as_echo "$as_me: creating cache $cache_file" >&6;}
3353  >$cache_file
3354fi
3355
3356# Check that the precious variables saved in the cache have kept the same
3357# value.
3358ac_cache_corrupted=false
3359for ac_var in $ac_precious_vars; do
3360  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3361  eval ac_new_set=\$ac_env_${ac_var}_set
3362  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3363  eval ac_new_val=\$ac_env_${ac_var}_value
3364  case $ac_old_set,$ac_new_set in
3365    set,)
3366      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3367$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3368      ac_cache_corrupted=: ;;
3369    ,set)
3370      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3371$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3372      ac_cache_corrupted=: ;;
3373    ,);;
3374    *)
3375      if test "x$ac_old_val" != "x$ac_new_val"; then
3376	# differences in whitespace do not lead to failure.
3377	ac_old_val_w=`echo x $ac_old_val`
3378	ac_new_val_w=`echo x $ac_new_val`
3379	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3380	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3381$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3382	  ac_cache_corrupted=:
3383	else
3384	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3385$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3386	  eval $ac_var=\$ac_old_val
3387	fi
3388	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3389$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3390	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3391$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3392      fi;;
3393  esac
3394  # Pass precious variables to config.status.
3395  if test "$ac_new_set" = set; then
3396    case $ac_new_val in
3397    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3398    *) ac_arg=$ac_var=$ac_new_val ;;
3399    esac
3400    case " $ac_configure_args " in
3401      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3402      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3403    esac
3404  fi
3405done
3406if $ac_cache_corrupted; then
3407  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3409  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3410$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3411  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3412fi
3413## -------------------- ##
3414## Main body of script. ##
3415## -------------------- ##
3416
3417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
3422
3423
3424
3425ac_aux_dir=
3426for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3427  if test -f "$ac_dir/install-sh"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/install-sh -c"
3430    break
3431  elif test -f "$ac_dir/install.sh"; then
3432    ac_aux_dir=$ac_dir
3433    ac_install_sh="$ac_aux_dir/install.sh -c"
3434    break
3435  elif test -f "$ac_dir/shtool"; then
3436    ac_aux_dir=$ac_dir
3437    ac_install_sh="$ac_aux_dir/shtool install -c"
3438    break
3439  fi
3440done
3441if test -z "$ac_aux_dir"; then
3442  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
3443fi
3444
3445# These three variables are undocumented and unsupported,
3446# and are intended to be withdrawn in a future Autoconf release.
3447# They can cause serious problems if a builder's source tree is in a directory
3448# whose full name contains unusual characters.
3449ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3450ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3451ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3452
3453
3454# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3455
3456#
3457# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3458# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3459#
3460# This code is free software; you can redistribute it and/or modify it
3461# under the terms of the GNU General Public License version 2 only, as
3462# published by the Free Software Foundation.  Oracle designates this
3463# particular file as subject to the "Classpath" exception as provided
3464# by Oracle in the LICENSE file that accompanied this code.
3465#
3466# This code is distributed in the hope that it will be useful, but WITHOUT
3467# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3468# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3469# version 2 for more details (a copy is included in the LICENSE file that
3470# accompanied this code).
3471#
3472# You should have received a copy of the GNU General Public License version
3473# 2 along with this work; if not, write to the Free Software Foundation,
3474# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3475#
3476# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3477# or visit www.oracle.com if you need additional information or have any
3478# questions.
3479#
3480
3481#
3482# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3483#
3484# This program is free software; you can redistribute it and/or modify
3485# it under the terms of the GNU General Public License as published by
3486# the Free Software Foundation; either version 2 of the License, or
3487# (at your option) any later version.
3488#
3489# This program is distributed in the hope that it will be useful, but
3490# WITHOUT ANY WARRANTY; without even the implied warranty of
3491# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3492# General Public License for more details.
3493#
3494# You should have received a copy of the GNU General Public License
3495# along with this program; if not, write to the Free Software
3496# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3497#
3498# As a special exception to the GNU General Public License, if you
3499# distribute this file as part of a program that contains a
3500# configuration script generated by Autoconf, you may include it under
3501# the same distribution terms that you use for the rest of that program.
3502
3503# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3504# ----------------------------------
3505# PKG_PROG_PKG_CONFIG
3506
3507# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3508#
3509# Check to see whether a particular set of modules exists.  Similar
3510# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3511#
3512#
3513# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3514# this or PKG_CHECK_MODULES is called, or make sure to call
3515# PKG_CHECK_EXISTS manually
3516# --------------------------------------------------------------
3517
3518
3519
3520# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3521# ---------------------------------------------
3522# _PKG_CONFIG
3523
3524# _PKG_SHORT_ERRORS_SUPPORTED
3525# -----------------------------
3526# _PKG_SHORT_ERRORS_SUPPORTED
3527
3528
3529# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3530# [ACTION-IF-NOT-FOUND])
3531#
3532#
3533# Note that if there is a possibility the first call to
3534# PKG_CHECK_MODULES might not happen, you should be sure to include an
3535# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3536#
3537#
3538# --------------------------------------------------------------
3539# PKG_CHECK_MODULES
3540
3541
3542# Include these first...
3543#
3544# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568# Create a function/macro that takes a series of named arguments. The call is
3569# similar to AC_DEFUN, but the setup of the function looks like this:
3570# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3571# ... do something
3572#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3573# ])
3574# A star (*) in front of a named argument means that it is required and it's
3575# presence will be verified. To pass e.g. the first value as a normal indexed
3576# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3577# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3578# "ARG_FOO".
3579#
3580# The generated function can be called like this:
3581# MYFUNC(FOO: [foo-val],
3582#     BAR: [
3583#         $ECHO hello world
3584#     ])
3585# Note that the argument value must start on the same line as the argument name.
3586#
3587# Argument 1: Name of the function to define
3588# Argument 2: List of legal named arguments, with a * prefix for required arguments
3589# Argument 3: Argument array to treat as named, typically $@
3590# Argument 4: The main function body
3591
3592
3593# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3594# If so, then append $1 to $2 \
3595# Also set JVM_ARG_OK to true/false depending on outcome.
3596
3597
3598# Appends a string to a path variable, only adding the : when needed.
3599
3600
3601# Prepends a string to a path variable, only adding the : when needed.
3602
3603
3604# This will make sure the given variable points to a full and proper
3605# path. This means:
3606# 1) There will be no spaces in the path. On unix platforms,
3607#    spaces in the path will result in an error. On Windows,
3608#    the path will be rewritten using short-style to be space-free.
3609# 2) The path will be absolute, and it will be in unix-style (on
3610#     cygwin).
3611# $1: The name of the variable to fix
3612
3613
3614# This will make sure the given variable points to a executable
3615# with a full and proper path. This means:
3616# 1) There will be no spaces in the path. On unix platforms,
3617#    spaces in the path will result in an error. On Windows,
3618#    the path will be rewritten using short-style to be space-free.
3619# 2) The path will be absolute, and it will be in unix-style (on
3620#     cygwin).
3621# Any arguments given to the executable is preserved.
3622# If the input variable does not have a directory specification, then
3623# it need to be in the PATH.
3624# $1: The name of the variable to fix
3625
3626
3627
3628
3629# Register a --with argument but mark it as deprecated
3630# $1: The name of the with argument to deprecate, not including --with-
3631
3632
3633# Register a --enable argument but mark it as deprecated
3634# $1: The name of the with argument to deprecate, not including --enable-
3635# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3636# $3: Messages to user.
3637
3638
3639
3640
3641# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3642# $1: variable to check
3643
3644
3645# Check that there are no unprocessed overridden variables left.
3646# If so, they are an incorrect argument and we will exit with an error.
3647
3648
3649# Setup a tool for the given variable. If correctly specified by the user,
3650# use that value, otherwise search for the tool using the supplied code snippet.
3651# $1: variable to set
3652# $2: code snippet to call to look for the tool
3653# $3: code snippet to call if variable was used to find tool
3654
3655
3656# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3657# $1: variable to set
3658# $2: executable name (or list of names) to look for
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664
3665
3666# Like BASIC_PATH_PROGS but fails if no tool was found.
3667# $1: variable to set
3668# $2: executable name (or list of names) to look for
3669
3670
3671# Like BASIC_SETUP_TOOL but fails if no tool was found.
3672# $1: variable to set
3673# $2: autoconf macro to call to look for the special tool
3674
3675
3676# Setup the most fundamental tools that relies on not much else to set up,
3677# but is used by much of the early bootstrap code.
3678
3679
3680# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3681
3682
3683# Evaluates platform specific overrides for devkit variables.
3684# $1: Name of variable
3685
3686
3687
3688
3689
3690
3691#%%% Simple tools %%%
3692
3693# Check if we have found a usable version of make
3694# $1: the path to a potential make binary (or empty)
3695# $2: the description on how we found this
3696
3697
3698
3699
3700# Goes looking for a usable version of GNU make.
3701
3702
3703
3704
3705
3706
3707# Check if build directory is on local disk. If not possible to determine,
3708# we prefer to claim it's local.
3709# Argument 1: directory to test
3710# Argument 2: what to do if it is on local disk
3711# Argument 3: what to do otherwise (remote disk or failure)
3712
3713
3714# Check that source files have basic read permissions set. This might
3715# not be the case in cygwin in certain conditions.
3716
3717
3718
3719
3720# Check for support for specific options in bash
3721
3722
3723################################################################################
3724#
3725# Default make target
3726#
3727
3728
3729# Code to run after AC_OUTPUT
3730
3731
3732#
3733# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3734# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3735#
3736# This code is free software; you can redistribute it and/or modify it
3737# under the terms of the GNU General Public License version 2 only, as
3738# published by the Free Software Foundation.  Oracle designates this
3739# particular file as subject to the "Classpath" exception as provided
3740# by Oracle in the LICENSE file that accompanied this code.
3741#
3742# This code is distributed in the hope that it will be useful, but WITHOUT
3743# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3744# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3745# version 2 for more details (a copy is included in the LICENSE file that
3746# accompanied this code).
3747#
3748# You should have received a copy of the GNU General Public License version
3749# 2 along with this work; if not, write to the Free Software Foundation,
3750# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3751#
3752# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3753# or visit www.oracle.com if you need additional information or have any
3754# questions.
3755#
3756
3757
3758
3759
3760
3761# Helper function which possibly converts a path using DOS-style short mode.
3762# If so, the updated path is stored in $new_path.
3763# $1: The path to check
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3772# and could probably be heavily simplified. However, all changes in this
3773# area tend to need lot of testing in different scenarios, and in lack of
3774# proper unit testing, cleaning this up has not been deemed worth the effort
3775# at the moment.
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3786
3787
3788
3789
3790# ... then the rest
3791#
3792# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3793# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3794#
3795# This code is free software; you can redistribute it and/or modify it
3796# under the terms of the GNU General Public License version 2 only, as
3797# published by the Free Software Foundation.  Oracle designates this
3798# particular file as subject to the "Classpath" exception as provided
3799# by Oracle in the LICENSE file that accompanied this code.
3800#
3801# This code is distributed in the hope that it will be useful, but WITHOUT
3802# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3803# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3804# version 2 for more details (a copy is included in the LICENSE file that
3805# accompanied this code).
3806#
3807# You should have received a copy of the GNU General Public License version
3808# 2 along with this work; if not, write to the Free Software Foundation,
3809# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3810#
3811# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3812# or visit www.oracle.com if you need additional information or have any
3813# questions.
3814#
3815
3816########################################################################
3817# This file handles detection of the Boot JDK. The Boot JDK detection
3818# process has been developed as a response to solve a complex real-world
3819# problem. Initially, it was simple, but it has grown as platform after
3820# platform, idiosyncracy after idiosyncracy has been supported.
3821#
3822# The basic idea is this:
3823# 1) You need an acceptable *) JDK to use as a Boot JDK
3824# 2) There are several ways to locate a JDK, that are mostly platform
3825#    dependent **)
3826# 3) You can have multiple JDKs installed
3827# 4) If possible, configure should try to dig out an acceptable JDK
3828#    automatically, without having to resort to command-line options
3829#
3830# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3831#     javac) and not a JRE, etc.
3832#
3833# **) On Windows we typically use a well-known path.
3834#     On MacOSX we typically use the tool java_home.
3835#     On Linux we typically find javac in the $PATH, and then follow a
3836#     chain of symlinks that often ends up in a real JDK.
3837#
3838# This leads to the code where we check in different ways to locate a
3839# JDK, and if one is found, check if it is acceptable. If not, we print
3840# our reasons for rejecting it (useful when debugging non-working
3841# configure situations) and continue checking the next one.
3842########################################################################
3843
3844# Execute the check given as argument, and verify the result
3845# If the Boot JDK was previously found, do nothing
3846# $1 A command line (typically autoconf macro) to execute
3847
3848
3849# Test: Is bootjdk explicitely set by command line arguments?
3850
3851
3852# Test: Is $JAVA_HOME set?
3853
3854
3855# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3856
3857
3858# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3859# $1: Argument to the java_home binary (optional)
3860
3861
3862# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3863
3864
3865# Look for a jdk in the given path. If there are multiple, try to select the newest.
3866# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3867# $1 = Path to directory containing jdk installations.
3868# $2 = String to append to the found JDK directory to get the proper JDK home
3869
3870
3871# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3872# environmental variable as base for where to look.
3873# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3874
3875
3876# Test: Is there a JDK installed in default, well-known locations?
3877
3878
3879# Check that a command-line tool in the Boot JDK is correct
3880# $1 = name of variable to assign
3881# $2 = name of binary
3882
3883
3884###############################################################################
3885#
3886# We need a Boot JDK to bootstrap the build.
3887#
3888
3889
3890
3891
3892
3893# BUILD_JDK: the location of the latest JDK that can run
3894#   on the host system and supports the target class file version
3895#   generated in this JDK build.  This variable should only be
3896#   used after the launchers are built.
3897#
3898
3899# Execute the check given as argument, and verify the result.
3900# If the JDK was previously found, do nothing.
3901# $1 A command line (typically autoconf macro) to execute
3902
3903
3904# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3905# is different than the host system doing the build (e.g. cross-compilation),
3906# a special BUILD_JDK is built as part of the build process.  An external
3907# prebuilt BUILD_JDK can also be supplied.
3908
3909
3910#
3911# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3912# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3913#
3914# This code is free software; you can redistribute it and/or modify it
3915# under the terms of the GNU General Public License version 2 only, as
3916# published by the Free Software Foundation.  Oracle designates this
3917# particular file as subject to the "Classpath" exception as provided
3918# by Oracle in the LICENSE file that accompanied this code.
3919#
3920# This code is distributed in the hope that it will be useful, but WITHOUT
3921# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3922# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3923# version 2 for more details (a copy is included in the LICENSE file that
3924# accompanied this code).
3925#
3926# You should have received a copy of the GNU General Public License version
3927# 2 along with this work; if not, write to the Free Software Foundation,
3928# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3929#
3930# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3931# or visit www.oracle.com if you need additional information or have any
3932# questions.
3933#
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951################################################################################
3952#
3953# Runs icecc-create-env once and prints the error if it fails
3954#
3955# $1: arguments to icecc-create-env
3956# $2: log file
3957#
3958
3959
3960################################################################################
3961#
3962# Optionally enable distributed compilation of native code using icecc/icecream
3963#
3964
3965
3966
3967
3968
3969
3970
3971#
3972# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3973# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3974#
3975# This code is free software; you can redistribute it and/or modify it
3976# under the terms of the GNU General Public License version 2 only, as
3977# published by the Free Software Foundation.  Oracle designates this
3978# particular file as subject to the "Classpath" exception as provided
3979# by Oracle in the LICENSE file that accompanied this code.
3980#
3981# This code is distributed in the hope that it will be useful, but WITHOUT
3982# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3983# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3984# version 2 for more details (a copy is included in the LICENSE file that
3985# accompanied this code).
3986#
3987# You should have received a copy of the GNU General Public License version
3988# 2 along with this work; if not, write to the Free Software Foundation,
3989# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3990#
3991# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3992# or visit www.oracle.com if you need additional information or have any
3993# questions.
3994#
3995
3996# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3997# corresponding configure arguments instead
3998
3999
4000# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4001# that configure can use them while detecting compilers.
4002# TOOLCHAIN_TYPE is available here.
4003# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4004
4005
4006
4007
4008
4009
4010# Documentation on common flags used for solstudio in HIGHEST.
4011#
4012# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4013#          done with care, there are some assumptions below that need to
4014#          be understood about the use of pointers, and IEEE behavior.
4015#
4016# -fns: Use non-standard floating point mode (not IEEE 754)
4017# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4018# -fsingle: Use single precision floating point with 'float'
4019# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4020#   (Source with excessing pointer casting and data access with mixed
4021#    pointer types are not recommended)
4022# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4023#   (If you expect perfect errno behavior, do not use this)
4024# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4025# -xrestrict: Pointer parameters to functions do not overlap
4026#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4027#    If you pass in multiple pointers to the same data, do not use this)
4028# -xlibmil: Inline some library routines
4029#   (If you expect perfect errno behavior, do not use this)
4030# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4031#   (If you expect perfect errno behavior, do not use this)
4032#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4033
4034    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4035    # Bug?
4036    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4037    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4038    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4039    #fi
4040
4041
4042
4043
4044
4045
4046################################################################################
4047# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4048#      conditionals against.
4049# $2 - Optional prefix for each variable defined.
4050
4051
4052# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053#                                  IF_FALSE: [RUN-IF-FALSE])
4054# ------------------------------------------------------------
4055# Check that the C compiler supports an argument
4056
4057
4058
4059
4060# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061#                                    IF_FALSE: [RUN-IF-FALSE])
4062# ------------------------------------------------------------
4063# Check that the C++ compiler supports an argument
4064
4065
4066
4067
4068# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069#                                IF_FALSE: [RUN-IF-FALSE])
4070# ------------------------------------------------------------
4071# Check that the C and C++ compilers support an argument
4072
4073
4074
4075
4076# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4077#                                   IF_FALSE: [RUN-IF-FALSE])
4078# ------------------------------------------------------------
4079# Check that the linker support an argument
4080
4081
4082
4083
4084
4085
4086
4087
4088#
4089# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4090# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4091#
4092# This code is free software; you can redistribute it and/or modify it
4093# under the terms of the GNU General Public License version 2 only, as
4094# published by the Free Software Foundation.  Oracle designates this
4095# particular file as subject to the "Classpath" exception as provided
4096# by Oracle in the LICENSE file that accompanied this code.
4097#
4098# This code is distributed in the hope that it will be useful, but WITHOUT
4099# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4100# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4101# version 2 for more details (a copy is included in the LICENSE file that
4102# accompanied this code).
4103#
4104# You should have received a copy of the GNU General Public License version
4105# 2 along with this work; if not, write to the Free Software Foundation,
4106# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4107#
4108# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4109# or visit www.oracle.com if you need additional information or have any
4110# questions.
4111#
4112
4113
4114
4115
4116
4117cygwin_help() {
4118  case $1 in
4119    unzip)
4120      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4122      ;;
4123    zip)
4124      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4125      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4126      ;;
4127    make)
4128      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130      ;;
4131    freetype)
4132      HELP_MSG="
4133The freetype library can now be build during the configure process.
4134Download the freetype sources and unpack them into an arbitrary directory:
4135
4136wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4137tar -xzf freetype-2.5.3.tar.gz
4138
4139Then run configure with '--with-freetype-src=<freetype_src>'. This will
4140automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4141builds or into '<freetype_src>/lib32' for 32-bit builds.
4142Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4143and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4144
4145Alternatively you can unpack the sources like this to use the default directory:
4146
4147tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4148      ;;
4149  esac
4150}
4151
4152msys_help() {
4153  PKGHANDLER_COMMAND=""
4154}
4155
4156apt_help() {
4157  case $1 in
4158    reduced)
4159      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4160    devkit)
4161      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4162    openjdk)
4163      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4164    alsa)
4165      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4166    cups)
4167      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4168    freetype)
4169      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4170    ffi)
4171      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4172    x11)
4173      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4174    ccache)
4175      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4176    dtrace)
4177      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4178  esac
4179}
4180
4181yum_help() {
4182  case $1 in
4183    devkit)
4184      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4185    openjdk)
4186      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4187    alsa)
4188      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4189    cups)
4190      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4191    freetype)
4192      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4193    x11)
4194      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4195    ccache)
4196      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4197  esac
4198}
4199
4200port_help() {
4201  PKGHANDLER_COMMAND=""
4202}
4203
4204pkgutil_help() {
4205  PKGHANDLER_COMMAND=""
4206}
4207
4208pkgadd_help() {
4209  PKGHANDLER_COMMAND=""
4210}
4211
4212# This function will check if we're called from the "configure" wrapper while
4213# printing --help. If so, we will print out additional information that can
4214# only be extracted within the autoconf script, and then exit. This must be
4215# called at the very beginning in configure.ac.
4216
4217
4218
4219
4220
4221
4222#
4223# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4224# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4225#
4226# This code is free software; you can redistribute it and/or modify it
4227# under the terms of the GNU General Public License version 2 only, as
4228# published by the Free Software Foundation.  Oracle designates this
4229# particular file as subject to the "Classpath" exception as provided
4230# by Oracle in the LICENSE file that accompanied this code.
4231#
4232# This code is distributed in the hope that it will be useful, but WITHOUT
4233# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4234# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4235# version 2 for more details (a copy is included in the LICENSE file that
4236# accompanied this code).
4237#
4238# You should have received a copy of the GNU General Public License version
4239# 2 along with this work; if not, write to the Free Software Foundation,
4240# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4241#
4242# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4243# or visit www.oracle.com if you need additional information or have any
4244# questions.
4245#
4246
4247# All valid JVM features, regardless of platform
4248VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4249    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4250
4251# All valid JVM variants
4252VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4253
4254###############################################################################
4255# Check if the specified JVM variant should be built. To be used in shell if
4256# constructs, like this:
4257# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4258#
4259# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4260
4261# Definition kept in one line to allow inlining in if statements.
4262# Additional [] needed to keep m4 from mangling shell constructs.
4263
4264
4265###############################################################################
4266# Check if the specified JVM features are explicitly enabled. To be used in
4267# shell if constructs, like this:
4268# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4269#
4270# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4271
4272# Definition kept in one line to allow inlining in if statements.
4273# Additional [] needed to keep m4 from mangling shell constructs.
4274
4275
4276###############################################################################
4277# Check which variants of the JVM that we want to build. Available variants are:
4278#   server: normal interpreter, and a tiered C1/C2 compiler
4279#   client: normal interpreter, and C1 (no C2 compiler)
4280#   minimal: reduced form of client with optional features stripped out
4281#   core: normal interpreter only, no compiler
4282#   zero: C++ based interpreter only, no compiler
4283#   zeroshark: C++ based interpreter, and a llvm-based compiler
4284#   custom: baseline JVM with no default features
4285#
4286
4287
4288###############################################################################
4289# Check if dtrace should be enabled and has all prerequisites present.
4290#
4291
4292
4293###############################################################################
4294# Set up all JVM features for each JVM variant.
4295#
4296
4297
4298###############################################################################
4299# Validate JVM features once all setup is complete, including custom setup.
4300#
4301
4302
4303###############################################################################
4304# Support for old hotspot build. Remove once new hotspot build has proven
4305# to work satisfactory.
4306#
4307
4308
4309#
4310# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312#
4313# This code is free software; you can redistribute it and/or modify it
4314# under the terms of the GNU General Public License version 2 only, as
4315# published by the Free Software Foundation.  Oracle designates this
4316# particular file as subject to the "Classpath" exception as provided
4317# by Oracle in the LICENSE file that accompanied this code.
4318#
4319# This code is distributed in the hope that it will be useful, but WITHOUT
4320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322# version 2 for more details (a copy is included in the LICENSE file that
4323# accompanied this code).
4324#
4325# You should have received a copy of the GNU General Public License version
4326# 2 along with this work; if not, write to the Free Software Foundation,
4327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328#
4329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330# or visit www.oracle.com if you need additional information or have any
4331# questions.
4332#
4333
4334###############################################################################
4335# Check which variant of the JDK that we want to build.
4336# Currently we have:
4337#    normal:   standard edition
4338# but the custom make system may add other variants
4339#
4340# Effectively the JDK variant gives a name to a specific set of
4341# modules to compile into the JDK.
4342
4343
4344###############################################################################
4345# Set the debug level
4346#    release: no debug information, all optimizations, no asserts.
4347#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4348#    fastdebug: debug information (-g), all optimizations, all asserts
4349#    slowdebug: debug information (-g), no optimizations, all asserts
4350
4351
4352###############################################################################
4353#
4354# Should we build only OpenJDK even if closed sources are present?
4355#
4356
4357
4358
4359
4360###############################################################################
4361#
4362# Enable or disable the elliptic curve crypto implementation
4363#
4364
4365
4366
4367
4368################################################################################
4369#
4370# Gcov coverage data for hotspot
4371#
4372
4373
4374################################################################################
4375#
4376# Static build support.  When enabled will generate static
4377# libraries instead of shared libraries for all JDK libs.
4378#
4379
4380
4381################################################################################
4382#
4383# jlink options.
4384# We always keep packaged modules in JDK image.
4385#
4386
4387
4388################################################################################
4389#
4390# Check if building of the jtreg failure handler should be enabled.
4391#
4392
4393
4394#
4395# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4396# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4397#
4398# This code is free software; you can redistribute it and/or modify it
4399# under the terms of the GNU General Public License version 2 only, as
4400# published by the Free Software Foundation.  Oracle designates this
4401# particular file as subject to the "Classpath" exception as provided
4402# by Oracle in the LICENSE file that accompanied this code.
4403#
4404# This code is distributed in the hope that it will be useful, but WITHOUT
4405# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4406# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4407# version 2 for more details (a copy is included in the LICENSE file that
4408# accompanied this code).
4409#
4410# You should have received a copy of the GNU General Public License version
4411# 2 along with this work; if not, write to the Free Software Foundation,
4412# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4413#
4414# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4415# or visit www.oracle.com if you need additional information or have any
4416# questions.
4417#
4418
4419###############################################################################
4420#
4421# Setup version numbers
4422#
4423
4424# Verify that a given string represents a valid version number, and assign it
4425# to a variable.
4426
4427# Argument 1: the variable to assign to
4428# Argument 2: the value given by the user
4429
4430
4431
4432
4433#
4434# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4435# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4436#
4437# This code is free software; you can redistribute it and/or modify it
4438# under the terms of the GNU General Public License version 2 only, as
4439# published by the Free Software Foundation.  Oracle designates this
4440# particular file as subject to the "Classpath" exception as provided
4441# by Oracle in the LICENSE file that accompanied this code.
4442#
4443# This code is distributed in the hope that it will be useful, but WITHOUT
4444# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4445# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4446# version 2 for more details (a copy is included in the LICENSE file that
4447# accompanied this code).
4448#
4449# You should have received a copy of the GNU General Public License version
4450# 2 along with this work; if not, write to the Free Software Foundation,
4451# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4452#
4453# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4454# or visit www.oracle.com if you need additional information or have any
4455# questions.
4456#
4457
4458# Major library component reside in separate files.
4459#
4460# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4461# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4462#
4463# This code is free software; you can redistribute it and/or modify it
4464# under the terms of the GNU General Public License version 2 only, as
4465# published by the Free Software Foundation.  Oracle designates this
4466# particular file as subject to the "Classpath" exception as provided
4467# by Oracle in the LICENSE file that accompanied this code.
4468#
4469# This code is distributed in the hope that it will be useful, but WITHOUT
4470# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4471# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4472# version 2 for more details (a copy is included in the LICENSE file that
4473# accompanied this code).
4474#
4475# You should have received a copy of the GNU General Public License version
4476# 2 along with this work; if not, write to the Free Software Foundation,
4477# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4478#
4479# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4480# or visit www.oracle.com if you need additional information or have any
4481# questions.
4482#
4483
4484################################################################################
4485# Setup alsa (Advanced Linux Sound Architecture)
4486################################################################################
4487
4488
4489#
4490# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4491# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4492#
4493# This code is free software; you can redistribute it and/or modify it
4494# under the terms of the GNU General Public License version 2 only, as
4495# published by the Free Software Foundation.  Oracle designates this
4496# particular file as subject to the "Classpath" exception as provided
4497# by Oracle in the LICENSE file that accompanied this code.
4498#
4499# This code is distributed in the hope that it will be useful, but WITHOUT
4500# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4501# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4502# version 2 for more details (a copy is included in the LICENSE file that
4503# accompanied this code).
4504#
4505# You should have received a copy of the GNU General Public License version
4506# 2 along with this work; if not, write to the Free Software Foundation,
4507# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4508#
4509# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4510# or visit www.oracle.com if you need additional information or have any
4511# questions.
4512#
4513
4514################################################################################
4515# Setup bundled libraries.
4516#
4517# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4518# OpenJDK repository. Default is to use these libraries as bundled, but they
4519# might be replaced by en external version by the user.
4520################################################################################
4521
4522
4523################################################################################
4524# Setup libjpeg
4525################################################################################
4526
4527
4528################################################################################
4529# Setup giflib
4530################################################################################
4531
4532
4533################################################################################
4534# Setup libpng
4535################################################################################
4536
4537
4538################################################################################
4539# Setup zlib
4540################################################################################
4541
4542
4543################################################################################
4544# Setup lcms (Little CMS)
4545################################################################################
4546
4547
4548#
4549# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4551#
4552# This code is free software; you can redistribute it and/or modify it
4553# under the terms of the GNU General Public License version 2 only, as
4554# published by the Free Software Foundation.  Oracle designates this
4555# particular file as subject to the "Classpath" exception as provided
4556# by Oracle in the LICENSE file that accompanied this code.
4557#
4558# This code is distributed in the hope that it will be useful, but WITHOUT
4559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4561# version 2 for more details (a copy is included in the LICENSE file that
4562# accompanied this code).
4563#
4564# You should have received a copy of the GNU General Public License version
4565# 2 along with this work; if not, write to the Free Software Foundation,
4566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4567#
4568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4569# or visit www.oracle.com if you need additional information or have any
4570# questions.
4571#
4572
4573################################################################################
4574# Setup cups (Common Unix Printing System)
4575################################################################################
4576
4577
4578#
4579# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4581#
4582# This code is free software; you can redistribute it and/or modify it
4583# under the terms of the GNU General Public License version 2 only, as
4584# published by the Free Software Foundation.  Oracle designates this
4585# particular file as subject to the "Classpath" exception as provided
4586# by Oracle in the LICENSE file that accompanied this code.
4587#
4588# This code is distributed in the hope that it will be useful, but WITHOUT
4589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4591# version 2 for more details (a copy is included in the LICENSE file that
4592# accompanied this code).
4593#
4594# You should have received a copy of the GNU General Public License version
4595# 2 along with this work; if not, write to the Free Software Foundation,
4596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4597#
4598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4599# or visit www.oracle.com if you need additional information or have any
4600# questions.
4601#
4602
4603################################################################################
4604# Setup libffi (Foreign Function Interface)
4605################################################################################
4606
4607
4608#
4609# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4610# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4611#
4612# This code is free software; you can redistribute it and/or modify it
4613# under the terms of the GNU General Public License version 2 only, as
4614# published by the Free Software Foundation.  Oracle designates this
4615# particular file as subject to the "Classpath" exception as provided
4616# by Oracle in the LICENSE file that accompanied this code.
4617#
4618# This code is distributed in the hope that it will be useful, but WITHOUT
4619# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4620# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4621# version 2 for more details (a copy is included in the LICENSE file that
4622# accompanied this code).
4623#
4624# You should have received a copy of the GNU General Public License version
4625# 2 along with this work; if not, write to the Free Software Foundation,
4626# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4627#
4628# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4629# or visit www.oracle.com if you need additional information or have any
4630# questions.
4631#
4632
4633################################################################################
4634# Build the freetype lib from source
4635################################################################################
4636
4637
4638################################################################################
4639# Check if a potential freeype library match is correct and usable
4640################################################################################
4641
4642
4643################################################################################
4644# Setup freetype (The FreeType2 font rendering library)
4645################################################################################
4646
4647
4648#
4649# Copyright (c) 2011, 2016, 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 the standard C/C++ runtime libraries.
4675#
4676# Most importantly, determine if stdc++ should be linked statically or
4677# dynamically.
4678################################################################################
4679
4680
4681#
4682# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4683# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4684#
4685# This code is free software; you can redistribute it and/or modify it
4686# under the terms of the GNU General Public License version 2 only, as
4687# published by the Free Software Foundation.  Oracle designates this
4688# particular file as subject to the "Classpath" exception as provided
4689# by Oracle in the LICENSE file that accompanied this code.
4690#
4691# This code is distributed in the hope that it will be useful, but WITHOUT
4692# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4693# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4694# version 2 for more details (a copy is included in the LICENSE file that
4695# accompanied this code).
4696#
4697# You should have received a copy of the GNU General Public License version
4698# 2 along with this work; if not, write to the Free Software Foundation,
4699# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4700#
4701# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4702# or visit www.oracle.com if you need additional information or have any
4703# questions.
4704#
4705
4706################################################################################
4707# Setup X11 Windows system
4708################################################################################
4709
4710
4711
4712################################################################################
4713# Determine which libraries are needed for this configuration
4714################################################################################
4715
4716
4717################################################################################
4718# Parse library options, and setup needed libraries
4719################################################################################
4720
4721
4722################################################################################
4723# Setup llvm (Low-Level VM)
4724################################################################################
4725
4726
4727################################################################################
4728# Setup various libraries, typically small system libraries
4729################################################################################
4730
4731
4732#
4733# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4734# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4735#
4736# This code is free software; you can redistribute it and/or modify it
4737# under the terms of the GNU General Public License version 2 only, as
4738# published by the Free Software Foundation.  Oracle designates this
4739# particular file as subject to the "Classpath" exception as provided
4740# by Oracle in the LICENSE file that accompanied this code.
4741#
4742# This code is distributed in the hope that it will be useful, but WITHOUT
4743# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4744# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4745# version 2 for more details (a copy is included in the LICENSE file that
4746# accompanied this code).
4747#
4748# You should have received a copy of the GNU General Public License version
4749# 2 along with this work; if not, write to the Free Software Foundation,
4750# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4751#
4752# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4753# or visit www.oracle.com if you need additional information or have any
4754# questions.
4755#
4756
4757# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4758# Converts autoconf style CPU name to OpenJDK style, into
4759# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4760
4761
4762# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4763# Converts autoconf style OS name to OpenJDK style, into
4764# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4765
4766
4767# Expects $host_os $host_cpu $build_os and $build_cpu
4768# and $with_target_bits to have been setup!
4769#
4770# Translate the standard triplet(quadruplet) definition
4771# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4772# OPENJDK_BUILD_OS, etc.
4773
4774
4775# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4776# accordingly. Must be done after setting up build and target system, but before
4777# doing anything else with these values.
4778
4779
4780# Setup the legacy variables, for controlling the old makefiles.
4781#
4782
4783
4784# $1 - Either TARGET or BUILD to setup the variables for.
4785
4786
4787
4788
4789#%%% Build and target systems %%%
4790
4791
4792
4793
4794# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4795# Add -mX to various FLAGS variables.
4796
4797
4798
4799
4800
4801
4802#
4803# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4804# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4805#
4806# This code is free software; you can redistribute it and/or modify it
4807# under the terms of the GNU General Public License version 2 only, as
4808# published by the Free Software Foundation.  Oracle designates this
4809# particular file as subject to the "Classpath" exception as provided
4810# by Oracle in the LICENSE file that accompanied this code.
4811#
4812# This code is distributed in the hope that it will be useful, but WITHOUT
4813# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4814# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4815# version 2 for more details (a copy is included in the LICENSE file that
4816# accompanied this code).
4817#
4818# You should have received a copy of the GNU General Public License version
4819# 2 along with this work; if not, write to the Free Software Foundation,
4820# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4821#
4822# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4823# or visit www.oracle.com if you need additional information or have any
4824# questions.
4825#
4826
4827
4828
4829
4830
4831
4832
4833################################################################################
4834# Define a mechanism for importing extra prebuilt modules
4835#
4836
4837
4838
4839#
4840# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4841# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4842#
4843# This code is free software; you can redistribute it and/or modify it
4844# under the terms of the GNU General Public License version 2 only, as
4845# published by the Free Software Foundation.  Oracle designates this
4846# particular file as subject to the "Classpath" exception as provided
4847# by Oracle in the LICENSE file that accompanied this code.
4848#
4849# This code is distributed in the hope that it will be useful, but WITHOUT
4850# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4851# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4852# version 2 for more details (a copy is included in the LICENSE file that
4853# accompanied this code).
4854#
4855# You should have received a copy of the GNU General Public License version
4856# 2 along with this work; if not, write to the Free Software Foundation,
4857# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4858#
4859# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4860# or visit www.oracle.com if you need additional information or have any
4861# questions.
4862#
4863
4864########################################################################
4865# This file is responsible for detecting, verifying and setting up the
4866# toolchain, i.e. the compiler, linker and related utilities. It will setup
4867# proper paths to the binaries, but it will not setup any flags.
4868#
4869# The binaries used is determined by the toolchain type, which is the family of
4870# compilers and related tools that are used.
4871########################################################################
4872
4873
4874# All valid toolchains, regardless of platform (used by help.m4)
4875VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4876
4877# These toolchains are valid on different platforms
4878VALID_TOOLCHAINS_linux="gcc clang"
4879VALID_TOOLCHAINS_solaris="solstudio"
4880VALID_TOOLCHAINS_macosx="gcc clang"
4881VALID_TOOLCHAINS_aix="xlc"
4882VALID_TOOLCHAINS_windows="microsoft"
4883
4884# Toolchain descriptions
4885TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4886TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4887TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4888TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4889TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4890
4891# Minimum supported versions, empty means unspecified
4892TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4893TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4894TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4895TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4896TOOLCHAIN_MINIMUM_VERSION_xlc=""
4897
4898# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4899# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4900
4901
4902# Check if the configured compiler (C and C++) is of a specific version or
4903# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4904#
4905# Arguments:
4906#   VERSION:   The version string to check against the found version
4907#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4908#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4909
4910
4911
4912
4913# Setup a number of variables describing how native output files are
4914# named on this platform/toolchain.
4915
4916
4917# Determine which toolchain type to use, and make sure it is valid for this
4918# platform. Setup various information about the selected toolchain.
4919
4920
4921# Before we start detecting the toolchain executables, we might need some
4922# special setup, e.g. additional paths etc.
4923
4924
4925# Restore path, etc
4926
4927
4928# Check if a compiler is of the toolchain type we expect, and save the version
4929# information from it. If the compiler does not match the expected type,
4930# this function will abort using AC_MSG_ERROR. If it matches, the version will
4931# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4932# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4933#
4934# $1 = compiler to test (CC or CXX)
4935# $2 = human readable name of compiler (C or C++)
4936
4937
4938# Try to locate the given C or C++ compiler in the path, or otherwise.
4939#
4940# $1 = compiler to test (CC or CXX)
4941# $2 = human readable name of compiler (C or C++)
4942# $3 = list of compiler names to search for
4943
4944
4945# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4946# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4947# archiver (AR). Verify that the compilers are correct according to the
4948# toolchain type.
4949
4950
4951# Setup additional tools that is considered a part of the toolchain, but not the
4952# core part. Many of these are highly platform-specific and do not exist,
4953# and/or are not needed on all platforms.
4954
4955
4956# Setup the build tools (i.e, the compiler and linker used to build programs
4957# that should be run on the build platform, not the target platform, as a build
4958# helper). Since the non-cross-compile case uses the normal, target compilers
4959# for this, we can only do this after these have been setup.
4960
4961
4962# Setup legacy variables that are still needed as alternative ways to refer to
4963# parts of the toolchain.
4964
4965
4966# Do some additional checks on the detected tools.
4967
4968
4969# Setup the JTReg Regression Test Harness.
4970
4971
4972#
4973# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4974# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4975#
4976# This code is free software; you can redistribute it and/or modify it
4977# under the terms of the GNU General Public License version 2 only, as
4978# published by the Free Software Foundation.  Oracle designates this
4979# particular file as subject to the "Classpath" exception as provided
4980# by Oracle in the LICENSE file that accompanied this code.
4981#
4982# This code is distributed in the hope that it will be useful, but WITHOUT
4983# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4984# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4985# version 2 for more details (a copy is included in the LICENSE file that
4986# accompanied this code).
4987#
4988# You should have received a copy of the GNU General Public License version
4989# 2 along with this work; if not, write to the Free Software Foundation,
4990# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4991#
4992# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4993# or visit www.oracle.com if you need additional information or have any
4994# questions.
4995#
4996
4997################################################################################
4998# The order of these defines the priority by which we try to find them.
4999VALID_VS_VERSIONS="2013 2012 2010"
5000
5001VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5002VS_VERSION_INTERNAL_2010=100
5003VS_MSVCR_2010=msvcr100.dll
5004# We don't use msvcp on Visual Studio 2010
5005#VS_MSVCP_2010=msvcp100.dll
5006VS_ENVVAR_2010="VS100COMNTOOLS"
5007VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5008VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5009VS_VS_PLATFORM_NAME_2010="v100"
5010VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5011
5012VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5013VS_VERSION_INTERNAL_2012=110
5014VS_MSVCR_2012=msvcr110.dll
5015VS_MSVCP_2012=msvcp110.dll
5016VS_ENVVAR_2012="VS110COMNTOOLS"
5017VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5018VS_SDK_INSTALLDIR_2012=
5019VS_VS_PLATFORM_NAME_2012="v110"
5020VS_SDK_PLATFORM_NAME_2012=
5021
5022VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5023VS_VERSION_INTERNAL_2013=120
5024VS_MSVCR_2013=msvcr120.dll
5025VS_MSVCP_2013=msvcp120.dll
5026VS_ENVVAR_2013="VS120COMNTOOLS"
5027VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5028VS_SDK_INSTALLDIR_2013=
5029VS_VS_PLATFORM_NAME_2013="v120"
5030VS_SDK_PLATFORM_NAME_2013=
5031
5032################################################################################
5033
5034
5035
5036################################################################################
5037
5038
5039
5040################################################################################
5041# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5042# build environment and assigns it to VS_ENV_CMD
5043
5044
5045################################################################################
5046
5047
5048
5049################################################################################
5050# Check if the VS env variables were setup prior to running configure.
5051# If not, then find vcvarsall.bat and run it automatically, and integrate
5052# the set env variables into the spec file.
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067# This line needs to be here, verbatim, after all includes and the dummy hook
5068# definitions. It is replaced with custom functionality when building
5069# custom sources.
5070#CUSTOM_AUTOCONF_INCLUDE
5071
5072# Do not change or remove the following line, it is needed for consistency checks:
5073DATE_WHEN_GENERATED=1461064700
5074
5075###############################################################################
5076#
5077# Initialization / Boot-strapping
5078#
5079# The bootstrapping process needs to solve the "chicken or the egg" problem,
5080# thus it jumps back and forth, each time gaining something needed later on.
5081#
5082###############################################################################
5083
5084# If we are requested to print additional help, do that and then exit.
5085# This must be the very first call.
5086
5087  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5088
5089    # Print available toolchains
5090    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5091    $PRINTF "Which are valid to use depends on the build platform.\n"
5092    for toolchain in $VALID_TOOLCHAINS_all; do
5093      # Use indirect variable referencing
5094      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5095      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5096      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5097    done
5098    $PRINTF "\n"
5099
5100    # Print available jvm features
5101    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5102    $PRINTF "Which are valid to use depends on the target platform.\n  "
5103    $PRINTF "%s " $VALID_JVM_FEATURES
5104    $PRINTF "\n"
5105
5106    # And now exit directly
5107    exit 0
5108  fi
5109
5110
5111# Basic initialization that must happen first of all in the normal process.
5112
5113  # Save the original command line. This is passed to us by the wrapper configure script.
5114
5115  # Save the path variable before it gets changed
5116  ORIGINAL_PATH="$PATH"
5117
5118  DATE_WHEN_CONFIGURED=`LANG=C date`
5119
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5121$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5122  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5123$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5124
5125
5126  # Start with tools that do not need have cross compilation support
5127  # and can be expected to be found in the default PATH. These tools are
5128  # used by configure.
5129
5130  # First are all the simple required tools.
5131
5132
5133
5134  # Publish this variable in the help.
5135
5136
5137  if [ -z "${BASENAME+x}" ]; then
5138    # The variable is not set by user, try to locate tool using the code snippet
5139    for ac_prog in basename
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_BASENAME+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $BASENAME in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171BASENAME=$ac_cv_path_BASENAME
5172if test -n "$BASENAME"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5174$as_echo "$BASENAME" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$BASENAME" && break
5182done
5183
5184  else
5185    # The variable is set, but is it from the command line or the environment?
5186
5187    # Try to remove the string !BASENAME! from our list.
5188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5190      # If it failed, the variable was not from the command line. Ignore it,
5191      # but warn the user (except for BASH, which is always set by the calling BASH).
5192      if test "xBASENAME" != xBASH; then
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5194$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5195      fi
5196      # Try to locate tool using the code snippet
5197      for ac_prog in basename
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_BASENAME+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $BASENAME in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229BASENAME=$ac_cv_path_BASENAME
5230if test -n "$BASENAME"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5232$as_echo "$BASENAME" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$BASENAME" && break
5240done
5241
5242    else
5243      # If it succeeded, then it was overridden by the user. We will use it
5244      # for the tool.
5245
5246      # First remove it from the list of overridden variables, so we can test
5247      # for unknown variables in the end.
5248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5249
5250      # Check if we try to supply an empty value
5251      if test "x$BASENAME" = x; then
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5253$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5255$as_echo_n "checking for BASENAME... " >&6; }
5256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5257$as_echo "disabled" >&6; }
5258      else
5259        # Check if the provided tool contains a complete path.
5260        tool_specified="$BASENAME"
5261        tool_basename="${tool_specified##*/}"
5262        if test "x$tool_basename" = "x$tool_specified"; then
5263          # A command without a complete path is provided, search $PATH.
5264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5265$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5266          # Extract the first word of "$tool_basename", so it can be a program name with args.
5267set dummy $tool_basename; ac_word=$2
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5269$as_echo_n "checking for $ac_word... " >&6; }
5270if ${ac_cv_path_BASENAME+:} false; then :
5271  $as_echo_n "(cached) " >&6
5272else
5273  case $BASENAME in
5274  [\\/]* | ?:[\\/]*)
5275  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5276  ;;
5277  *)
5278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279for as_dir in $PATH
5280do
5281  IFS=$as_save_IFS
5282  test -z "$as_dir" && as_dir=.
5283    for ac_exec_ext in '' $ac_executable_extensions; do
5284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5285    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5287    break 2
5288  fi
5289done
5290  done
5291IFS=$as_save_IFS
5292
5293  ;;
5294esac
5295fi
5296BASENAME=$ac_cv_path_BASENAME
5297if test -n "$BASENAME"; then
5298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5299$as_echo "$BASENAME" >&6; }
5300else
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5302$as_echo "no" >&6; }
5303fi
5304
5305
5306          if test "x$BASENAME" = x; then
5307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5308          fi
5309        else
5310          # Otherwise we believe it is a complete path. Use it as it is.
5311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5312$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5314$as_echo_n "checking for BASENAME... " >&6; }
5315          if test ! -x "$tool_specified"; then
5316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5317$as_echo "not found" >&6; }
5318            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5319          fi
5320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5321$as_echo "$tool_specified" >&6; }
5322        fi
5323      fi
5324    fi
5325
5326  fi
5327
5328
5329
5330  if test "x$BASENAME" = x; then
5331    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5332  fi
5333
5334
5335
5336
5337
5338  # Publish this variable in the help.
5339
5340
5341  if [ -z "${BASH+x}" ]; then
5342    # The variable is not set by user, try to locate tool using the code snippet
5343    for ac_prog in bash
5344do
5345  # Extract the first word of "$ac_prog", so it can be a program name with args.
5346set dummy $ac_prog; ac_word=$2
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348$as_echo_n "checking for $ac_word... " >&6; }
5349if ${ac_cv_path_BASH+:} false; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352  case $BASH in
5353  [\\/]* | ?:[\\/]*)
5354  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5355  ;;
5356  *)
5357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in $PATH
5359do
5360  IFS=$as_save_IFS
5361  test -z "$as_dir" && as_dir=.
5362    for ac_exec_ext in '' $ac_executable_extensions; do
5363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366    break 2
5367  fi
5368done
5369  done
5370IFS=$as_save_IFS
5371
5372  ;;
5373esac
5374fi
5375BASH=$ac_cv_path_BASH
5376if test -n "$BASH"; then
5377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5378$as_echo "$BASH" >&6; }
5379else
5380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383
5384
5385  test -n "$BASH" && break
5386done
5387
5388  else
5389    # The variable is set, but is it from the command line or the environment?
5390
5391    # Try to remove the string !BASH! from our list.
5392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5394      # If it failed, the variable was not from the command line. Ignore it,
5395      # but warn the user (except for BASH, which is always set by the calling BASH).
5396      if test "xBASH" != xBASH; then
5397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5398$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5399      fi
5400      # Try to locate tool using the code snippet
5401      for ac_prog in bash
5402do
5403  # Extract the first word of "$ac_prog", so it can be a program name with args.
5404set dummy $ac_prog; ac_word=$2
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406$as_echo_n "checking for $ac_word... " >&6; }
5407if ${ac_cv_path_BASH+:} false; then :
5408  $as_echo_n "(cached) " >&6
5409else
5410  case $BASH in
5411  [\\/]* | ?:[\\/]*)
5412  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5413  ;;
5414  *)
5415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416for as_dir in $PATH
5417do
5418  IFS=$as_save_IFS
5419  test -z "$as_dir" && as_dir=.
5420    for ac_exec_ext in '' $ac_executable_extensions; do
5421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5422    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424    break 2
5425  fi
5426done
5427  done
5428IFS=$as_save_IFS
5429
5430  ;;
5431esac
5432fi
5433BASH=$ac_cv_path_BASH
5434if test -n "$BASH"; then
5435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5436$as_echo "$BASH" >&6; }
5437else
5438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
5440fi
5441
5442
5443  test -n "$BASH" && break
5444done
5445
5446    else
5447      # If it succeeded, then it was overridden by the user. We will use it
5448      # for the tool.
5449
5450      # First remove it from the list of overridden variables, so we can test
5451      # for unknown variables in the end.
5452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5453
5454      # Check if we try to supply an empty value
5455      if test "x$BASH" = x; then
5456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5457$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5459$as_echo_n "checking for BASH... " >&6; }
5460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5461$as_echo "disabled" >&6; }
5462      else
5463        # Check if the provided tool contains a complete path.
5464        tool_specified="$BASH"
5465        tool_basename="${tool_specified##*/}"
5466        if test "x$tool_basename" = "x$tool_specified"; then
5467          # A command without a complete path is provided, search $PATH.
5468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5469$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5470          # Extract the first word of "$tool_basename", so it can be a program name with args.
5471set dummy $tool_basename; ac_word=$2
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5473$as_echo_n "checking for $ac_word... " >&6; }
5474if ${ac_cv_path_BASH+:} false; then :
5475  $as_echo_n "(cached) " >&6
5476else
5477  case $BASH in
5478  [\\/]* | ?:[\\/]*)
5479  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5480  ;;
5481  *)
5482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485  IFS=$as_save_IFS
5486  test -z "$as_dir" && as_dir=.
5487    for ac_exec_ext in '' $ac_executable_extensions; do
5488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5489    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491    break 2
5492  fi
5493done
5494  done
5495IFS=$as_save_IFS
5496
5497  ;;
5498esac
5499fi
5500BASH=$ac_cv_path_BASH
5501if test -n "$BASH"; then
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5503$as_echo "$BASH" >&6; }
5504else
5505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506$as_echo "no" >&6; }
5507fi
5508
5509
5510          if test "x$BASH" = x; then
5511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5512          fi
5513        else
5514          # Otherwise we believe it is a complete path. Use it as it is.
5515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5516$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5518$as_echo_n "checking for BASH... " >&6; }
5519          if test ! -x "$tool_specified"; then
5520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5521$as_echo "not found" >&6; }
5522            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5523          fi
5524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5525$as_echo "$tool_specified" >&6; }
5526        fi
5527      fi
5528    fi
5529
5530  fi
5531
5532
5533
5534  if test "x$BASH" = x; then
5535    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5536  fi
5537
5538
5539
5540
5541
5542  # Publish this variable in the help.
5543
5544
5545  if [ -z "${CAT+x}" ]; then
5546    # The variable is not set by user, try to locate tool using the code snippet
5547    for ac_prog in cat
5548do
5549  # Extract the first word of "$ac_prog", so it can be a program name with args.
5550set dummy $ac_prog; ac_word=$2
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5552$as_echo_n "checking for $ac_word... " >&6; }
5553if ${ac_cv_path_CAT+:} false; then :
5554  $as_echo_n "(cached) " >&6
5555else
5556  case $CAT in
5557  [\\/]* | ?:[\\/]*)
5558  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5559  ;;
5560  *)
5561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562for as_dir in $PATH
5563do
5564  IFS=$as_save_IFS
5565  test -z "$as_dir" && as_dir=.
5566    for ac_exec_ext in '' $ac_executable_extensions; do
5567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5568    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570    break 2
5571  fi
5572done
5573  done
5574IFS=$as_save_IFS
5575
5576  ;;
5577esac
5578fi
5579CAT=$ac_cv_path_CAT
5580if test -n "$CAT"; then
5581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5582$as_echo "$CAT" >&6; }
5583else
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5585$as_echo "no" >&6; }
5586fi
5587
5588
5589  test -n "$CAT" && break
5590done
5591
5592  else
5593    # The variable is set, but is it from the command line or the environment?
5594
5595    # Try to remove the string !CAT! from our list.
5596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5598      # If it failed, the variable was not from the command line. Ignore it,
5599      # but warn the user (except for BASH, which is always set by the calling BASH).
5600      if test "xCAT" != xBASH; then
5601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5602$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5603      fi
5604      # Try to locate tool using the code snippet
5605      for ac_prog in cat
5606do
5607  # Extract the first word of "$ac_prog", so it can be a program name with args.
5608set dummy $ac_prog; ac_word=$2
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5610$as_echo_n "checking for $ac_word... " >&6; }
5611if ${ac_cv_path_CAT+:} false; then :
5612  $as_echo_n "(cached) " >&6
5613else
5614  case $CAT in
5615  [\\/]* | ?:[\\/]*)
5616  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5617  ;;
5618  *)
5619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5620for as_dir in $PATH
5621do
5622  IFS=$as_save_IFS
5623  test -z "$as_dir" && as_dir=.
5624    for ac_exec_ext in '' $ac_executable_extensions; do
5625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5626    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5628    break 2
5629  fi
5630done
5631  done
5632IFS=$as_save_IFS
5633
5634  ;;
5635esac
5636fi
5637CAT=$ac_cv_path_CAT
5638if test -n "$CAT"; then
5639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5640$as_echo "$CAT" >&6; }
5641else
5642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5643$as_echo "no" >&6; }
5644fi
5645
5646
5647  test -n "$CAT" && break
5648done
5649
5650    else
5651      # If it succeeded, then it was overridden by the user. We will use it
5652      # for the tool.
5653
5654      # First remove it from the list of overridden variables, so we can test
5655      # for unknown variables in the end.
5656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5657
5658      # Check if we try to supply an empty value
5659      if test "x$CAT" = x; then
5660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5661$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5663$as_echo_n "checking for CAT... " >&6; }
5664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5665$as_echo "disabled" >&6; }
5666      else
5667        # Check if the provided tool contains a complete path.
5668        tool_specified="$CAT"
5669        tool_basename="${tool_specified##*/}"
5670        if test "x$tool_basename" = "x$tool_specified"; then
5671          # A command without a complete path is provided, search $PATH.
5672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5673$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5674          # Extract the first word of "$tool_basename", so it can be a program name with args.
5675set dummy $tool_basename; ac_word=$2
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5677$as_echo_n "checking for $ac_word... " >&6; }
5678if ${ac_cv_path_CAT+:} false; then :
5679  $as_echo_n "(cached) " >&6
5680else
5681  case $CAT in
5682  [\\/]* | ?:[\\/]*)
5683  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5684  ;;
5685  *)
5686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5687for as_dir in $PATH
5688do
5689  IFS=$as_save_IFS
5690  test -z "$as_dir" && as_dir=.
5691    for ac_exec_ext in '' $ac_executable_extensions; do
5692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5693    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5695    break 2
5696  fi
5697done
5698  done
5699IFS=$as_save_IFS
5700
5701  ;;
5702esac
5703fi
5704CAT=$ac_cv_path_CAT
5705if test -n "$CAT"; then
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5707$as_echo "$CAT" >&6; }
5708else
5709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
5711fi
5712
5713
5714          if test "x$CAT" = x; then
5715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5716          fi
5717        else
5718          # Otherwise we believe it is a complete path. Use it as it is.
5719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5720$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5722$as_echo_n "checking for CAT... " >&6; }
5723          if test ! -x "$tool_specified"; then
5724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5725$as_echo "not found" >&6; }
5726            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5727          fi
5728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5729$as_echo "$tool_specified" >&6; }
5730        fi
5731      fi
5732    fi
5733
5734  fi
5735
5736
5737
5738  if test "x$CAT" = x; then
5739    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5740  fi
5741
5742
5743
5744
5745
5746  # Publish this variable in the help.
5747
5748
5749  if [ -z "${CHMOD+x}" ]; then
5750    # The variable is not set by user, try to locate tool using the code snippet
5751    for ac_prog in chmod
5752do
5753  # Extract the first word of "$ac_prog", so it can be a program name with args.
5754set dummy $ac_prog; ac_word=$2
5755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5756$as_echo_n "checking for $ac_word... " >&6; }
5757if ${ac_cv_path_CHMOD+:} false; then :
5758  $as_echo_n "(cached) " >&6
5759else
5760  case $CHMOD in
5761  [\\/]* | ?:[\\/]*)
5762  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5763  ;;
5764  *)
5765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766for as_dir in $PATH
5767do
5768  IFS=$as_save_IFS
5769  test -z "$as_dir" && as_dir=.
5770    for ac_exec_ext in '' $ac_executable_extensions; do
5771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5772    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5774    break 2
5775  fi
5776done
5777  done
5778IFS=$as_save_IFS
5779
5780  ;;
5781esac
5782fi
5783CHMOD=$ac_cv_path_CHMOD
5784if test -n "$CHMOD"; then
5785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5786$as_echo "$CHMOD" >&6; }
5787else
5788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5789$as_echo "no" >&6; }
5790fi
5791
5792
5793  test -n "$CHMOD" && break
5794done
5795
5796  else
5797    # The variable is set, but is it from the command line or the environment?
5798
5799    # Try to remove the string !CHMOD! from our list.
5800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5802      # If it failed, the variable was not from the command line. Ignore it,
5803      # but warn the user (except for BASH, which is always set by the calling BASH).
5804      if test "xCHMOD" != xBASH; then
5805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5806$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5807      fi
5808      # Try to locate tool using the code snippet
5809      for ac_prog in chmod
5810do
5811  # Extract the first word of "$ac_prog", so it can be a program name with args.
5812set dummy $ac_prog; ac_word=$2
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5814$as_echo_n "checking for $ac_word... " >&6; }
5815if ${ac_cv_path_CHMOD+:} false; then :
5816  $as_echo_n "(cached) " >&6
5817else
5818  case $CHMOD in
5819  [\\/]* | ?:[\\/]*)
5820  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5821  ;;
5822  *)
5823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5824for as_dir in $PATH
5825do
5826  IFS=$as_save_IFS
5827  test -z "$as_dir" && as_dir=.
5828    for ac_exec_ext in '' $ac_executable_extensions; do
5829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5830    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5832    break 2
5833  fi
5834done
5835  done
5836IFS=$as_save_IFS
5837
5838  ;;
5839esac
5840fi
5841CHMOD=$ac_cv_path_CHMOD
5842if test -n "$CHMOD"; then
5843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5844$as_echo "$CHMOD" >&6; }
5845else
5846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5847$as_echo "no" >&6; }
5848fi
5849
5850
5851  test -n "$CHMOD" && break
5852done
5853
5854    else
5855      # If it succeeded, then it was overridden by the user. We will use it
5856      # for the tool.
5857
5858      # First remove it from the list of overridden variables, so we can test
5859      # for unknown variables in the end.
5860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5861
5862      # Check if we try to supply an empty value
5863      if test "x$CHMOD" = x; then
5864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5865$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5867$as_echo_n "checking for CHMOD... " >&6; }
5868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5869$as_echo "disabled" >&6; }
5870      else
5871        # Check if the provided tool contains a complete path.
5872        tool_specified="$CHMOD"
5873        tool_basename="${tool_specified##*/}"
5874        if test "x$tool_basename" = "x$tool_specified"; then
5875          # A command without a complete path is provided, search $PATH.
5876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5877$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5878          # Extract the first word of "$tool_basename", so it can be a program name with args.
5879set dummy $tool_basename; ac_word=$2
5880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5881$as_echo_n "checking for $ac_word... " >&6; }
5882if ${ac_cv_path_CHMOD+:} false; then :
5883  $as_echo_n "(cached) " >&6
5884else
5885  case $CHMOD in
5886  [\\/]* | ?:[\\/]*)
5887  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5888  ;;
5889  *)
5890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5891for as_dir in $PATH
5892do
5893  IFS=$as_save_IFS
5894  test -z "$as_dir" && as_dir=.
5895    for ac_exec_ext in '' $ac_executable_extensions; do
5896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5897    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5899    break 2
5900  fi
5901done
5902  done
5903IFS=$as_save_IFS
5904
5905  ;;
5906esac
5907fi
5908CHMOD=$ac_cv_path_CHMOD
5909if test -n "$CHMOD"; then
5910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5911$as_echo "$CHMOD" >&6; }
5912else
5913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5914$as_echo "no" >&6; }
5915fi
5916
5917
5918          if test "x$CHMOD" = x; then
5919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5920          fi
5921        else
5922          # Otherwise we believe it is a complete path. Use it as it is.
5923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5924$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5926$as_echo_n "checking for CHMOD... " >&6; }
5927          if test ! -x "$tool_specified"; then
5928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5929$as_echo "not found" >&6; }
5930            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5931          fi
5932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5933$as_echo "$tool_specified" >&6; }
5934        fi
5935      fi
5936    fi
5937
5938  fi
5939
5940
5941
5942  if test "x$CHMOD" = x; then
5943    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5944  fi
5945
5946
5947
5948
5949
5950  # Publish this variable in the help.
5951
5952
5953  if [ -z "${CMP+x}" ]; then
5954    # The variable is not set by user, try to locate tool using the code snippet
5955    for ac_prog in cmp
5956do
5957  # Extract the first word of "$ac_prog", so it can be a program name with args.
5958set dummy $ac_prog; ac_word=$2
5959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5960$as_echo_n "checking for $ac_word... " >&6; }
5961if ${ac_cv_path_CMP+:} false; then :
5962  $as_echo_n "(cached) " >&6
5963else
5964  case $CMP in
5965  [\\/]* | ?:[\\/]*)
5966  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5967  ;;
5968  *)
5969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5970for as_dir in $PATH
5971do
5972  IFS=$as_save_IFS
5973  test -z "$as_dir" && as_dir=.
5974    for ac_exec_ext in '' $ac_executable_extensions; do
5975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5976    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5978    break 2
5979  fi
5980done
5981  done
5982IFS=$as_save_IFS
5983
5984  ;;
5985esac
5986fi
5987CMP=$ac_cv_path_CMP
5988if test -n "$CMP"; then
5989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5990$as_echo "$CMP" >&6; }
5991else
5992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5993$as_echo "no" >&6; }
5994fi
5995
5996
5997  test -n "$CMP" && break
5998done
5999
6000  else
6001    # The variable is set, but is it from the command line or the environment?
6002
6003    # Try to remove the string !CMP! from our list.
6004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6006      # If it failed, the variable was not from the command line. Ignore it,
6007      # but warn the user (except for BASH, which is always set by the calling BASH).
6008      if test "xCMP" != xBASH; then
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6010$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6011      fi
6012      # Try to locate tool using the code snippet
6013      for ac_prog in cmp
6014do
6015  # Extract the first word of "$ac_prog", so it can be a program name with args.
6016set dummy $ac_prog; ac_word=$2
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6018$as_echo_n "checking for $ac_word... " >&6; }
6019if ${ac_cv_path_CMP+:} false; then :
6020  $as_echo_n "(cached) " >&6
6021else
6022  case $CMP in
6023  [\\/]* | ?:[\\/]*)
6024  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6025  ;;
6026  *)
6027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030  IFS=$as_save_IFS
6031  test -z "$as_dir" && as_dir=.
6032    for ac_exec_ext in '' $ac_executable_extensions; do
6033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6034    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6036    break 2
6037  fi
6038done
6039  done
6040IFS=$as_save_IFS
6041
6042  ;;
6043esac
6044fi
6045CMP=$ac_cv_path_CMP
6046if test -n "$CMP"; then
6047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6048$as_echo "$CMP" >&6; }
6049else
6050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051$as_echo "no" >&6; }
6052fi
6053
6054
6055  test -n "$CMP" && break
6056done
6057
6058    else
6059      # If it succeeded, then it was overridden by the user. We will use it
6060      # for the tool.
6061
6062      # First remove it from the list of overridden variables, so we can test
6063      # for unknown variables in the end.
6064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6065
6066      # Check if we try to supply an empty value
6067      if test "x$CMP" = x; then
6068        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6069$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6071$as_echo_n "checking for CMP... " >&6; }
6072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6073$as_echo "disabled" >&6; }
6074      else
6075        # Check if the provided tool contains a complete path.
6076        tool_specified="$CMP"
6077        tool_basename="${tool_specified##*/}"
6078        if test "x$tool_basename" = "x$tool_specified"; then
6079          # A command without a complete path is provided, search $PATH.
6080          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6081$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6082          # Extract the first word of "$tool_basename", so it can be a program name with args.
6083set dummy $tool_basename; ac_word=$2
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6085$as_echo_n "checking for $ac_word... " >&6; }
6086if ${ac_cv_path_CMP+:} false; then :
6087  $as_echo_n "(cached) " >&6
6088else
6089  case $CMP in
6090  [\\/]* | ?:[\\/]*)
6091  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6092  ;;
6093  *)
6094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095for as_dir in $PATH
6096do
6097  IFS=$as_save_IFS
6098  test -z "$as_dir" && as_dir=.
6099    for ac_exec_ext in '' $ac_executable_extensions; do
6100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6101    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6103    break 2
6104  fi
6105done
6106  done
6107IFS=$as_save_IFS
6108
6109  ;;
6110esac
6111fi
6112CMP=$ac_cv_path_CMP
6113if test -n "$CMP"; then
6114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6115$as_echo "$CMP" >&6; }
6116else
6117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118$as_echo "no" >&6; }
6119fi
6120
6121
6122          if test "x$CMP" = x; then
6123            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6124          fi
6125        else
6126          # Otherwise we believe it is a complete path. Use it as it is.
6127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6128$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6129          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6130$as_echo_n "checking for CMP... " >&6; }
6131          if test ! -x "$tool_specified"; then
6132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6133$as_echo "not found" >&6; }
6134            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6135          fi
6136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6137$as_echo "$tool_specified" >&6; }
6138        fi
6139      fi
6140    fi
6141
6142  fi
6143
6144
6145
6146  if test "x$CMP" = x; then
6147    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6148  fi
6149
6150
6151
6152
6153
6154  # Publish this variable in the help.
6155
6156
6157  if [ -z "${COMM+x}" ]; then
6158    # The variable is not set by user, try to locate tool using the code snippet
6159    for ac_prog in comm
6160do
6161  # Extract the first word of "$ac_prog", so it can be a program name with args.
6162set dummy $ac_prog; ac_word=$2
6163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6164$as_echo_n "checking for $ac_word... " >&6; }
6165if ${ac_cv_path_COMM+:} false; then :
6166  $as_echo_n "(cached) " >&6
6167else
6168  case $COMM in
6169  [\\/]* | ?:[\\/]*)
6170  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6171  ;;
6172  *)
6173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176  IFS=$as_save_IFS
6177  test -z "$as_dir" && as_dir=.
6178    for ac_exec_ext in '' $ac_executable_extensions; do
6179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6180    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182    break 2
6183  fi
6184done
6185  done
6186IFS=$as_save_IFS
6187
6188  ;;
6189esac
6190fi
6191COMM=$ac_cv_path_COMM
6192if test -n "$COMM"; then
6193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6194$as_echo "$COMM" >&6; }
6195else
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197$as_echo "no" >&6; }
6198fi
6199
6200
6201  test -n "$COMM" && break
6202done
6203
6204  else
6205    # The variable is set, but is it from the command line or the environment?
6206
6207    # Try to remove the string !COMM! from our list.
6208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6210      # If it failed, the variable was not from the command line. Ignore it,
6211      # but warn the user (except for BASH, which is always set by the calling BASH).
6212      if test "xCOMM" != xBASH; then
6213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6214$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6215      fi
6216      # Try to locate tool using the code snippet
6217      for ac_prog in comm
6218do
6219  # Extract the first word of "$ac_prog", so it can be a program name with args.
6220set dummy $ac_prog; ac_word=$2
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6222$as_echo_n "checking for $ac_word... " >&6; }
6223if ${ac_cv_path_COMM+:} false; then :
6224  $as_echo_n "(cached) " >&6
6225else
6226  case $COMM in
6227  [\\/]* | ?:[\\/]*)
6228  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6229  ;;
6230  *)
6231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234  IFS=$as_save_IFS
6235  test -z "$as_dir" && as_dir=.
6236    for ac_exec_ext in '' $ac_executable_extensions; do
6237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6238    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240    break 2
6241  fi
6242done
6243  done
6244IFS=$as_save_IFS
6245
6246  ;;
6247esac
6248fi
6249COMM=$ac_cv_path_COMM
6250if test -n "$COMM"; then
6251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6252$as_echo "$COMM" >&6; }
6253else
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255$as_echo "no" >&6; }
6256fi
6257
6258
6259  test -n "$COMM" && break
6260done
6261
6262    else
6263      # If it succeeded, then it was overridden by the user. We will use it
6264      # for the tool.
6265
6266      # First remove it from the list of overridden variables, so we can test
6267      # for unknown variables in the end.
6268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6269
6270      # Check if we try to supply an empty value
6271      if test "x$COMM" = x; then
6272        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6273$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6275$as_echo_n "checking for COMM... " >&6; }
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6277$as_echo "disabled" >&6; }
6278      else
6279        # Check if the provided tool contains a complete path.
6280        tool_specified="$COMM"
6281        tool_basename="${tool_specified##*/}"
6282        if test "x$tool_basename" = "x$tool_specified"; then
6283          # A command without a complete path is provided, search $PATH.
6284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6285$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6286          # Extract the first word of "$tool_basename", so it can be a program name with args.
6287set dummy $tool_basename; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if ${ac_cv_path_COMM+:} false; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  case $COMM in
6294  [\\/]* | ?:[\\/]*)
6295  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6296  ;;
6297  *)
6298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301  IFS=$as_save_IFS
6302  test -z "$as_dir" && as_dir=.
6303    for ac_exec_ext in '' $ac_executable_extensions; do
6304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6305    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307    break 2
6308  fi
6309done
6310  done
6311IFS=$as_save_IFS
6312
6313  ;;
6314esac
6315fi
6316COMM=$ac_cv_path_COMM
6317if test -n "$COMM"; then
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6319$as_echo "$COMM" >&6; }
6320else
6321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322$as_echo "no" >&6; }
6323fi
6324
6325
6326          if test "x$COMM" = x; then
6327            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6328          fi
6329        else
6330          # Otherwise we believe it is a complete path. Use it as it is.
6331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6332$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6333          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6334$as_echo_n "checking for COMM... " >&6; }
6335          if test ! -x "$tool_specified"; then
6336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6337$as_echo "not found" >&6; }
6338            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6339          fi
6340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6341$as_echo "$tool_specified" >&6; }
6342        fi
6343      fi
6344    fi
6345
6346  fi
6347
6348
6349
6350  if test "x$COMM" = x; then
6351    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6352  fi
6353
6354
6355
6356
6357
6358  # Publish this variable in the help.
6359
6360
6361  if [ -z "${CP+x}" ]; then
6362    # The variable is not set by user, try to locate tool using the code snippet
6363    for ac_prog in cp
6364do
6365  # Extract the first word of "$ac_prog", so it can be a program name with args.
6366set dummy $ac_prog; ac_word=$2
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6368$as_echo_n "checking for $ac_word... " >&6; }
6369if ${ac_cv_path_CP+:} false; then :
6370  $as_echo_n "(cached) " >&6
6371else
6372  case $CP in
6373  [\\/]* | ?:[\\/]*)
6374  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6375  ;;
6376  *)
6377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378for as_dir in $PATH
6379do
6380  IFS=$as_save_IFS
6381  test -z "$as_dir" && as_dir=.
6382    for ac_exec_ext in '' $ac_executable_extensions; do
6383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6384    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6386    break 2
6387  fi
6388done
6389  done
6390IFS=$as_save_IFS
6391
6392  ;;
6393esac
6394fi
6395CP=$ac_cv_path_CP
6396if test -n "$CP"; then
6397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6398$as_echo "$CP" >&6; }
6399else
6400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401$as_echo "no" >&6; }
6402fi
6403
6404
6405  test -n "$CP" && break
6406done
6407
6408  else
6409    # The variable is set, but is it from the command line or the environment?
6410
6411    # Try to remove the string !CP! from our list.
6412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6414      # If it failed, the variable was not from the command line. Ignore it,
6415      # but warn the user (except for BASH, which is always set by the calling BASH).
6416      if test "xCP" != xBASH; then
6417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6418$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6419      fi
6420      # Try to locate tool using the code snippet
6421      for ac_prog in cp
6422do
6423  # Extract the first word of "$ac_prog", so it can be a program name with args.
6424set dummy $ac_prog; ac_word=$2
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426$as_echo_n "checking for $ac_word... " >&6; }
6427if ${ac_cv_path_CP+:} false; then :
6428  $as_echo_n "(cached) " >&6
6429else
6430  case $CP in
6431  [\\/]* | ?:[\\/]*)
6432  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6433  ;;
6434  *)
6435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436for as_dir in $PATH
6437do
6438  IFS=$as_save_IFS
6439  test -z "$as_dir" && as_dir=.
6440    for ac_exec_ext in '' $ac_executable_extensions; do
6441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6442    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6444    break 2
6445  fi
6446done
6447  done
6448IFS=$as_save_IFS
6449
6450  ;;
6451esac
6452fi
6453CP=$ac_cv_path_CP
6454if test -n "$CP"; then
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6456$as_echo "$CP" >&6; }
6457else
6458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }
6460fi
6461
6462
6463  test -n "$CP" && break
6464done
6465
6466    else
6467      # If it succeeded, then it was overridden by the user. We will use it
6468      # for the tool.
6469
6470      # First remove it from the list of overridden variables, so we can test
6471      # for unknown variables in the end.
6472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6473
6474      # Check if we try to supply an empty value
6475      if test "x$CP" = x; then
6476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6477$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6479$as_echo_n "checking for CP... " >&6; }
6480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6481$as_echo "disabled" >&6; }
6482      else
6483        # Check if the provided tool contains a complete path.
6484        tool_specified="$CP"
6485        tool_basename="${tool_specified##*/}"
6486        if test "x$tool_basename" = "x$tool_specified"; then
6487          # A command without a complete path is provided, search $PATH.
6488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6489$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6490          # Extract the first word of "$tool_basename", so it can be a program name with args.
6491set dummy $tool_basename; ac_word=$2
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493$as_echo_n "checking for $ac_word... " >&6; }
6494if ${ac_cv_path_CP+:} false; then :
6495  $as_echo_n "(cached) " >&6
6496else
6497  case $CP in
6498  [\\/]* | ?:[\\/]*)
6499  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6500  ;;
6501  *)
6502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503for as_dir in $PATH
6504do
6505  IFS=$as_save_IFS
6506  test -z "$as_dir" && as_dir=.
6507    for ac_exec_ext in '' $ac_executable_extensions; do
6508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511    break 2
6512  fi
6513done
6514  done
6515IFS=$as_save_IFS
6516
6517  ;;
6518esac
6519fi
6520CP=$ac_cv_path_CP
6521if test -n "$CP"; then
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6523$as_echo "$CP" >&6; }
6524else
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529
6530          if test "x$CP" = x; then
6531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6532          fi
6533        else
6534          # Otherwise we believe it is a complete path. Use it as it is.
6535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6536$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6538$as_echo_n "checking for CP... " >&6; }
6539          if test ! -x "$tool_specified"; then
6540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6541$as_echo "not found" >&6; }
6542            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6543          fi
6544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6545$as_echo "$tool_specified" >&6; }
6546        fi
6547      fi
6548    fi
6549
6550  fi
6551
6552
6553
6554  if test "x$CP" = x; then
6555    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6556  fi
6557
6558
6559
6560
6561
6562  # Publish this variable in the help.
6563
6564
6565  if [ -z "${CUT+x}" ]; then
6566    # The variable is not set by user, try to locate tool using the code snippet
6567    for ac_prog in cut
6568do
6569  # Extract the first word of "$ac_prog", so it can be a program name with args.
6570set dummy $ac_prog; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_CUT+:} false; then :
6574  $as_echo_n "(cached) " >&6
6575else
6576  case $CUT in
6577  [\\/]* | ?:[\\/]*)
6578  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6579  ;;
6580  *)
6581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584  IFS=$as_save_IFS
6585  test -z "$as_dir" && as_dir=.
6586    for ac_exec_ext in '' $ac_executable_extensions; do
6587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6588    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590    break 2
6591  fi
6592done
6593  done
6594IFS=$as_save_IFS
6595
6596  ;;
6597esac
6598fi
6599CUT=$ac_cv_path_CUT
6600if test -n "$CUT"; then
6601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6602$as_echo "$CUT" >&6; }
6603else
6604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
6606fi
6607
6608
6609  test -n "$CUT" && break
6610done
6611
6612  else
6613    # The variable is set, but is it from the command line or the environment?
6614
6615    # Try to remove the string !CUT! from our list.
6616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6618      # If it failed, the variable was not from the command line. Ignore it,
6619      # but warn the user (except for BASH, which is always set by the calling BASH).
6620      if test "xCUT" != xBASH; then
6621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6622$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6623      fi
6624      # Try to locate tool using the code snippet
6625      for ac_prog in cut
6626do
6627  # Extract the first word of "$ac_prog", so it can be a program name with args.
6628set dummy $ac_prog; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_CUT+:} false; then :
6632  $as_echo_n "(cached) " >&6
6633else
6634  case $CUT in
6635  [\\/]* | ?:[\\/]*)
6636  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6637  ;;
6638  *)
6639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in $PATH
6641do
6642  IFS=$as_save_IFS
6643  test -z "$as_dir" && as_dir=.
6644    for ac_exec_ext in '' $ac_executable_extensions; do
6645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6646    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648    break 2
6649  fi
6650done
6651  done
6652IFS=$as_save_IFS
6653
6654  ;;
6655esac
6656fi
6657CUT=$ac_cv_path_CUT
6658if test -n "$CUT"; then
6659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6660$as_echo "$CUT" >&6; }
6661else
6662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
6667  test -n "$CUT" && break
6668done
6669
6670    else
6671      # If it succeeded, then it was overridden by the user. We will use it
6672      # for the tool.
6673
6674      # First remove it from the list of overridden variables, so we can test
6675      # for unknown variables in the end.
6676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6677
6678      # Check if we try to supply an empty value
6679      if test "x$CUT" = x; then
6680        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6681$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6683$as_echo_n "checking for CUT... " >&6; }
6684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6685$as_echo "disabled" >&6; }
6686      else
6687        # Check if the provided tool contains a complete path.
6688        tool_specified="$CUT"
6689        tool_basename="${tool_specified##*/}"
6690        if test "x$tool_basename" = "x$tool_specified"; then
6691          # A command without a complete path is provided, search $PATH.
6692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6693$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6694          # Extract the first word of "$tool_basename", so it can be a program name with args.
6695set dummy $tool_basename; ac_word=$2
6696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6697$as_echo_n "checking for $ac_word... " >&6; }
6698if ${ac_cv_path_CUT+:} false; then :
6699  $as_echo_n "(cached) " >&6
6700else
6701  case $CUT in
6702  [\\/]* | ?:[\\/]*)
6703  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6704  ;;
6705  *)
6706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6707for as_dir in $PATH
6708do
6709  IFS=$as_save_IFS
6710  test -z "$as_dir" && as_dir=.
6711    for ac_exec_ext in '' $ac_executable_extensions; do
6712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6713    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6715    break 2
6716  fi
6717done
6718  done
6719IFS=$as_save_IFS
6720
6721  ;;
6722esac
6723fi
6724CUT=$ac_cv_path_CUT
6725if test -n "$CUT"; then
6726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6727$as_echo "$CUT" >&6; }
6728else
6729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6730$as_echo "no" >&6; }
6731fi
6732
6733
6734          if test "x$CUT" = x; then
6735            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6736          fi
6737        else
6738          # Otherwise we believe it is a complete path. Use it as it is.
6739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6740$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6741          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6742$as_echo_n "checking for CUT... " >&6; }
6743          if test ! -x "$tool_specified"; then
6744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6745$as_echo "not found" >&6; }
6746            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6747          fi
6748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6749$as_echo "$tool_specified" >&6; }
6750        fi
6751      fi
6752    fi
6753
6754  fi
6755
6756
6757
6758  if test "x$CUT" = x; then
6759    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6760  fi
6761
6762
6763
6764
6765
6766  # Publish this variable in the help.
6767
6768
6769  if [ -z "${DATE+x}" ]; then
6770    # The variable is not set by user, try to locate tool using the code snippet
6771    for ac_prog in date
6772do
6773  # Extract the first word of "$ac_prog", so it can be a program name with args.
6774set dummy $ac_prog; ac_word=$2
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6776$as_echo_n "checking for $ac_word... " >&6; }
6777if ${ac_cv_path_DATE+:} false; then :
6778  $as_echo_n "(cached) " >&6
6779else
6780  case $DATE in
6781  [\\/]* | ?:[\\/]*)
6782  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6783  ;;
6784  *)
6785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6786for as_dir in $PATH
6787do
6788  IFS=$as_save_IFS
6789  test -z "$as_dir" && as_dir=.
6790    for ac_exec_ext in '' $ac_executable_extensions; do
6791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6792    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6794    break 2
6795  fi
6796done
6797  done
6798IFS=$as_save_IFS
6799
6800  ;;
6801esac
6802fi
6803DATE=$ac_cv_path_DATE
6804if test -n "$DATE"; then
6805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6806$as_echo "$DATE" >&6; }
6807else
6808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809$as_echo "no" >&6; }
6810fi
6811
6812
6813  test -n "$DATE" && break
6814done
6815
6816  else
6817    # The variable is set, but is it from the command line or the environment?
6818
6819    # Try to remove the string !DATE! from our list.
6820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6822      # If it failed, the variable was not from the command line. Ignore it,
6823      # but warn the user (except for BASH, which is always set by the calling BASH).
6824      if test "xDATE" != xBASH; then
6825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6826$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6827      fi
6828      # Try to locate tool using the code snippet
6829      for ac_prog in date
6830do
6831  # Extract the first word of "$ac_prog", so it can be a program name with args.
6832set dummy $ac_prog; ac_word=$2
6833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6834$as_echo_n "checking for $ac_word... " >&6; }
6835if ${ac_cv_path_DATE+:} false; then :
6836  $as_echo_n "(cached) " >&6
6837else
6838  case $DATE in
6839  [\\/]* | ?:[\\/]*)
6840  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6841  ;;
6842  *)
6843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6844for as_dir in $PATH
6845do
6846  IFS=$as_save_IFS
6847  test -z "$as_dir" && as_dir=.
6848    for ac_exec_ext in '' $ac_executable_extensions; do
6849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6850    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6852    break 2
6853  fi
6854done
6855  done
6856IFS=$as_save_IFS
6857
6858  ;;
6859esac
6860fi
6861DATE=$ac_cv_path_DATE
6862if test -n "$DATE"; then
6863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6864$as_echo "$DATE" >&6; }
6865else
6866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6867$as_echo "no" >&6; }
6868fi
6869
6870
6871  test -n "$DATE" && break
6872done
6873
6874    else
6875      # If it succeeded, then it was overridden by the user. We will use it
6876      # for the tool.
6877
6878      # First remove it from the list of overridden variables, so we can test
6879      # for unknown variables in the end.
6880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6881
6882      # Check if we try to supply an empty value
6883      if test "x$DATE" = x; then
6884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6885$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6887$as_echo_n "checking for DATE... " >&6; }
6888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6889$as_echo "disabled" >&6; }
6890      else
6891        # Check if the provided tool contains a complete path.
6892        tool_specified="$DATE"
6893        tool_basename="${tool_specified##*/}"
6894        if test "x$tool_basename" = "x$tool_specified"; then
6895          # A command without a complete path is provided, search $PATH.
6896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6897$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6898          # Extract the first word of "$tool_basename", so it can be a program name with args.
6899set dummy $tool_basename; ac_word=$2
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6901$as_echo_n "checking for $ac_word... " >&6; }
6902if ${ac_cv_path_DATE+:} false; then :
6903  $as_echo_n "(cached) " >&6
6904else
6905  case $DATE in
6906  [\\/]* | ?:[\\/]*)
6907  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6908  ;;
6909  *)
6910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6911for as_dir in $PATH
6912do
6913  IFS=$as_save_IFS
6914  test -z "$as_dir" && as_dir=.
6915    for ac_exec_ext in '' $ac_executable_extensions; do
6916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6917    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6919    break 2
6920  fi
6921done
6922  done
6923IFS=$as_save_IFS
6924
6925  ;;
6926esac
6927fi
6928DATE=$ac_cv_path_DATE
6929if test -n "$DATE"; then
6930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6931$as_echo "$DATE" >&6; }
6932else
6933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6934$as_echo "no" >&6; }
6935fi
6936
6937
6938          if test "x$DATE" = x; then
6939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6940          fi
6941        else
6942          # Otherwise we believe it is a complete path. Use it as it is.
6943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6944$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6946$as_echo_n "checking for DATE... " >&6; }
6947          if test ! -x "$tool_specified"; then
6948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6949$as_echo "not found" >&6; }
6950            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6951          fi
6952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6953$as_echo "$tool_specified" >&6; }
6954        fi
6955      fi
6956    fi
6957
6958  fi
6959
6960
6961
6962  if test "x$DATE" = x; then
6963    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6964  fi
6965
6966
6967
6968
6969
6970  # Publish this variable in the help.
6971
6972
6973  if [ -z "${DIFF+x}" ]; then
6974    # The variable is not set by user, try to locate tool using the code snippet
6975    for ac_prog in gdiff diff
6976do
6977  # Extract the first word of "$ac_prog", so it can be a program name with args.
6978set dummy $ac_prog; ac_word=$2
6979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6980$as_echo_n "checking for $ac_word... " >&6; }
6981if ${ac_cv_path_DIFF+:} false; then :
6982  $as_echo_n "(cached) " >&6
6983else
6984  case $DIFF in
6985  [\\/]* | ?:[\\/]*)
6986  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6987  ;;
6988  *)
6989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6990for as_dir in $PATH
6991do
6992  IFS=$as_save_IFS
6993  test -z "$as_dir" && as_dir=.
6994    for ac_exec_ext in '' $ac_executable_extensions; do
6995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6996    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6998    break 2
6999  fi
7000done
7001  done
7002IFS=$as_save_IFS
7003
7004  ;;
7005esac
7006fi
7007DIFF=$ac_cv_path_DIFF
7008if test -n "$DIFF"; then
7009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7010$as_echo "$DIFF" >&6; }
7011else
7012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7013$as_echo "no" >&6; }
7014fi
7015
7016
7017  test -n "$DIFF" && break
7018done
7019
7020  else
7021    # The variable is set, but is it from the command line or the environment?
7022
7023    # Try to remove the string !DIFF! from our list.
7024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7026      # If it failed, the variable was not from the command line. Ignore it,
7027      # but warn the user (except for BASH, which is always set by the calling BASH).
7028      if test "xDIFF" != xBASH; then
7029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7030$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7031      fi
7032      # Try to locate tool using the code snippet
7033      for ac_prog in gdiff diff
7034do
7035  # Extract the first word of "$ac_prog", so it can be a program name with args.
7036set dummy $ac_prog; ac_word=$2
7037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7038$as_echo_n "checking for $ac_word... " >&6; }
7039if ${ac_cv_path_DIFF+:} false; then :
7040  $as_echo_n "(cached) " >&6
7041else
7042  case $DIFF in
7043  [\\/]* | ?:[\\/]*)
7044  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7045  ;;
7046  *)
7047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7048for as_dir in $PATH
7049do
7050  IFS=$as_save_IFS
7051  test -z "$as_dir" && as_dir=.
7052    for ac_exec_ext in '' $ac_executable_extensions; do
7053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7054    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7056    break 2
7057  fi
7058done
7059  done
7060IFS=$as_save_IFS
7061
7062  ;;
7063esac
7064fi
7065DIFF=$ac_cv_path_DIFF
7066if test -n "$DIFF"; then
7067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7068$as_echo "$DIFF" >&6; }
7069else
7070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7071$as_echo "no" >&6; }
7072fi
7073
7074
7075  test -n "$DIFF" && break
7076done
7077
7078    else
7079      # If it succeeded, then it was overridden by the user. We will use it
7080      # for the tool.
7081
7082      # First remove it from the list of overridden variables, so we can test
7083      # for unknown variables in the end.
7084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7085
7086      # Check if we try to supply an empty value
7087      if test "x$DIFF" = x; then
7088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7089$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7091$as_echo_n "checking for DIFF... " >&6; }
7092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7093$as_echo "disabled" >&6; }
7094      else
7095        # Check if the provided tool contains a complete path.
7096        tool_specified="$DIFF"
7097        tool_basename="${tool_specified##*/}"
7098        if test "x$tool_basename" = "x$tool_specified"; then
7099          # A command without a complete path is provided, search $PATH.
7100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7101$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7102          # Extract the first word of "$tool_basename", so it can be a program name with args.
7103set dummy $tool_basename; ac_word=$2
7104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7105$as_echo_n "checking for $ac_word... " >&6; }
7106if ${ac_cv_path_DIFF+:} false; then :
7107  $as_echo_n "(cached) " >&6
7108else
7109  case $DIFF in
7110  [\\/]* | ?:[\\/]*)
7111  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7112  ;;
7113  *)
7114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7115for as_dir in $PATH
7116do
7117  IFS=$as_save_IFS
7118  test -z "$as_dir" && as_dir=.
7119    for ac_exec_ext in '' $ac_executable_extensions; do
7120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7121    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7123    break 2
7124  fi
7125done
7126  done
7127IFS=$as_save_IFS
7128
7129  ;;
7130esac
7131fi
7132DIFF=$ac_cv_path_DIFF
7133if test -n "$DIFF"; then
7134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7135$as_echo "$DIFF" >&6; }
7136else
7137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7138$as_echo "no" >&6; }
7139fi
7140
7141
7142          if test "x$DIFF" = x; then
7143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7144          fi
7145        else
7146          # Otherwise we believe it is a complete path. Use it as it is.
7147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7148$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7150$as_echo_n "checking for DIFF... " >&6; }
7151          if test ! -x "$tool_specified"; then
7152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7153$as_echo "not found" >&6; }
7154            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7155          fi
7156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7157$as_echo "$tool_specified" >&6; }
7158        fi
7159      fi
7160    fi
7161
7162  fi
7163
7164
7165
7166  if test "x$DIFF" = x; then
7167    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7168  fi
7169
7170
7171
7172
7173
7174  # Publish this variable in the help.
7175
7176
7177  if [ -z "${DIRNAME+x}" ]; then
7178    # The variable is not set by user, try to locate tool using the code snippet
7179    for ac_prog in dirname
7180do
7181  # Extract the first word of "$ac_prog", so it can be a program name with args.
7182set dummy $ac_prog; ac_word=$2
7183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7184$as_echo_n "checking for $ac_word... " >&6; }
7185if ${ac_cv_path_DIRNAME+:} false; then :
7186  $as_echo_n "(cached) " >&6
7187else
7188  case $DIRNAME in
7189  [\\/]* | ?:[\\/]*)
7190  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7191  ;;
7192  *)
7193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7194for as_dir in $PATH
7195do
7196  IFS=$as_save_IFS
7197  test -z "$as_dir" && as_dir=.
7198    for ac_exec_ext in '' $ac_executable_extensions; do
7199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7200    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7202    break 2
7203  fi
7204done
7205  done
7206IFS=$as_save_IFS
7207
7208  ;;
7209esac
7210fi
7211DIRNAME=$ac_cv_path_DIRNAME
7212if test -n "$DIRNAME"; then
7213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7214$as_echo "$DIRNAME" >&6; }
7215else
7216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
7218fi
7219
7220
7221  test -n "$DIRNAME" && break
7222done
7223
7224  else
7225    # The variable is set, but is it from the command line or the environment?
7226
7227    # Try to remove the string !DIRNAME! from our list.
7228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7230      # If it failed, the variable was not from the command line. Ignore it,
7231      # but warn the user (except for BASH, which is always set by the calling BASH).
7232      if test "xDIRNAME" != xBASH; then
7233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7234$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7235      fi
7236      # Try to locate tool using the code snippet
7237      for ac_prog in dirname
7238do
7239  # Extract the first word of "$ac_prog", so it can be a program name with args.
7240set dummy $ac_prog; ac_word=$2
7241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7242$as_echo_n "checking for $ac_word... " >&6; }
7243if ${ac_cv_path_DIRNAME+:} false; then :
7244  $as_echo_n "(cached) " >&6
7245else
7246  case $DIRNAME in
7247  [\\/]* | ?:[\\/]*)
7248  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7249  ;;
7250  *)
7251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7252for as_dir in $PATH
7253do
7254  IFS=$as_save_IFS
7255  test -z "$as_dir" && as_dir=.
7256    for ac_exec_ext in '' $ac_executable_extensions; do
7257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7258    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7260    break 2
7261  fi
7262done
7263  done
7264IFS=$as_save_IFS
7265
7266  ;;
7267esac
7268fi
7269DIRNAME=$ac_cv_path_DIRNAME
7270if test -n "$DIRNAME"; then
7271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7272$as_echo "$DIRNAME" >&6; }
7273else
7274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7275$as_echo "no" >&6; }
7276fi
7277
7278
7279  test -n "$DIRNAME" && break
7280done
7281
7282    else
7283      # If it succeeded, then it was overridden by the user. We will use it
7284      # for the tool.
7285
7286      # First remove it from the list of overridden variables, so we can test
7287      # for unknown variables in the end.
7288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7289
7290      # Check if we try to supply an empty value
7291      if test "x$DIRNAME" = x; then
7292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7293$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7295$as_echo_n "checking for DIRNAME... " >&6; }
7296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7297$as_echo "disabled" >&6; }
7298      else
7299        # Check if the provided tool contains a complete path.
7300        tool_specified="$DIRNAME"
7301        tool_basename="${tool_specified##*/}"
7302        if test "x$tool_basename" = "x$tool_specified"; then
7303          # A command without a complete path is provided, search $PATH.
7304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7305$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7306          # Extract the first word of "$tool_basename", so it can be a program name with args.
7307set dummy $tool_basename; ac_word=$2
7308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7309$as_echo_n "checking for $ac_word... " >&6; }
7310if ${ac_cv_path_DIRNAME+:} false; then :
7311  $as_echo_n "(cached) " >&6
7312else
7313  case $DIRNAME in
7314  [\\/]* | ?:[\\/]*)
7315  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7316  ;;
7317  *)
7318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7319for as_dir in $PATH
7320do
7321  IFS=$as_save_IFS
7322  test -z "$as_dir" && as_dir=.
7323    for ac_exec_ext in '' $ac_executable_extensions; do
7324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7325    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7327    break 2
7328  fi
7329done
7330  done
7331IFS=$as_save_IFS
7332
7333  ;;
7334esac
7335fi
7336DIRNAME=$ac_cv_path_DIRNAME
7337if test -n "$DIRNAME"; then
7338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7339$as_echo "$DIRNAME" >&6; }
7340else
7341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7342$as_echo "no" >&6; }
7343fi
7344
7345
7346          if test "x$DIRNAME" = x; then
7347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7348          fi
7349        else
7350          # Otherwise we believe it is a complete path. Use it as it is.
7351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7352$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7354$as_echo_n "checking for DIRNAME... " >&6; }
7355          if test ! -x "$tool_specified"; then
7356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7357$as_echo "not found" >&6; }
7358            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7359          fi
7360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7361$as_echo "$tool_specified" >&6; }
7362        fi
7363      fi
7364    fi
7365
7366  fi
7367
7368
7369
7370  if test "x$DIRNAME" = x; then
7371    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7372  fi
7373
7374
7375
7376
7377
7378  # Publish this variable in the help.
7379
7380
7381  if [ -z "${ECHO+x}" ]; then
7382    # The variable is not set by user, try to locate tool using the code snippet
7383    for ac_prog in echo
7384do
7385  # Extract the first word of "$ac_prog", so it can be a program name with args.
7386set dummy $ac_prog; ac_word=$2
7387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7388$as_echo_n "checking for $ac_word... " >&6; }
7389if ${ac_cv_path_ECHO+:} false; then :
7390  $as_echo_n "(cached) " >&6
7391else
7392  case $ECHO in
7393  [\\/]* | ?:[\\/]*)
7394  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7395  ;;
7396  *)
7397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7398for as_dir in $PATH
7399do
7400  IFS=$as_save_IFS
7401  test -z "$as_dir" && as_dir=.
7402    for ac_exec_ext in '' $ac_executable_extensions; do
7403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7404    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7406    break 2
7407  fi
7408done
7409  done
7410IFS=$as_save_IFS
7411
7412  ;;
7413esac
7414fi
7415ECHO=$ac_cv_path_ECHO
7416if test -n "$ECHO"; then
7417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7418$as_echo "$ECHO" >&6; }
7419else
7420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421$as_echo "no" >&6; }
7422fi
7423
7424
7425  test -n "$ECHO" && break
7426done
7427
7428  else
7429    # The variable is set, but is it from the command line or the environment?
7430
7431    # Try to remove the string !ECHO! from our list.
7432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7434      # If it failed, the variable was not from the command line. Ignore it,
7435      # but warn the user (except for BASH, which is always set by the calling BASH).
7436      if test "xECHO" != xBASH; then
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7438$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7439      fi
7440      # Try to locate tool using the code snippet
7441      for ac_prog in echo
7442do
7443  # Extract the first word of "$ac_prog", so it can be a program name with args.
7444set dummy $ac_prog; ac_word=$2
7445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7446$as_echo_n "checking for $ac_word... " >&6; }
7447if ${ac_cv_path_ECHO+:} false; then :
7448  $as_echo_n "(cached) " >&6
7449else
7450  case $ECHO in
7451  [\\/]* | ?:[\\/]*)
7452  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7453  ;;
7454  *)
7455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7456for as_dir in $PATH
7457do
7458  IFS=$as_save_IFS
7459  test -z "$as_dir" && as_dir=.
7460    for ac_exec_ext in '' $ac_executable_extensions; do
7461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7462    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7464    break 2
7465  fi
7466done
7467  done
7468IFS=$as_save_IFS
7469
7470  ;;
7471esac
7472fi
7473ECHO=$ac_cv_path_ECHO
7474if test -n "$ECHO"; then
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7476$as_echo "$ECHO" >&6; }
7477else
7478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479$as_echo "no" >&6; }
7480fi
7481
7482
7483  test -n "$ECHO" && break
7484done
7485
7486    else
7487      # If it succeeded, then it was overridden by the user. We will use it
7488      # for the tool.
7489
7490      # First remove it from the list of overridden variables, so we can test
7491      # for unknown variables in the end.
7492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7493
7494      # Check if we try to supply an empty value
7495      if test "x$ECHO" = x; then
7496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7497$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7499$as_echo_n "checking for ECHO... " >&6; }
7500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7501$as_echo "disabled" >&6; }
7502      else
7503        # Check if the provided tool contains a complete path.
7504        tool_specified="$ECHO"
7505        tool_basename="${tool_specified##*/}"
7506        if test "x$tool_basename" = "x$tool_specified"; then
7507          # A command without a complete path is provided, search $PATH.
7508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7509$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7510          # Extract the first word of "$tool_basename", so it can be a program name with args.
7511set dummy $tool_basename; ac_word=$2
7512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7513$as_echo_n "checking for $ac_word... " >&6; }
7514if ${ac_cv_path_ECHO+:} false; then :
7515  $as_echo_n "(cached) " >&6
7516else
7517  case $ECHO in
7518  [\\/]* | ?:[\\/]*)
7519  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7520  ;;
7521  *)
7522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7523for as_dir in $PATH
7524do
7525  IFS=$as_save_IFS
7526  test -z "$as_dir" && as_dir=.
7527    for ac_exec_ext in '' $ac_executable_extensions; do
7528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7529    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7531    break 2
7532  fi
7533done
7534  done
7535IFS=$as_save_IFS
7536
7537  ;;
7538esac
7539fi
7540ECHO=$ac_cv_path_ECHO
7541if test -n "$ECHO"; then
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7543$as_echo "$ECHO" >&6; }
7544else
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546$as_echo "no" >&6; }
7547fi
7548
7549
7550          if test "x$ECHO" = x; then
7551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7552          fi
7553        else
7554          # Otherwise we believe it is a complete path. Use it as it is.
7555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7556$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7558$as_echo_n "checking for ECHO... " >&6; }
7559          if test ! -x "$tool_specified"; then
7560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7561$as_echo "not found" >&6; }
7562            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7563          fi
7564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7565$as_echo "$tool_specified" >&6; }
7566        fi
7567      fi
7568    fi
7569
7570  fi
7571
7572
7573
7574  if test "x$ECHO" = x; then
7575    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7576  fi
7577
7578
7579
7580
7581
7582  # Publish this variable in the help.
7583
7584
7585  if [ -z "${EXPR+x}" ]; then
7586    # The variable is not set by user, try to locate tool using the code snippet
7587    for ac_prog in expr
7588do
7589  # Extract the first word of "$ac_prog", so it can be a program name with args.
7590set dummy $ac_prog; ac_word=$2
7591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7592$as_echo_n "checking for $ac_word... " >&6; }
7593if ${ac_cv_path_EXPR+:} false; then :
7594  $as_echo_n "(cached) " >&6
7595else
7596  case $EXPR in
7597  [\\/]* | ?:[\\/]*)
7598  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7599  ;;
7600  *)
7601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7602for as_dir in $PATH
7603do
7604  IFS=$as_save_IFS
7605  test -z "$as_dir" && as_dir=.
7606    for ac_exec_ext in '' $ac_executable_extensions; do
7607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7608    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7610    break 2
7611  fi
7612done
7613  done
7614IFS=$as_save_IFS
7615
7616  ;;
7617esac
7618fi
7619EXPR=$ac_cv_path_EXPR
7620if test -n "$EXPR"; then
7621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7622$as_echo "$EXPR" >&6; }
7623else
7624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625$as_echo "no" >&6; }
7626fi
7627
7628
7629  test -n "$EXPR" && break
7630done
7631
7632  else
7633    # The variable is set, but is it from the command line or the environment?
7634
7635    # Try to remove the string !EXPR! from our list.
7636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7638      # If it failed, the variable was not from the command line. Ignore it,
7639      # but warn the user (except for BASH, which is always set by the calling BASH).
7640      if test "xEXPR" != xBASH; then
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7642$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7643      fi
7644      # Try to locate tool using the code snippet
7645      for ac_prog in expr
7646do
7647  # Extract the first word of "$ac_prog", so it can be a program name with args.
7648set dummy $ac_prog; ac_word=$2
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7650$as_echo_n "checking for $ac_word... " >&6; }
7651if ${ac_cv_path_EXPR+:} false; then :
7652  $as_echo_n "(cached) " >&6
7653else
7654  case $EXPR in
7655  [\\/]* | ?:[\\/]*)
7656  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7657  ;;
7658  *)
7659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7660for as_dir in $PATH
7661do
7662  IFS=$as_save_IFS
7663  test -z "$as_dir" && as_dir=.
7664    for ac_exec_ext in '' $ac_executable_extensions; do
7665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7666    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7668    break 2
7669  fi
7670done
7671  done
7672IFS=$as_save_IFS
7673
7674  ;;
7675esac
7676fi
7677EXPR=$ac_cv_path_EXPR
7678if test -n "$EXPR"; then
7679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7680$as_echo "$EXPR" >&6; }
7681else
7682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
7684fi
7685
7686
7687  test -n "$EXPR" && break
7688done
7689
7690    else
7691      # If it succeeded, then it was overridden by the user. We will use it
7692      # for the tool.
7693
7694      # First remove it from the list of overridden variables, so we can test
7695      # for unknown variables in the end.
7696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7697
7698      # Check if we try to supply an empty value
7699      if test "x$EXPR" = x; then
7700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7701$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7703$as_echo_n "checking for EXPR... " >&6; }
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7705$as_echo "disabled" >&6; }
7706      else
7707        # Check if the provided tool contains a complete path.
7708        tool_specified="$EXPR"
7709        tool_basename="${tool_specified##*/}"
7710        if test "x$tool_basename" = "x$tool_specified"; then
7711          # A command without a complete path is provided, search $PATH.
7712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7713$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7714          # Extract the first word of "$tool_basename", so it can be a program name with args.
7715set dummy $tool_basename; ac_word=$2
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7717$as_echo_n "checking for $ac_word... " >&6; }
7718if ${ac_cv_path_EXPR+:} false; then :
7719  $as_echo_n "(cached) " >&6
7720else
7721  case $EXPR in
7722  [\\/]* | ?:[\\/]*)
7723  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7724  ;;
7725  *)
7726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729  IFS=$as_save_IFS
7730  test -z "$as_dir" && as_dir=.
7731    for ac_exec_ext in '' $ac_executable_extensions; do
7732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735    break 2
7736  fi
7737done
7738  done
7739IFS=$as_save_IFS
7740
7741  ;;
7742esac
7743fi
7744EXPR=$ac_cv_path_EXPR
7745if test -n "$EXPR"; then
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7747$as_echo "$EXPR" >&6; }
7748else
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7750$as_echo "no" >&6; }
7751fi
7752
7753
7754          if test "x$EXPR" = x; then
7755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7756          fi
7757        else
7758          # Otherwise we believe it is a complete path. Use it as it is.
7759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7760$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7762$as_echo_n "checking for EXPR... " >&6; }
7763          if test ! -x "$tool_specified"; then
7764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7765$as_echo "not found" >&6; }
7766            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7767          fi
7768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7769$as_echo "$tool_specified" >&6; }
7770        fi
7771      fi
7772    fi
7773
7774  fi
7775
7776
7777
7778  if test "x$EXPR" = x; then
7779    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7780  fi
7781
7782
7783
7784
7785
7786  # Publish this variable in the help.
7787
7788
7789  if [ -z "${FILE+x}" ]; then
7790    # The variable is not set by user, try to locate tool using the code snippet
7791    for ac_prog in file
7792do
7793  # Extract the first word of "$ac_prog", so it can be a program name with args.
7794set dummy $ac_prog; ac_word=$2
7795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7796$as_echo_n "checking for $ac_word... " >&6; }
7797if ${ac_cv_path_FILE+:} false; then :
7798  $as_echo_n "(cached) " >&6
7799else
7800  case $FILE in
7801  [\\/]* | ?:[\\/]*)
7802  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7803  ;;
7804  *)
7805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7806for as_dir in $PATH
7807do
7808  IFS=$as_save_IFS
7809  test -z "$as_dir" && as_dir=.
7810    for ac_exec_ext in '' $ac_executable_extensions; do
7811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7812    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7814    break 2
7815  fi
7816done
7817  done
7818IFS=$as_save_IFS
7819
7820  ;;
7821esac
7822fi
7823FILE=$ac_cv_path_FILE
7824if test -n "$FILE"; then
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7826$as_echo "$FILE" >&6; }
7827else
7828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7829$as_echo "no" >&6; }
7830fi
7831
7832
7833  test -n "$FILE" && break
7834done
7835
7836  else
7837    # The variable is set, but is it from the command line or the environment?
7838
7839    # Try to remove the string !FILE! from our list.
7840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7842      # If it failed, the variable was not from the command line. Ignore it,
7843      # but warn the user (except for BASH, which is always set by the calling BASH).
7844      if test "xFILE" != xBASH; then
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7846$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7847      fi
7848      # Try to locate tool using the code snippet
7849      for ac_prog in file
7850do
7851  # Extract the first word of "$ac_prog", so it can be a program name with args.
7852set dummy $ac_prog; ac_word=$2
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7854$as_echo_n "checking for $ac_word... " >&6; }
7855if ${ac_cv_path_FILE+:} false; then :
7856  $as_echo_n "(cached) " >&6
7857else
7858  case $FILE in
7859  [\\/]* | ?:[\\/]*)
7860  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7861  ;;
7862  *)
7863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7864for as_dir in $PATH
7865do
7866  IFS=$as_save_IFS
7867  test -z "$as_dir" && as_dir=.
7868    for ac_exec_ext in '' $ac_executable_extensions; do
7869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7870    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7872    break 2
7873  fi
7874done
7875  done
7876IFS=$as_save_IFS
7877
7878  ;;
7879esac
7880fi
7881FILE=$ac_cv_path_FILE
7882if test -n "$FILE"; then
7883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7884$as_echo "$FILE" >&6; }
7885else
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7887$as_echo "no" >&6; }
7888fi
7889
7890
7891  test -n "$FILE" && break
7892done
7893
7894    else
7895      # If it succeeded, then it was overridden by the user. We will use it
7896      # for the tool.
7897
7898      # First remove it from the list of overridden variables, so we can test
7899      # for unknown variables in the end.
7900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7901
7902      # Check if we try to supply an empty value
7903      if test "x$FILE" = x; then
7904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7905$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7907$as_echo_n "checking for FILE... " >&6; }
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7909$as_echo "disabled" >&6; }
7910      else
7911        # Check if the provided tool contains a complete path.
7912        tool_specified="$FILE"
7913        tool_basename="${tool_specified##*/}"
7914        if test "x$tool_basename" = "x$tool_specified"; then
7915          # A command without a complete path is provided, search $PATH.
7916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7917$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7918          # Extract the first word of "$tool_basename", so it can be a program name with args.
7919set dummy $tool_basename; ac_word=$2
7920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7921$as_echo_n "checking for $ac_word... " >&6; }
7922if ${ac_cv_path_FILE+:} false; then :
7923  $as_echo_n "(cached) " >&6
7924else
7925  case $FILE in
7926  [\\/]* | ?:[\\/]*)
7927  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7928  ;;
7929  *)
7930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7931for as_dir in $PATH
7932do
7933  IFS=$as_save_IFS
7934  test -z "$as_dir" && as_dir=.
7935    for ac_exec_ext in '' $ac_executable_extensions; do
7936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7937    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7939    break 2
7940  fi
7941done
7942  done
7943IFS=$as_save_IFS
7944
7945  ;;
7946esac
7947fi
7948FILE=$ac_cv_path_FILE
7949if test -n "$FILE"; then
7950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7951$as_echo "$FILE" >&6; }
7952else
7953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7954$as_echo "no" >&6; }
7955fi
7956
7957
7958          if test "x$FILE" = x; then
7959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7960          fi
7961        else
7962          # Otherwise we believe it is a complete path. Use it as it is.
7963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7964$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7966$as_echo_n "checking for FILE... " >&6; }
7967          if test ! -x "$tool_specified"; then
7968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7969$as_echo "not found" >&6; }
7970            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7971          fi
7972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7973$as_echo "$tool_specified" >&6; }
7974        fi
7975      fi
7976    fi
7977
7978  fi
7979
7980
7981
7982  if test "x$FILE" = x; then
7983    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7984  fi
7985
7986
7987
7988
7989
7990  # Publish this variable in the help.
7991
7992
7993  if [ -z "${FIND+x}" ]; then
7994    # The variable is not set by user, try to locate tool using the code snippet
7995    for ac_prog in find
7996do
7997  # Extract the first word of "$ac_prog", so it can be a program name with args.
7998set dummy $ac_prog; ac_word=$2
7999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8000$as_echo_n "checking for $ac_word... " >&6; }
8001if ${ac_cv_path_FIND+:} false; then :
8002  $as_echo_n "(cached) " >&6
8003else
8004  case $FIND in
8005  [\\/]* | ?:[\\/]*)
8006  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8007  ;;
8008  *)
8009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8010for as_dir in $PATH
8011do
8012  IFS=$as_save_IFS
8013  test -z "$as_dir" && as_dir=.
8014    for ac_exec_ext in '' $ac_executable_extensions; do
8015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8016    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8018    break 2
8019  fi
8020done
8021  done
8022IFS=$as_save_IFS
8023
8024  ;;
8025esac
8026fi
8027FIND=$ac_cv_path_FIND
8028if test -n "$FIND"; then
8029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8030$as_echo "$FIND" >&6; }
8031else
8032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8033$as_echo "no" >&6; }
8034fi
8035
8036
8037  test -n "$FIND" && break
8038done
8039
8040  else
8041    # The variable is set, but is it from the command line or the environment?
8042
8043    # Try to remove the string !FIND! from our list.
8044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8046      # If it failed, the variable was not from the command line. Ignore it,
8047      # but warn the user (except for BASH, which is always set by the calling BASH).
8048      if test "xFIND" != xBASH; then
8049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8050$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8051      fi
8052      # Try to locate tool using the code snippet
8053      for ac_prog in find
8054do
8055  # Extract the first word of "$ac_prog", so it can be a program name with args.
8056set dummy $ac_prog; ac_word=$2
8057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
8059if ${ac_cv_path_FIND+:} false; then :
8060  $as_echo_n "(cached) " >&6
8061else
8062  case $FIND in
8063  [\\/]* | ?:[\\/]*)
8064  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8065  ;;
8066  *)
8067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070  IFS=$as_save_IFS
8071  test -z "$as_dir" && as_dir=.
8072    for ac_exec_ext in '' $ac_executable_extensions; do
8073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8074    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8076    break 2
8077  fi
8078done
8079  done
8080IFS=$as_save_IFS
8081
8082  ;;
8083esac
8084fi
8085FIND=$ac_cv_path_FIND
8086if test -n "$FIND"; then
8087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8088$as_echo "$FIND" >&6; }
8089else
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
8092fi
8093
8094
8095  test -n "$FIND" && break
8096done
8097
8098    else
8099      # If it succeeded, then it was overridden by the user. We will use it
8100      # for the tool.
8101
8102      # First remove it from the list of overridden variables, so we can test
8103      # for unknown variables in the end.
8104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8105
8106      # Check if we try to supply an empty value
8107      if test "x$FIND" = x; then
8108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8109$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8111$as_echo_n "checking for FIND... " >&6; }
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8113$as_echo "disabled" >&6; }
8114      else
8115        # Check if the provided tool contains a complete path.
8116        tool_specified="$FIND"
8117        tool_basename="${tool_specified##*/}"
8118        if test "x$tool_basename" = "x$tool_specified"; then
8119          # A command without a complete path is provided, search $PATH.
8120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8121$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8122          # Extract the first word of "$tool_basename", so it can be a program name with args.
8123set dummy $tool_basename; ac_word=$2
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8125$as_echo_n "checking for $ac_word... " >&6; }
8126if ${ac_cv_path_FIND+:} false; then :
8127  $as_echo_n "(cached) " >&6
8128else
8129  case $FIND in
8130  [\\/]* | ?:[\\/]*)
8131  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8132  ;;
8133  *)
8134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8135for as_dir in $PATH
8136do
8137  IFS=$as_save_IFS
8138  test -z "$as_dir" && as_dir=.
8139    for ac_exec_ext in '' $ac_executable_extensions; do
8140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8141    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8143    break 2
8144  fi
8145done
8146  done
8147IFS=$as_save_IFS
8148
8149  ;;
8150esac
8151fi
8152FIND=$ac_cv_path_FIND
8153if test -n "$FIND"; then
8154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8155$as_echo "$FIND" >&6; }
8156else
8157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8158$as_echo "no" >&6; }
8159fi
8160
8161
8162          if test "x$FIND" = x; then
8163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8164          fi
8165        else
8166          # Otherwise we believe it is a complete path. Use it as it is.
8167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8168$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8170$as_echo_n "checking for FIND... " >&6; }
8171          if test ! -x "$tool_specified"; then
8172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8173$as_echo "not found" >&6; }
8174            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8175          fi
8176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8177$as_echo "$tool_specified" >&6; }
8178        fi
8179      fi
8180    fi
8181
8182  fi
8183
8184
8185
8186  if test "x$FIND" = x; then
8187    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8188  fi
8189
8190
8191
8192
8193
8194  # Publish this variable in the help.
8195
8196
8197  if [ -z "${HEAD+x}" ]; then
8198    # The variable is not set by user, try to locate tool using the code snippet
8199    for ac_prog in head
8200do
8201  # Extract the first word of "$ac_prog", so it can be a program name with args.
8202set dummy $ac_prog; ac_word=$2
8203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8204$as_echo_n "checking for $ac_word... " >&6; }
8205if ${ac_cv_path_HEAD+:} false; then :
8206  $as_echo_n "(cached) " >&6
8207else
8208  case $HEAD in
8209  [\\/]* | ?:[\\/]*)
8210  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8211  ;;
8212  *)
8213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8214for as_dir in $PATH
8215do
8216  IFS=$as_save_IFS
8217  test -z "$as_dir" && as_dir=.
8218    for ac_exec_ext in '' $ac_executable_extensions; do
8219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8220    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8222    break 2
8223  fi
8224done
8225  done
8226IFS=$as_save_IFS
8227
8228  ;;
8229esac
8230fi
8231HEAD=$ac_cv_path_HEAD
8232if test -n "$HEAD"; then
8233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8234$as_echo "$HEAD" >&6; }
8235else
8236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
8238fi
8239
8240
8241  test -n "$HEAD" && break
8242done
8243
8244  else
8245    # The variable is set, but is it from the command line or the environment?
8246
8247    # Try to remove the string !HEAD! from our list.
8248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8250      # If it failed, the variable was not from the command line. Ignore it,
8251      # but warn the user (except for BASH, which is always set by the calling BASH).
8252      if test "xHEAD" != xBASH; then
8253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8254$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8255      fi
8256      # Try to locate tool using the code snippet
8257      for ac_prog in head
8258do
8259  # Extract the first word of "$ac_prog", so it can be a program name with args.
8260set dummy $ac_prog; ac_word=$2
8261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8262$as_echo_n "checking for $ac_word... " >&6; }
8263if ${ac_cv_path_HEAD+:} false; then :
8264  $as_echo_n "(cached) " >&6
8265else
8266  case $HEAD in
8267  [\\/]* | ?:[\\/]*)
8268  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8269  ;;
8270  *)
8271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8272for as_dir in $PATH
8273do
8274  IFS=$as_save_IFS
8275  test -z "$as_dir" && as_dir=.
8276    for ac_exec_ext in '' $ac_executable_extensions; do
8277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8278    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8280    break 2
8281  fi
8282done
8283  done
8284IFS=$as_save_IFS
8285
8286  ;;
8287esac
8288fi
8289HEAD=$ac_cv_path_HEAD
8290if test -n "$HEAD"; then
8291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8292$as_echo "$HEAD" >&6; }
8293else
8294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8295$as_echo "no" >&6; }
8296fi
8297
8298
8299  test -n "$HEAD" && break
8300done
8301
8302    else
8303      # If it succeeded, then it was overridden by the user. We will use it
8304      # for the tool.
8305
8306      # First remove it from the list of overridden variables, so we can test
8307      # for unknown variables in the end.
8308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8309
8310      # Check if we try to supply an empty value
8311      if test "x$HEAD" = x; then
8312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8313$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8315$as_echo_n "checking for HEAD... " >&6; }
8316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8317$as_echo "disabled" >&6; }
8318      else
8319        # Check if the provided tool contains a complete path.
8320        tool_specified="$HEAD"
8321        tool_basename="${tool_specified##*/}"
8322        if test "x$tool_basename" = "x$tool_specified"; then
8323          # A command without a complete path is provided, search $PATH.
8324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8325$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8326          # Extract the first word of "$tool_basename", so it can be a program name with args.
8327set dummy $tool_basename; ac_word=$2
8328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8329$as_echo_n "checking for $ac_word... " >&6; }
8330if ${ac_cv_path_HEAD+:} false; then :
8331  $as_echo_n "(cached) " >&6
8332else
8333  case $HEAD in
8334  [\\/]* | ?:[\\/]*)
8335  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8336  ;;
8337  *)
8338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8339for as_dir in $PATH
8340do
8341  IFS=$as_save_IFS
8342  test -z "$as_dir" && as_dir=.
8343    for ac_exec_ext in '' $ac_executable_extensions; do
8344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8345    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8347    break 2
8348  fi
8349done
8350  done
8351IFS=$as_save_IFS
8352
8353  ;;
8354esac
8355fi
8356HEAD=$ac_cv_path_HEAD
8357if test -n "$HEAD"; then
8358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8359$as_echo "$HEAD" >&6; }
8360else
8361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8362$as_echo "no" >&6; }
8363fi
8364
8365
8366          if test "x$HEAD" = x; then
8367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8368          fi
8369        else
8370          # Otherwise we believe it is a complete path. Use it as it is.
8371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8372$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8374$as_echo_n "checking for HEAD... " >&6; }
8375          if test ! -x "$tool_specified"; then
8376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8377$as_echo "not found" >&6; }
8378            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8379          fi
8380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8381$as_echo "$tool_specified" >&6; }
8382        fi
8383      fi
8384    fi
8385
8386  fi
8387
8388
8389
8390  if test "x$HEAD" = x; then
8391    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8392  fi
8393
8394
8395
8396
8397
8398  # Publish this variable in the help.
8399
8400
8401  if [ -z "${LN+x}" ]; then
8402    # The variable is not set by user, try to locate tool using the code snippet
8403    for ac_prog in ln
8404do
8405  # Extract the first word of "$ac_prog", so it can be a program name with args.
8406set dummy $ac_prog; ac_word=$2
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
8409if ${ac_cv_path_LN+:} false; then :
8410  $as_echo_n "(cached) " >&6
8411else
8412  case $LN in
8413  [\\/]* | ?:[\\/]*)
8414  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8415  ;;
8416  *)
8417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420  IFS=$as_save_IFS
8421  test -z "$as_dir" && as_dir=.
8422    for ac_exec_ext in '' $ac_executable_extensions; do
8423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8424    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8426    break 2
8427  fi
8428done
8429  done
8430IFS=$as_save_IFS
8431
8432  ;;
8433esac
8434fi
8435LN=$ac_cv_path_LN
8436if test -n "$LN"; then
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8438$as_echo "$LN" >&6; }
8439else
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
8442fi
8443
8444
8445  test -n "$LN" && break
8446done
8447
8448  else
8449    # The variable is set, but is it from the command line or the environment?
8450
8451    # Try to remove the string !LN! from our list.
8452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8454      # If it failed, the variable was not from the command line. Ignore it,
8455      # but warn the user (except for BASH, which is always set by the calling BASH).
8456      if test "xLN" != xBASH; then
8457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8458$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8459      fi
8460      # Try to locate tool using the code snippet
8461      for ac_prog in ln
8462do
8463  # Extract the first word of "$ac_prog", so it can be a program name with args.
8464set dummy $ac_prog; ac_word=$2
8465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8466$as_echo_n "checking for $ac_word... " >&6; }
8467if ${ac_cv_path_LN+:} false; then :
8468  $as_echo_n "(cached) " >&6
8469else
8470  case $LN in
8471  [\\/]* | ?:[\\/]*)
8472  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8473  ;;
8474  *)
8475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8476for as_dir in $PATH
8477do
8478  IFS=$as_save_IFS
8479  test -z "$as_dir" && as_dir=.
8480    for ac_exec_ext in '' $ac_executable_extensions; do
8481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8482    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8484    break 2
8485  fi
8486done
8487  done
8488IFS=$as_save_IFS
8489
8490  ;;
8491esac
8492fi
8493LN=$ac_cv_path_LN
8494if test -n "$LN"; then
8495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8496$as_echo "$LN" >&6; }
8497else
8498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8499$as_echo "no" >&6; }
8500fi
8501
8502
8503  test -n "$LN" && break
8504done
8505
8506    else
8507      # If it succeeded, then it was overridden by the user. We will use it
8508      # for the tool.
8509
8510      # First remove it from the list of overridden variables, so we can test
8511      # for unknown variables in the end.
8512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8513
8514      # Check if we try to supply an empty value
8515      if test "x$LN" = x; then
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8517$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8519$as_echo_n "checking for LN... " >&6; }
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8521$as_echo "disabled" >&6; }
8522      else
8523        # Check if the provided tool contains a complete path.
8524        tool_specified="$LN"
8525        tool_basename="${tool_specified##*/}"
8526        if test "x$tool_basename" = "x$tool_specified"; then
8527          # A command without a complete path is provided, search $PATH.
8528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8529$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8530          # Extract the first word of "$tool_basename", so it can be a program name with args.
8531set dummy $tool_basename; ac_word=$2
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8533$as_echo_n "checking for $ac_word... " >&6; }
8534if ${ac_cv_path_LN+:} false; then :
8535  $as_echo_n "(cached) " >&6
8536else
8537  case $LN in
8538  [\\/]* | ?:[\\/]*)
8539  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8540  ;;
8541  *)
8542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8543for as_dir in $PATH
8544do
8545  IFS=$as_save_IFS
8546  test -z "$as_dir" && as_dir=.
8547    for ac_exec_ext in '' $ac_executable_extensions; do
8548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8549    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8551    break 2
8552  fi
8553done
8554  done
8555IFS=$as_save_IFS
8556
8557  ;;
8558esac
8559fi
8560LN=$ac_cv_path_LN
8561if test -n "$LN"; then
8562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8563$as_echo "$LN" >&6; }
8564else
8565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8566$as_echo "no" >&6; }
8567fi
8568
8569
8570          if test "x$LN" = x; then
8571            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8572          fi
8573        else
8574          # Otherwise we believe it is a complete path. Use it as it is.
8575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8576$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8577          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8578$as_echo_n "checking for LN... " >&6; }
8579          if test ! -x "$tool_specified"; then
8580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8581$as_echo "not found" >&6; }
8582            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8583          fi
8584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8585$as_echo "$tool_specified" >&6; }
8586        fi
8587      fi
8588    fi
8589
8590  fi
8591
8592
8593
8594  if test "x$LN" = x; then
8595    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8596  fi
8597
8598
8599
8600
8601
8602  # Publish this variable in the help.
8603
8604
8605  if [ -z "${LS+x}" ]; then
8606    # The variable is not set by user, try to locate tool using the code snippet
8607    for ac_prog in ls
8608do
8609  # Extract the first word of "$ac_prog", so it can be a program name with args.
8610set dummy $ac_prog; ac_word=$2
8611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8612$as_echo_n "checking for $ac_word... " >&6; }
8613if ${ac_cv_path_LS+:} false; then :
8614  $as_echo_n "(cached) " >&6
8615else
8616  case $LS in
8617  [\\/]* | ?:[\\/]*)
8618  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8619  ;;
8620  *)
8621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8622for as_dir in $PATH
8623do
8624  IFS=$as_save_IFS
8625  test -z "$as_dir" && as_dir=.
8626    for ac_exec_ext in '' $ac_executable_extensions; do
8627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8628    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8630    break 2
8631  fi
8632done
8633  done
8634IFS=$as_save_IFS
8635
8636  ;;
8637esac
8638fi
8639LS=$ac_cv_path_LS
8640if test -n "$LS"; then
8641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8642$as_echo "$LS" >&6; }
8643else
8644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8645$as_echo "no" >&6; }
8646fi
8647
8648
8649  test -n "$LS" && break
8650done
8651
8652  else
8653    # The variable is set, but is it from the command line or the environment?
8654
8655    # Try to remove the string !LS! from our list.
8656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8658      # If it failed, the variable was not from the command line. Ignore it,
8659      # but warn the user (except for BASH, which is always set by the calling BASH).
8660      if test "xLS" != xBASH; then
8661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8662$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8663      fi
8664      # Try to locate tool using the code snippet
8665      for ac_prog in ls
8666do
8667  # Extract the first word of "$ac_prog", so it can be a program name with args.
8668set dummy $ac_prog; ac_word=$2
8669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8670$as_echo_n "checking for $ac_word... " >&6; }
8671if ${ac_cv_path_LS+:} false; then :
8672  $as_echo_n "(cached) " >&6
8673else
8674  case $LS in
8675  [\\/]* | ?:[\\/]*)
8676  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8677  ;;
8678  *)
8679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8680for as_dir in $PATH
8681do
8682  IFS=$as_save_IFS
8683  test -z "$as_dir" && as_dir=.
8684    for ac_exec_ext in '' $ac_executable_extensions; do
8685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8686    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8688    break 2
8689  fi
8690done
8691  done
8692IFS=$as_save_IFS
8693
8694  ;;
8695esac
8696fi
8697LS=$ac_cv_path_LS
8698if test -n "$LS"; then
8699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8700$as_echo "$LS" >&6; }
8701else
8702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8703$as_echo "no" >&6; }
8704fi
8705
8706
8707  test -n "$LS" && break
8708done
8709
8710    else
8711      # If it succeeded, then it was overridden by the user. We will use it
8712      # for the tool.
8713
8714      # First remove it from the list of overridden variables, so we can test
8715      # for unknown variables in the end.
8716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8717
8718      # Check if we try to supply an empty value
8719      if test "x$LS" = x; then
8720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8721$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8723$as_echo_n "checking for LS... " >&6; }
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8725$as_echo "disabled" >&6; }
8726      else
8727        # Check if the provided tool contains a complete path.
8728        tool_specified="$LS"
8729        tool_basename="${tool_specified##*/}"
8730        if test "x$tool_basename" = "x$tool_specified"; then
8731          # A command without a complete path is provided, search $PATH.
8732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8733$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8734          # Extract the first word of "$tool_basename", so it can be a program name with args.
8735set dummy $tool_basename; ac_word=$2
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8737$as_echo_n "checking for $ac_word... " >&6; }
8738if ${ac_cv_path_LS+:} false; then :
8739  $as_echo_n "(cached) " >&6
8740else
8741  case $LS in
8742  [\\/]* | ?:[\\/]*)
8743  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8744  ;;
8745  *)
8746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8747for as_dir in $PATH
8748do
8749  IFS=$as_save_IFS
8750  test -z "$as_dir" && as_dir=.
8751    for ac_exec_ext in '' $ac_executable_extensions; do
8752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8753    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8755    break 2
8756  fi
8757done
8758  done
8759IFS=$as_save_IFS
8760
8761  ;;
8762esac
8763fi
8764LS=$ac_cv_path_LS
8765if test -n "$LS"; then
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8767$as_echo "$LS" >&6; }
8768else
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770$as_echo "no" >&6; }
8771fi
8772
8773
8774          if test "x$LS" = x; then
8775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8776          fi
8777        else
8778          # Otherwise we believe it is a complete path. Use it as it is.
8779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8780$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8782$as_echo_n "checking for LS... " >&6; }
8783          if test ! -x "$tool_specified"; then
8784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8785$as_echo "not found" >&6; }
8786            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8787          fi
8788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8789$as_echo "$tool_specified" >&6; }
8790        fi
8791      fi
8792    fi
8793
8794  fi
8795
8796
8797
8798  if test "x$LS" = x; then
8799    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8800  fi
8801
8802
8803
8804
8805
8806  # Publish this variable in the help.
8807
8808
8809  if [ -z "${MKDIR+x}" ]; then
8810    # The variable is not set by user, try to locate tool using the code snippet
8811    for ac_prog in mkdir
8812do
8813  # Extract the first word of "$ac_prog", so it can be a program name with args.
8814set dummy $ac_prog; ac_word=$2
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8816$as_echo_n "checking for $ac_word... " >&6; }
8817if ${ac_cv_path_MKDIR+:} false; then :
8818  $as_echo_n "(cached) " >&6
8819else
8820  case $MKDIR in
8821  [\\/]* | ?:[\\/]*)
8822  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8823  ;;
8824  *)
8825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8826for as_dir in $PATH
8827do
8828  IFS=$as_save_IFS
8829  test -z "$as_dir" && as_dir=.
8830    for ac_exec_ext in '' $ac_executable_extensions; do
8831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8832    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8834    break 2
8835  fi
8836done
8837  done
8838IFS=$as_save_IFS
8839
8840  ;;
8841esac
8842fi
8843MKDIR=$ac_cv_path_MKDIR
8844if test -n "$MKDIR"; then
8845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8846$as_echo "$MKDIR" >&6; }
8847else
8848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849$as_echo "no" >&6; }
8850fi
8851
8852
8853  test -n "$MKDIR" && break
8854done
8855
8856  else
8857    # The variable is set, but is it from the command line or the environment?
8858
8859    # Try to remove the string !MKDIR! from our list.
8860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8862      # If it failed, the variable was not from the command line. Ignore it,
8863      # but warn the user (except for BASH, which is always set by the calling BASH).
8864      if test "xMKDIR" != xBASH; then
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8866$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8867      fi
8868      # Try to locate tool using the code snippet
8869      for ac_prog in mkdir
8870do
8871  # Extract the first word of "$ac_prog", so it can be a program name with args.
8872set dummy $ac_prog; ac_word=$2
8873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8874$as_echo_n "checking for $ac_word... " >&6; }
8875if ${ac_cv_path_MKDIR+:} false; then :
8876  $as_echo_n "(cached) " >&6
8877else
8878  case $MKDIR in
8879  [\\/]* | ?:[\\/]*)
8880  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8881  ;;
8882  *)
8883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8884for as_dir in $PATH
8885do
8886  IFS=$as_save_IFS
8887  test -z "$as_dir" && as_dir=.
8888    for ac_exec_ext in '' $ac_executable_extensions; do
8889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8892    break 2
8893  fi
8894done
8895  done
8896IFS=$as_save_IFS
8897
8898  ;;
8899esac
8900fi
8901MKDIR=$ac_cv_path_MKDIR
8902if test -n "$MKDIR"; then
8903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8904$as_echo "$MKDIR" >&6; }
8905else
8906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907$as_echo "no" >&6; }
8908fi
8909
8910
8911  test -n "$MKDIR" && break
8912done
8913
8914    else
8915      # If it succeeded, then it was overridden by the user. We will use it
8916      # for the tool.
8917
8918      # First remove it from the list of overridden variables, so we can test
8919      # for unknown variables in the end.
8920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8921
8922      # Check if we try to supply an empty value
8923      if test "x$MKDIR" = x; then
8924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8925$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8927$as_echo_n "checking for MKDIR... " >&6; }
8928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8929$as_echo "disabled" >&6; }
8930      else
8931        # Check if the provided tool contains a complete path.
8932        tool_specified="$MKDIR"
8933        tool_basename="${tool_specified##*/}"
8934        if test "x$tool_basename" = "x$tool_specified"; then
8935          # A command without a complete path is provided, search $PATH.
8936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8937$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8938          # Extract the first word of "$tool_basename", so it can be a program name with args.
8939set dummy $tool_basename; ac_word=$2
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8941$as_echo_n "checking for $ac_word... " >&6; }
8942if ${ac_cv_path_MKDIR+:} false; then :
8943  $as_echo_n "(cached) " >&6
8944else
8945  case $MKDIR in
8946  [\\/]* | ?:[\\/]*)
8947  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8948  ;;
8949  *)
8950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8951for as_dir in $PATH
8952do
8953  IFS=$as_save_IFS
8954  test -z "$as_dir" && as_dir=.
8955    for ac_exec_ext in '' $ac_executable_extensions; do
8956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8957    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8959    break 2
8960  fi
8961done
8962  done
8963IFS=$as_save_IFS
8964
8965  ;;
8966esac
8967fi
8968MKDIR=$ac_cv_path_MKDIR
8969if test -n "$MKDIR"; then
8970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8971$as_echo "$MKDIR" >&6; }
8972else
8973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8974$as_echo "no" >&6; }
8975fi
8976
8977
8978          if test "x$MKDIR" = x; then
8979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8980          fi
8981        else
8982          # Otherwise we believe it is a complete path. Use it as it is.
8983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8984$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8986$as_echo_n "checking for MKDIR... " >&6; }
8987          if test ! -x "$tool_specified"; then
8988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8989$as_echo "not found" >&6; }
8990            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8991          fi
8992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8993$as_echo "$tool_specified" >&6; }
8994        fi
8995      fi
8996    fi
8997
8998  fi
8999
9000
9001
9002  if test "x$MKDIR" = x; then
9003    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9004  fi
9005
9006
9007
9008
9009
9010  # Publish this variable in the help.
9011
9012
9013  if [ -z "${MKTEMP+x}" ]; then
9014    # The variable is not set by user, try to locate tool using the code snippet
9015    for ac_prog in mktemp
9016do
9017  # Extract the first word of "$ac_prog", so it can be a program name with args.
9018set dummy $ac_prog; ac_word=$2
9019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9020$as_echo_n "checking for $ac_word... " >&6; }
9021if ${ac_cv_path_MKTEMP+:} false; then :
9022  $as_echo_n "(cached) " >&6
9023else
9024  case $MKTEMP in
9025  [\\/]* | ?:[\\/]*)
9026  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9027  ;;
9028  *)
9029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9030for as_dir in $PATH
9031do
9032  IFS=$as_save_IFS
9033  test -z "$as_dir" && as_dir=.
9034    for ac_exec_ext in '' $ac_executable_extensions; do
9035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9036    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9038    break 2
9039  fi
9040done
9041  done
9042IFS=$as_save_IFS
9043
9044  ;;
9045esac
9046fi
9047MKTEMP=$ac_cv_path_MKTEMP
9048if test -n "$MKTEMP"; then
9049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9050$as_echo "$MKTEMP" >&6; }
9051else
9052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9053$as_echo "no" >&6; }
9054fi
9055
9056
9057  test -n "$MKTEMP" && break
9058done
9059
9060  else
9061    # The variable is set, but is it from the command line or the environment?
9062
9063    # Try to remove the string !MKTEMP! from our list.
9064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9066      # If it failed, the variable was not from the command line. Ignore it,
9067      # but warn the user (except for BASH, which is always set by the calling BASH).
9068      if test "xMKTEMP" != xBASH; then
9069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9070$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9071      fi
9072      # Try to locate tool using the code snippet
9073      for ac_prog in mktemp
9074do
9075  # Extract the first word of "$ac_prog", so it can be a program name with args.
9076set dummy $ac_prog; ac_word=$2
9077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9078$as_echo_n "checking for $ac_word... " >&6; }
9079if ${ac_cv_path_MKTEMP+:} false; then :
9080  $as_echo_n "(cached) " >&6
9081else
9082  case $MKTEMP in
9083  [\\/]* | ?:[\\/]*)
9084  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9085  ;;
9086  *)
9087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9088for as_dir in $PATH
9089do
9090  IFS=$as_save_IFS
9091  test -z "$as_dir" && as_dir=.
9092    for ac_exec_ext in '' $ac_executable_extensions; do
9093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9094    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9096    break 2
9097  fi
9098done
9099  done
9100IFS=$as_save_IFS
9101
9102  ;;
9103esac
9104fi
9105MKTEMP=$ac_cv_path_MKTEMP
9106if test -n "$MKTEMP"; then
9107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9108$as_echo "$MKTEMP" >&6; }
9109else
9110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111$as_echo "no" >&6; }
9112fi
9113
9114
9115  test -n "$MKTEMP" && break
9116done
9117
9118    else
9119      # If it succeeded, then it was overridden by the user. We will use it
9120      # for the tool.
9121
9122      # First remove it from the list of overridden variables, so we can test
9123      # for unknown variables in the end.
9124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9125
9126      # Check if we try to supply an empty value
9127      if test "x$MKTEMP" = x; then
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9129$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9131$as_echo_n "checking for MKTEMP... " >&6; }
9132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9133$as_echo "disabled" >&6; }
9134      else
9135        # Check if the provided tool contains a complete path.
9136        tool_specified="$MKTEMP"
9137        tool_basename="${tool_specified##*/}"
9138        if test "x$tool_basename" = "x$tool_specified"; then
9139          # A command without a complete path is provided, search $PATH.
9140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9141$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9142          # Extract the first word of "$tool_basename", so it can be a program name with args.
9143set dummy $tool_basename; ac_word=$2
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9145$as_echo_n "checking for $ac_word... " >&6; }
9146if ${ac_cv_path_MKTEMP+:} false; then :
9147  $as_echo_n "(cached) " >&6
9148else
9149  case $MKTEMP in
9150  [\\/]* | ?:[\\/]*)
9151  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9152  ;;
9153  *)
9154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9155for as_dir in $PATH
9156do
9157  IFS=$as_save_IFS
9158  test -z "$as_dir" && as_dir=.
9159    for ac_exec_ext in '' $ac_executable_extensions; do
9160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9161    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9163    break 2
9164  fi
9165done
9166  done
9167IFS=$as_save_IFS
9168
9169  ;;
9170esac
9171fi
9172MKTEMP=$ac_cv_path_MKTEMP
9173if test -n "$MKTEMP"; then
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9175$as_echo "$MKTEMP" >&6; }
9176else
9177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
9179fi
9180
9181
9182          if test "x$MKTEMP" = x; then
9183            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9184          fi
9185        else
9186          # Otherwise we believe it is a complete path. Use it as it is.
9187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9188$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9189          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9190$as_echo_n "checking for MKTEMP... " >&6; }
9191          if test ! -x "$tool_specified"; then
9192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9193$as_echo "not found" >&6; }
9194            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9195          fi
9196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9197$as_echo "$tool_specified" >&6; }
9198        fi
9199      fi
9200    fi
9201
9202  fi
9203
9204
9205
9206  if test "x$MKTEMP" = x; then
9207    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9208  fi
9209
9210
9211
9212
9213
9214  # Publish this variable in the help.
9215
9216
9217  if [ -z "${MV+x}" ]; then
9218    # The variable is not set by user, try to locate tool using the code snippet
9219    for ac_prog in mv
9220do
9221  # Extract the first word of "$ac_prog", so it can be a program name with args.
9222set dummy $ac_prog; ac_word=$2
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9224$as_echo_n "checking for $ac_word... " >&6; }
9225if ${ac_cv_path_MV+:} false; then :
9226  $as_echo_n "(cached) " >&6
9227else
9228  case $MV in
9229  [\\/]* | ?:[\\/]*)
9230  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9231  ;;
9232  *)
9233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9234for as_dir in $PATH
9235do
9236  IFS=$as_save_IFS
9237  test -z "$as_dir" && as_dir=.
9238    for ac_exec_ext in '' $ac_executable_extensions; do
9239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9240    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9242    break 2
9243  fi
9244done
9245  done
9246IFS=$as_save_IFS
9247
9248  ;;
9249esac
9250fi
9251MV=$ac_cv_path_MV
9252if test -n "$MV"; then
9253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9254$as_echo "$MV" >&6; }
9255else
9256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9257$as_echo "no" >&6; }
9258fi
9259
9260
9261  test -n "$MV" && break
9262done
9263
9264  else
9265    # The variable is set, but is it from the command line or the environment?
9266
9267    # Try to remove the string !MV! from our list.
9268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9270      # If it failed, the variable was not from the command line. Ignore it,
9271      # but warn the user (except for BASH, which is always set by the calling BASH).
9272      if test "xMV" != xBASH; then
9273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9274$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9275      fi
9276      # Try to locate tool using the code snippet
9277      for ac_prog in mv
9278do
9279  # Extract the first word of "$ac_prog", so it can be a program name with args.
9280set dummy $ac_prog; ac_word=$2
9281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9282$as_echo_n "checking for $ac_word... " >&6; }
9283if ${ac_cv_path_MV+:} false; then :
9284  $as_echo_n "(cached) " >&6
9285else
9286  case $MV in
9287  [\\/]* | ?:[\\/]*)
9288  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9289  ;;
9290  *)
9291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9292for as_dir in $PATH
9293do
9294  IFS=$as_save_IFS
9295  test -z "$as_dir" && as_dir=.
9296    for ac_exec_ext in '' $ac_executable_extensions; do
9297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9298    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9300    break 2
9301  fi
9302done
9303  done
9304IFS=$as_save_IFS
9305
9306  ;;
9307esac
9308fi
9309MV=$ac_cv_path_MV
9310if test -n "$MV"; then
9311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9312$as_echo "$MV" >&6; }
9313else
9314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
9316fi
9317
9318
9319  test -n "$MV" && break
9320done
9321
9322    else
9323      # If it succeeded, then it was overridden by the user. We will use it
9324      # for the tool.
9325
9326      # First remove it from the list of overridden variables, so we can test
9327      # for unknown variables in the end.
9328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9329
9330      # Check if we try to supply an empty value
9331      if test "x$MV" = x; then
9332        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9333$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9335$as_echo_n "checking for MV... " >&6; }
9336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9337$as_echo "disabled" >&6; }
9338      else
9339        # Check if the provided tool contains a complete path.
9340        tool_specified="$MV"
9341        tool_basename="${tool_specified##*/}"
9342        if test "x$tool_basename" = "x$tool_specified"; then
9343          # A command without a complete path is provided, search $PATH.
9344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9345$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9346          # Extract the first word of "$tool_basename", so it can be a program name with args.
9347set dummy $tool_basename; ac_word=$2
9348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9349$as_echo_n "checking for $ac_word... " >&6; }
9350if ${ac_cv_path_MV+:} false; then :
9351  $as_echo_n "(cached) " >&6
9352else
9353  case $MV in
9354  [\\/]* | ?:[\\/]*)
9355  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9356  ;;
9357  *)
9358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9359for as_dir in $PATH
9360do
9361  IFS=$as_save_IFS
9362  test -z "$as_dir" && as_dir=.
9363    for ac_exec_ext in '' $ac_executable_extensions; do
9364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9365    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9367    break 2
9368  fi
9369done
9370  done
9371IFS=$as_save_IFS
9372
9373  ;;
9374esac
9375fi
9376MV=$ac_cv_path_MV
9377if test -n "$MV"; then
9378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9379$as_echo "$MV" >&6; }
9380else
9381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9382$as_echo "no" >&6; }
9383fi
9384
9385
9386          if test "x$MV" = x; then
9387            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9388          fi
9389        else
9390          # Otherwise we believe it is a complete path. Use it as it is.
9391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9392$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9393          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9394$as_echo_n "checking for MV... " >&6; }
9395          if test ! -x "$tool_specified"; then
9396            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9397$as_echo "not found" >&6; }
9398            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9399          fi
9400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9401$as_echo "$tool_specified" >&6; }
9402        fi
9403      fi
9404    fi
9405
9406  fi
9407
9408
9409
9410  if test "x$MV" = x; then
9411    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9412  fi
9413
9414
9415
9416
9417
9418  # Publish this variable in the help.
9419
9420
9421  if [ -z "${NAWK+x}" ]; then
9422    # The variable is not set by user, try to locate tool using the code snippet
9423    for ac_prog in nawk gawk awk
9424do
9425  # Extract the first word of "$ac_prog", so it can be a program name with args.
9426set dummy $ac_prog; ac_word=$2
9427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428$as_echo_n "checking for $ac_word... " >&6; }
9429if ${ac_cv_path_NAWK+:} false; then :
9430  $as_echo_n "(cached) " >&6
9431else
9432  case $NAWK in
9433  [\\/]* | ?:[\\/]*)
9434  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9435  ;;
9436  *)
9437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438for as_dir in $PATH
9439do
9440  IFS=$as_save_IFS
9441  test -z "$as_dir" && as_dir=.
9442    for ac_exec_ext in '' $ac_executable_extensions; do
9443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9444    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9446    break 2
9447  fi
9448done
9449  done
9450IFS=$as_save_IFS
9451
9452  ;;
9453esac
9454fi
9455NAWK=$ac_cv_path_NAWK
9456if test -n "$NAWK"; then
9457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9458$as_echo "$NAWK" >&6; }
9459else
9460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
9462fi
9463
9464
9465  test -n "$NAWK" && break
9466done
9467
9468  else
9469    # The variable is set, but is it from the command line or the environment?
9470
9471    # Try to remove the string !NAWK! from our list.
9472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9474      # If it failed, the variable was not from the command line. Ignore it,
9475      # but warn the user (except for BASH, which is always set by the calling BASH).
9476      if test "xNAWK" != xBASH; then
9477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9478$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9479      fi
9480      # Try to locate tool using the code snippet
9481      for ac_prog in nawk gawk awk
9482do
9483  # Extract the first word of "$ac_prog", so it can be a program name with args.
9484set dummy $ac_prog; ac_word=$2
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9486$as_echo_n "checking for $ac_word... " >&6; }
9487if ${ac_cv_path_NAWK+:} false; then :
9488  $as_echo_n "(cached) " >&6
9489else
9490  case $NAWK in
9491  [\\/]* | ?:[\\/]*)
9492  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9493  ;;
9494  *)
9495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9496for as_dir in $PATH
9497do
9498  IFS=$as_save_IFS
9499  test -z "$as_dir" && as_dir=.
9500    for ac_exec_ext in '' $ac_executable_extensions; do
9501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9502    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9504    break 2
9505  fi
9506done
9507  done
9508IFS=$as_save_IFS
9509
9510  ;;
9511esac
9512fi
9513NAWK=$ac_cv_path_NAWK
9514if test -n "$NAWK"; then
9515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9516$as_echo "$NAWK" >&6; }
9517else
9518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9519$as_echo "no" >&6; }
9520fi
9521
9522
9523  test -n "$NAWK" && break
9524done
9525
9526    else
9527      # If it succeeded, then it was overridden by the user. We will use it
9528      # for the tool.
9529
9530      # First remove it from the list of overridden variables, so we can test
9531      # for unknown variables in the end.
9532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9533
9534      # Check if we try to supply an empty value
9535      if test "x$NAWK" = x; then
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9537$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9539$as_echo_n "checking for NAWK... " >&6; }
9540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9541$as_echo "disabled" >&6; }
9542      else
9543        # Check if the provided tool contains a complete path.
9544        tool_specified="$NAWK"
9545        tool_basename="${tool_specified##*/}"
9546        if test "x$tool_basename" = "x$tool_specified"; then
9547          # A command without a complete path is provided, search $PATH.
9548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9549$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9550          # Extract the first word of "$tool_basename", so it can be a program name with args.
9551set dummy $tool_basename; ac_word=$2
9552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9553$as_echo_n "checking for $ac_word... " >&6; }
9554if ${ac_cv_path_NAWK+:} false; then :
9555  $as_echo_n "(cached) " >&6
9556else
9557  case $NAWK in
9558  [\\/]* | ?:[\\/]*)
9559  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9560  ;;
9561  *)
9562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563for as_dir in $PATH
9564do
9565  IFS=$as_save_IFS
9566  test -z "$as_dir" && as_dir=.
9567    for ac_exec_ext in '' $ac_executable_extensions; do
9568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9569    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9571    break 2
9572  fi
9573done
9574  done
9575IFS=$as_save_IFS
9576
9577  ;;
9578esac
9579fi
9580NAWK=$ac_cv_path_NAWK
9581if test -n "$NAWK"; then
9582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9583$as_echo "$NAWK" >&6; }
9584else
9585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
9587fi
9588
9589
9590          if test "x$NAWK" = x; then
9591            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9592          fi
9593        else
9594          # Otherwise we believe it is a complete path. Use it as it is.
9595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9596$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9597          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9598$as_echo_n "checking for NAWK... " >&6; }
9599          if test ! -x "$tool_specified"; then
9600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9601$as_echo "not found" >&6; }
9602            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9603          fi
9604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9605$as_echo "$tool_specified" >&6; }
9606        fi
9607      fi
9608    fi
9609
9610  fi
9611
9612
9613
9614  if test "x$NAWK" = x; then
9615    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9616  fi
9617
9618
9619
9620
9621
9622  # Publish this variable in the help.
9623
9624
9625  if [ -z "${PRINTF+x}" ]; then
9626    # The variable is not set by user, try to locate tool using the code snippet
9627    for ac_prog in printf
9628do
9629  # Extract the first word of "$ac_prog", so it can be a program name with args.
9630set dummy $ac_prog; ac_word=$2
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if ${ac_cv_path_PRINTF+:} false; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  case $PRINTF in
9637  [\\/]* | ?:[\\/]*)
9638  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9639  ;;
9640  *)
9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642for as_dir in $PATH
9643do
9644  IFS=$as_save_IFS
9645  test -z "$as_dir" && as_dir=.
9646    for ac_exec_ext in '' $ac_executable_extensions; do
9647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9648    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650    break 2
9651  fi
9652done
9653  done
9654IFS=$as_save_IFS
9655
9656  ;;
9657esac
9658fi
9659PRINTF=$ac_cv_path_PRINTF
9660if test -n "$PRINTF"; then
9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9662$as_echo "$PRINTF" >&6; }
9663else
9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
9666fi
9667
9668
9669  test -n "$PRINTF" && break
9670done
9671
9672  else
9673    # The variable is set, but is it from the command line or the environment?
9674
9675    # Try to remove the string !PRINTF! from our list.
9676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9678      # If it failed, the variable was not from the command line. Ignore it,
9679      # but warn the user (except for BASH, which is always set by the calling BASH).
9680      if test "xPRINTF" != xBASH; then
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9682$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9683      fi
9684      # Try to locate tool using the code snippet
9685      for ac_prog in printf
9686do
9687  # Extract the first word of "$ac_prog", so it can be a program name with args.
9688set dummy $ac_prog; ac_word=$2
9689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9690$as_echo_n "checking for $ac_word... " >&6; }
9691if ${ac_cv_path_PRINTF+:} false; then :
9692  $as_echo_n "(cached) " >&6
9693else
9694  case $PRINTF in
9695  [\\/]* | ?:[\\/]*)
9696  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9697  ;;
9698  *)
9699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9700for as_dir in $PATH
9701do
9702  IFS=$as_save_IFS
9703  test -z "$as_dir" && as_dir=.
9704    for ac_exec_ext in '' $ac_executable_extensions; do
9705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9706    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9708    break 2
9709  fi
9710done
9711  done
9712IFS=$as_save_IFS
9713
9714  ;;
9715esac
9716fi
9717PRINTF=$ac_cv_path_PRINTF
9718if test -n "$PRINTF"; then
9719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9720$as_echo "$PRINTF" >&6; }
9721else
9722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9723$as_echo "no" >&6; }
9724fi
9725
9726
9727  test -n "$PRINTF" && break
9728done
9729
9730    else
9731      # If it succeeded, then it was overridden by the user. We will use it
9732      # for the tool.
9733
9734      # First remove it from the list of overridden variables, so we can test
9735      # for unknown variables in the end.
9736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9737
9738      # Check if we try to supply an empty value
9739      if test "x$PRINTF" = x; then
9740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9741$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9743$as_echo_n "checking for PRINTF... " >&6; }
9744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9745$as_echo "disabled" >&6; }
9746      else
9747        # Check if the provided tool contains a complete path.
9748        tool_specified="$PRINTF"
9749        tool_basename="${tool_specified##*/}"
9750        if test "x$tool_basename" = "x$tool_specified"; then
9751          # A command without a complete path is provided, search $PATH.
9752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9753$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9754          # Extract the first word of "$tool_basename", so it can be a program name with args.
9755set dummy $tool_basename; ac_word=$2
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
9758if ${ac_cv_path_PRINTF+:} false; then :
9759  $as_echo_n "(cached) " >&6
9760else
9761  case $PRINTF in
9762  [\\/]* | ?:[\\/]*)
9763  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9764  ;;
9765  *)
9766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767for as_dir in $PATH
9768do
9769  IFS=$as_save_IFS
9770  test -z "$as_dir" && as_dir=.
9771    for ac_exec_ext in '' $ac_executable_extensions; do
9772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775    break 2
9776  fi
9777done
9778  done
9779IFS=$as_save_IFS
9780
9781  ;;
9782esac
9783fi
9784PRINTF=$ac_cv_path_PRINTF
9785if test -n "$PRINTF"; then
9786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9787$as_echo "$PRINTF" >&6; }
9788else
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793
9794          if test "x$PRINTF" = x; then
9795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9796          fi
9797        else
9798          # Otherwise we believe it is a complete path. Use it as it is.
9799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9800$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9802$as_echo_n "checking for PRINTF... " >&6; }
9803          if test ! -x "$tool_specified"; then
9804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9805$as_echo "not found" >&6; }
9806            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9807          fi
9808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9809$as_echo "$tool_specified" >&6; }
9810        fi
9811      fi
9812    fi
9813
9814  fi
9815
9816
9817
9818  if test "x$PRINTF" = x; then
9819    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9820  fi
9821
9822
9823
9824
9825
9826  # Publish this variable in the help.
9827
9828
9829  if [ -z "${RM+x}" ]; then
9830    # The variable is not set by user, try to locate tool using the code snippet
9831    for ac_prog in rm
9832do
9833  # Extract the first word of "$ac_prog", so it can be a program name with args.
9834set dummy $ac_prog; ac_word=$2
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836$as_echo_n "checking for $ac_word... " >&6; }
9837if ${ac_cv_path_RM+:} false; then :
9838  $as_echo_n "(cached) " >&6
9839else
9840  case $RM in
9841  [\\/]* | ?:[\\/]*)
9842  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9843  ;;
9844  *)
9845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846for as_dir in $PATH
9847do
9848  IFS=$as_save_IFS
9849  test -z "$as_dir" && as_dir=.
9850    for ac_exec_ext in '' $ac_executable_extensions; do
9851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854    break 2
9855  fi
9856done
9857  done
9858IFS=$as_save_IFS
9859
9860  ;;
9861esac
9862fi
9863RM=$ac_cv_path_RM
9864if test -n "$RM"; then
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9866$as_echo "$RM" >&6; }
9867else
9868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869$as_echo "no" >&6; }
9870fi
9871
9872
9873  test -n "$RM" && break
9874done
9875
9876  else
9877    # The variable is set, but is it from the command line or the environment?
9878
9879    # Try to remove the string !RM! from our list.
9880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9882      # If it failed, the variable was not from the command line. Ignore it,
9883      # but warn the user (except for BASH, which is always set by the calling BASH).
9884      if test "xRM" != xBASH; then
9885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9886$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9887      fi
9888      # Try to locate tool using the code snippet
9889      for ac_prog in rm
9890do
9891  # Extract the first word of "$ac_prog", so it can be a program name with args.
9892set dummy $ac_prog; ac_word=$2
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894$as_echo_n "checking for $ac_word... " >&6; }
9895if ${ac_cv_path_RM+:} false; then :
9896  $as_echo_n "(cached) " >&6
9897else
9898  case $RM in
9899  [\\/]* | ?:[\\/]*)
9900  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9901  ;;
9902  *)
9903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904for as_dir in $PATH
9905do
9906  IFS=$as_save_IFS
9907  test -z "$as_dir" && as_dir=.
9908    for ac_exec_ext in '' $ac_executable_extensions; do
9909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912    break 2
9913  fi
9914done
9915  done
9916IFS=$as_save_IFS
9917
9918  ;;
9919esac
9920fi
9921RM=$ac_cv_path_RM
9922if test -n "$RM"; then
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9924$as_echo "$RM" >&6; }
9925else
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928fi
9929
9930
9931  test -n "$RM" && break
9932done
9933
9934    else
9935      # If it succeeded, then it was overridden by the user. We will use it
9936      # for the tool.
9937
9938      # First remove it from the list of overridden variables, so we can test
9939      # for unknown variables in the end.
9940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9941
9942      # Check if we try to supply an empty value
9943      if test "x$RM" = x; then
9944        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9945$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9947$as_echo_n "checking for RM... " >&6; }
9948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9949$as_echo "disabled" >&6; }
9950      else
9951        # Check if the provided tool contains a complete path.
9952        tool_specified="$RM"
9953        tool_basename="${tool_specified##*/}"
9954        if test "x$tool_basename" = "x$tool_specified"; then
9955          # A command without a complete path is provided, search $PATH.
9956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9957$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9958          # Extract the first word of "$tool_basename", so it can be a program name with args.
9959set dummy $tool_basename; ac_word=$2
9960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9961$as_echo_n "checking for $ac_word... " >&6; }
9962if ${ac_cv_path_RM+:} false; then :
9963  $as_echo_n "(cached) " >&6
9964else
9965  case $RM in
9966  [\\/]* | ?:[\\/]*)
9967  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9968  ;;
9969  *)
9970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9971for as_dir in $PATH
9972do
9973  IFS=$as_save_IFS
9974  test -z "$as_dir" && as_dir=.
9975    for ac_exec_ext in '' $ac_executable_extensions; do
9976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9977    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9979    break 2
9980  fi
9981done
9982  done
9983IFS=$as_save_IFS
9984
9985  ;;
9986esac
9987fi
9988RM=$ac_cv_path_RM
9989if test -n "$RM"; then
9990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9991$as_echo "$RM" >&6; }
9992else
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9994$as_echo "no" >&6; }
9995fi
9996
9997
9998          if test "x$RM" = x; then
9999            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10000          fi
10001        else
10002          # Otherwise we believe it is a complete path. Use it as it is.
10003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10004$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10005          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10006$as_echo_n "checking for RM... " >&6; }
10007          if test ! -x "$tool_specified"; then
10008            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10009$as_echo "not found" >&6; }
10010            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10011          fi
10012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10013$as_echo "$tool_specified" >&6; }
10014        fi
10015      fi
10016    fi
10017
10018  fi
10019
10020
10021
10022  if test "x$RM" = x; then
10023    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10024  fi
10025
10026
10027
10028
10029
10030  # Publish this variable in the help.
10031
10032
10033  if [ -z "${RMDIR+x}" ]; then
10034    # The variable is not set by user, try to locate tool using the code snippet
10035    for ac_prog in rmdir
10036do
10037  # Extract the first word of "$ac_prog", so it can be a program name with args.
10038set dummy $ac_prog; ac_word=$2
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10040$as_echo_n "checking for $ac_word... " >&6; }
10041if ${ac_cv_path_RMDIR+:} false; then :
10042  $as_echo_n "(cached) " >&6
10043else
10044  case $RMDIR in
10045  [\\/]* | ?:[\\/]*)
10046  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10047  ;;
10048  *)
10049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10050for as_dir in $PATH
10051do
10052  IFS=$as_save_IFS
10053  test -z "$as_dir" && as_dir=.
10054    for ac_exec_ext in '' $ac_executable_extensions; do
10055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10056    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10058    break 2
10059  fi
10060done
10061  done
10062IFS=$as_save_IFS
10063
10064  ;;
10065esac
10066fi
10067RMDIR=$ac_cv_path_RMDIR
10068if test -n "$RMDIR"; then
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10070$as_echo "$RMDIR" >&6; }
10071else
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077  test -n "$RMDIR" && break
10078done
10079
10080  else
10081    # The variable is set, but is it from the command line or the environment?
10082
10083    # Try to remove the string !RMDIR! from our list.
10084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10086      # If it failed, the variable was not from the command line. Ignore it,
10087      # but warn the user (except for BASH, which is always set by the calling BASH).
10088      if test "xRMDIR" != xBASH; then
10089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10090$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10091      fi
10092      # Try to locate tool using the code snippet
10093      for ac_prog in rmdir
10094do
10095  # Extract the first word of "$ac_prog", so it can be a program name with args.
10096set dummy $ac_prog; ac_word=$2
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10098$as_echo_n "checking for $ac_word... " >&6; }
10099if ${ac_cv_path_RMDIR+:} false; then :
10100  $as_echo_n "(cached) " >&6
10101else
10102  case $RMDIR in
10103  [\\/]* | ?:[\\/]*)
10104  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10105  ;;
10106  *)
10107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10108for as_dir in $PATH
10109do
10110  IFS=$as_save_IFS
10111  test -z "$as_dir" && as_dir=.
10112    for ac_exec_ext in '' $ac_executable_extensions; do
10113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10114    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10116    break 2
10117  fi
10118done
10119  done
10120IFS=$as_save_IFS
10121
10122  ;;
10123esac
10124fi
10125RMDIR=$ac_cv_path_RMDIR
10126if test -n "$RMDIR"; then
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10128$as_echo "$RMDIR" >&6; }
10129else
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
10135  test -n "$RMDIR" && break
10136done
10137
10138    else
10139      # If it succeeded, then it was overridden by the user. We will use it
10140      # for the tool.
10141
10142      # First remove it from the list of overridden variables, so we can test
10143      # for unknown variables in the end.
10144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10145
10146      # Check if we try to supply an empty value
10147      if test "x$RMDIR" = x; then
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10149$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10151$as_echo_n "checking for RMDIR... " >&6; }
10152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10153$as_echo "disabled" >&6; }
10154      else
10155        # Check if the provided tool contains a complete path.
10156        tool_specified="$RMDIR"
10157        tool_basename="${tool_specified##*/}"
10158        if test "x$tool_basename" = "x$tool_specified"; then
10159          # A command without a complete path is provided, search $PATH.
10160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10161$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10162          # Extract the first word of "$tool_basename", so it can be a program name with args.
10163set dummy $tool_basename; ac_word=$2
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165$as_echo_n "checking for $ac_word... " >&6; }
10166if ${ac_cv_path_RMDIR+:} false; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  case $RMDIR in
10170  [\\/]* | ?:[\\/]*)
10171  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10172  ;;
10173  *)
10174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10181    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189  ;;
10190esac
10191fi
10192RMDIR=$ac_cv_path_RMDIR
10193if test -n "$RMDIR"; then
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10195$as_echo "$RMDIR" >&6; }
10196else
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
10202          if test "x$RMDIR" = x; then
10203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10204          fi
10205        else
10206          # Otherwise we believe it is a complete path. Use it as it is.
10207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10208$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10210$as_echo_n "checking for RMDIR... " >&6; }
10211          if test ! -x "$tool_specified"; then
10212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10213$as_echo "not found" >&6; }
10214            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10215          fi
10216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10217$as_echo "$tool_specified" >&6; }
10218        fi
10219      fi
10220    fi
10221
10222  fi
10223
10224
10225
10226  if test "x$RMDIR" = x; then
10227    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10228  fi
10229
10230
10231
10232
10233
10234  # Publish this variable in the help.
10235
10236
10237  if [ -z "${SH+x}" ]; then
10238    # The variable is not set by user, try to locate tool using the code snippet
10239    for ac_prog in sh
10240do
10241  # Extract the first word of "$ac_prog", so it can be a program name with args.
10242set dummy $ac_prog; ac_word=$2
10243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10244$as_echo_n "checking for $ac_word... " >&6; }
10245if ${ac_cv_path_SH+:} false; then :
10246  $as_echo_n "(cached) " >&6
10247else
10248  case $SH in
10249  [\\/]* | ?:[\\/]*)
10250  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10251  ;;
10252  *)
10253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10254for as_dir in $PATH
10255do
10256  IFS=$as_save_IFS
10257  test -z "$as_dir" && as_dir=.
10258    for ac_exec_ext in '' $ac_executable_extensions; do
10259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10260    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10262    break 2
10263  fi
10264done
10265  done
10266IFS=$as_save_IFS
10267
10268  ;;
10269esac
10270fi
10271SH=$ac_cv_path_SH
10272if test -n "$SH"; then
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10274$as_echo "$SH" >&6; }
10275else
10276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10277$as_echo "no" >&6; }
10278fi
10279
10280
10281  test -n "$SH" && break
10282done
10283
10284  else
10285    # The variable is set, but is it from the command line or the environment?
10286
10287    # Try to remove the string !SH! from our list.
10288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10290      # If it failed, the variable was not from the command line. Ignore it,
10291      # but warn the user (except for BASH, which is always set by the calling BASH).
10292      if test "xSH" != xBASH; then
10293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10294$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10295      fi
10296      # Try to locate tool using the code snippet
10297      for ac_prog in sh
10298do
10299  # Extract the first word of "$ac_prog", so it can be a program name with args.
10300set dummy $ac_prog; ac_word=$2
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10302$as_echo_n "checking for $ac_word... " >&6; }
10303if ${ac_cv_path_SH+:} false; then :
10304  $as_echo_n "(cached) " >&6
10305else
10306  case $SH in
10307  [\\/]* | ?:[\\/]*)
10308  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10309  ;;
10310  *)
10311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314  IFS=$as_save_IFS
10315  test -z "$as_dir" && as_dir=.
10316    for ac_exec_ext in '' $ac_executable_extensions; do
10317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10318    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10320    break 2
10321  fi
10322done
10323  done
10324IFS=$as_save_IFS
10325
10326  ;;
10327esac
10328fi
10329SH=$ac_cv_path_SH
10330if test -n "$SH"; then
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10332$as_echo "$SH" >&6; }
10333else
10334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336fi
10337
10338
10339  test -n "$SH" && break
10340done
10341
10342    else
10343      # If it succeeded, then it was overridden by the user. We will use it
10344      # for the tool.
10345
10346      # First remove it from the list of overridden variables, so we can test
10347      # for unknown variables in the end.
10348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10349
10350      # Check if we try to supply an empty value
10351      if test "x$SH" = x; then
10352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10353$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10355$as_echo_n "checking for SH... " >&6; }
10356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10357$as_echo "disabled" >&6; }
10358      else
10359        # Check if the provided tool contains a complete path.
10360        tool_specified="$SH"
10361        tool_basename="${tool_specified##*/}"
10362        if test "x$tool_basename" = "x$tool_specified"; then
10363          # A command without a complete path is provided, search $PATH.
10364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10365$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10366          # Extract the first word of "$tool_basename", so it can be a program name with args.
10367set dummy $tool_basename; ac_word=$2
10368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10369$as_echo_n "checking for $ac_word... " >&6; }
10370if ${ac_cv_path_SH+:} false; then :
10371  $as_echo_n "(cached) " >&6
10372else
10373  case $SH in
10374  [\\/]* | ?:[\\/]*)
10375  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10376  ;;
10377  *)
10378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10379for as_dir in $PATH
10380do
10381  IFS=$as_save_IFS
10382  test -z "$as_dir" && as_dir=.
10383    for ac_exec_ext in '' $ac_executable_extensions; do
10384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10385    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10387    break 2
10388  fi
10389done
10390  done
10391IFS=$as_save_IFS
10392
10393  ;;
10394esac
10395fi
10396SH=$ac_cv_path_SH
10397if test -n "$SH"; then
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10399$as_echo "$SH" >&6; }
10400else
10401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
10403fi
10404
10405
10406          if test "x$SH" = x; then
10407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10408          fi
10409        else
10410          # Otherwise we believe it is a complete path. Use it as it is.
10411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10412$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10414$as_echo_n "checking for SH... " >&6; }
10415          if test ! -x "$tool_specified"; then
10416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10417$as_echo "not found" >&6; }
10418            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10419          fi
10420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10421$as_echo "$tool_specified" >&6; }
10422        fi
10423      fi
10424    fi
10425
10426  fi
10427
10428
10429
10430  if test "x$SH" = x; then
10431    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10432  fi
10433
10434
10435
10436
10437
10438  # Publish this variable in the help.
10439
10440
10441  if [ -z "${SORT+x}" ]; then
10442    # The variable is not set by user, try to locate tool using the code snippet
10443    for ac_prog in sort
10444do
10445  # Extract the first word of "$ac_prog", so it can be a program name with args.
10446set dummy $ac_prog; ac_word=$2
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10448$as_echo_n "checking for $ac_word... " >&6; }
10449if ${ac_cv_path_SORT+:} false; then :
10450  $as_echo_n "(cached) " >&6
10451else
10452  case $SORT in
10453  [\\/]* | ?:[\\/]*)
10454  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10455  ;;
10456  *)
10457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10458for as_dir in $PATH
10459do
10460  IFS=$as_save_IFS
10461  test -z "$as_dir" && as_dir=.
10462    for ac_exec_ext in '' $ac_executable_extensions; do
10463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10464    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10466    break 2
10467  fi
10468done
10469  done
10470IFS=$as_save_IFS
10471
10472  ;;
10473esac
10474fi
10475SORT=$ac_cv_path_SORT
10476if test -n "$SORT"; then
10477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10478$as_echo "$SORT" >&6; }
10479else
10480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481$as_echo "no" >&6; }
10482fi
10483
10484
10485  test -n "$SORT" && break
10486done
10487
10488  else
10489    # The variable is set, but is it from the command line or the environment?
10490
10491    # Try to remove the string !SORT! from our list.
10492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10494      # If it failed, the variable was not from the command line. Ignore it,
10495      # but warn the user (except for BASH, which is always set by the calling BASH).
10496      if test "xSORT" != xBASH; then
10497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10498$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10499      fi
10500      # Try to locate tool using the code snippet
10501      for ac_prog in sort
10502do
10503  # Extract the first word of "$ac_prog", so it can be a program name with args.
10504set dummy $ac_prog; ac_word=$2
10505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10506$as_echo_n "checking for $ac_word... " >&6; }
10507if ${ac_cv_path_SORT+:} false; then :
10508  $as_echo_n "(cached) " >&6
10509else
10510  case $SORT in
10511  [\\/]* | ?:[\\/]*)
10512  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10513  ;;
10514  *)
10515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10516for as_dir in $PATH
10517do
10518  IFS=$as_save_IFS
10519  test -z "$as_dir" && as_dir=.
10520    for ac_exec_ext in '' $ac_executable_extensions; do
10521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10522    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10524    break 2
10525  fi
10526done
10527  done
10528IFS=$as_save_IFS
10529
10530  ;;
10531esac
10532fi
10533SORT=$ac_cv_path_SORT
10534if test -n "$SORT"; then
10535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10536$as_echo "$SORT" >&6; }
10537else
10538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10539$as_echo "no" >&6; }
10540fi
10541
10542
10543  test -n "$SORT" && break
10544done
10545
10546    else
10547      # If it succeeded, then it was overridden by the user. We will use it
10548      # for the tool.
10549
10550      # First remove it from the list of overridden variables, so we can test
10551      # for unknown variables in the end.
10552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10553
10554      # Check if we try to supply an empty value
10555      if test "x$SORT" = x; then
10556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10557$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10559$as_echo_n "checking for SORT... " >&6; }
10560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10561$as_echo "disabled" >&6; }
10562      else
10563        # Check if the provided tool contains a complete path.
10564        tool_specified="$SORT"
10565        tool_basename="${tool_specified##*/}"
10566        if test "x$tool_basename" = "x$tool_specified"; then
10567          # A command without a complete path is provided, search $PATH.
10568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10569$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10570          # Extract the first word of "$tool_basename", so it can be a program name with args.
10571set dummy $tool_basename; ac_word=$2
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10573$as_echo_n "checking for $ac_word... " >&6; }
10574if ${ac_cv_path_SORT+:} false; then :
10575  $as_echo_n "(cached) " >&6
10576else
10577  case $SORT in
10578  [\\/]* | ?:[\\/]*)
10579  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10580  ;;
10581  *)
10582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10583for as_dir in $PATH
10584do
10585  IFS=$as_save_IFS
10586  test -z "$as_dir" && as_dir=.
10587    for ac_exec_ext in '' $ac_executable_extensions; do
10588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10589    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10591    break 2
10592  fi
10593done
10594  done
10595IFS=$as_save_IFS
10596
10597  ;;
10598esac
10599fi
10600SORT=$ac_cv_path_SORT
10601if test -n "$SORT"; then
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10603$as_echo "$SORT" >&6; }
10604else
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607fi
10608
10609
10610          if test "x$SORT" = x; then
10611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10612          fi
10613        else
10614          # Otherwise we believe it is a complete path. Use it as it is.
10615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10616$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10618$as_echo_n "checking for SORT... " >&6; }
10619          if test ! -x "$tool_specified"; then
10620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10621$as_echo "not found" >&6; }
10622            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10623          fi
10624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10625$as_echo "$tool_specified" >&6; }
10626        fi
10627      fi
10628    fi
10629
10630  fi
10631
10632
10633
10634  if test "x$SORT" = x; then
10635    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10636  fi
10637
10638
10639
10640
10641
10642  # Publish this variable in the help.
10643
10644
10645  if [ -z "${TAIL+x}" ]; then
10646    # The variable is not set by user, try to locate tool using the code snippet
10647    for ac_prog in tail
10648do
10649  # Extract the first word of "$ac_prog", so it can be a program name with args.
10650set dummy $ac_prog; ac_word=$2
10651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10652$as_echo_n "checking for $ac_word... " >&6; }
10653if ${ac_cv_path_TAIL+:} false; then :
10654  $as_echo_n "(cached) " >&6
10655else
10656  case $TAIL in
10657  [\\/]* | ?:[\\/]*)
10658  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10659  ;;
10660  *)
10661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10662for as_dir in $PATH
10663do
10664  IFS=$as_save_IFS
10665  test -z "$as_dir" && as_dir=.
10666    for ac_exec_ext in '' $ac_executable_extensions; do
10667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10668    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10670    break 2
10671  fi
10672done
10673  done
10674IFS=$as_save_IFS
10675
10676  ;;
10677esac
10678fi
10679TAIL=$ac_cv_path_TAIL
10680if test -n "$TAIL"; then
10681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10682$as_echo "$TAIL" >&6; }
10683else
10684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10685$as_echo "no" >&6; }
10686fi
10687
10688
10689  test -n "$TAIL" && break
10690done
10691
10692  else
10693    # The variable is set, but is it from the command line or the environment?
10694
10695    # Try to remove the string !TAIL! from our list.
10696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10698      # If it failed, the variable was not from the command line. Ignore it,
10699      # but warn the user (except for BASH, which is always set by the calling BASH).
10700      if test "xTAIL" != xBASH; then
10701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10702$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10703      fi
10704      # Try to locate tool using the code snippet
10705      for ac_prog in tail
10706do
10707  # Extract the first word of "$ac_prog", so it can be a program name with args.
10708set dummy $ac_prog; ac_word=$2
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10710$as_echo_n "checking for $ac_word... " >&6; }
10711if ${ac_cv_path_TAIL+:} false; then :
10712  $as_echo_n "(cached) " >&6
10713else
10714  case $TAIL in
10715  [\\/]* | ?:[\\/]*)
10716  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10717  ;;
10718  *)
10719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10720for as_dir in $PATH
10721do
10722  IFS=$as_save_IFS
10723  test -z "$as_dir" && as_dir=.
10724    for ac_exec_ext in '' $ac_executable_extensions; do
10725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10726    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10728    break 2
10729  fi
10730done
10731  done
10732IFS=$as_save_IFS
10733
10734  ;;
10735esac
10736fi
10737TAIL=$ac_cv_path_TAIL
10738if test -n "$TAIL"; then
10739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10740$as_echo "$TAIL" >&6; }
10741else
10742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743$as_echo "no" >&6; }
10744fi
10745
10746
10747  test -n "$TAIL" && break
10748done
10749
10750    else
10751      # If it succeeded, then it was overridden by the user. We will use it
10752      # for the tool.
10753
10754      # First remove it from the list of overridden variables, so we can test
10755      # for unknown variables in the end.
10756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10757
10758      # Check if we try to supply an empty value
10759      if test "x$TAIL" = x; then
10760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10761$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10763$as_echo_n "checking for TAIL... " >&6; }
10764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10765$as_echo "disabled" >&6; }
10766      else
10767        # Check if the provided tool contains a complete path.
10768        tool_specified="$TAIL"
10769        tool_basename="${tool_specified##*/}"
10770        if test "x$tool_basename" = "x$tool_specified"; then
10771          # A command without a complete path is provided, search $PATH.
10772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10773$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10774          # Extract the first word of "$tool_basename", so it can be a program name with args.
10775set dummy $tool_basename; ac_word=$2
10776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10777$as_echo_n "checking for $ac_word... " >&6; }
10778if ${ac_cv_path_TAIL+:} false; then :
10779  $as_echo_n "(cached) " >&6
10780else
10781  case $TAIL in
10782  [\\/]* | ?:[\\/]*)
10783  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10784  ;;
10785  *)
10786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10787for as_dir in $PATH
10788do
10789  IFS=$as_save_IFS
10790  test -z "$as_dir" && as_dir=.
10791    for ac_exec_ext in '' $ac_executable_extensions; do
10792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10793    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10795    break 2
10796  fi
10797done
10798  done
10799IFS=$as_save_IFS
10800
10801  ;;
10802esac
10803fi
10804TAIL=$ac_cv_path_TAIL
10805if test -n "$TAIL"; then
10806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10807$as_echo "$TAIL" >&6; }
10808else
10809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10810$as_echo "no" >&6; }
10811fi
10812
10813
10814          if test "x$TAIL" = x; then
10815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10816          fi
10817        else
10818          # Otherwise we believe it is a complete path. Use it as it is.
10819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10820$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10822$as_echo_n "checking for TAIL... " >&6; }
10823          if test ! -x "$tool_specified"; then
10824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10825$as_echo "not found" >&6; }
10826            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10827          fi
10828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10829$as_echo "$tool_specified" >&6; }
10830        fi
10831      fi
10832    fi
10833
10834  fi
10835
10836
10837
10838  if test "x$TAIL" = x; then
10839    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10840  fi
10841
10842
10843
10844
10845
10846  # Publish this variable in the help.
10847
10848
10849  if [ -z "${TAR+x}" ]; then
10850    # The variable is not set by user, try to locate tool using the code snippet
10851    for ac_prog in tar
10852do
10853  # Extract the first word of "$ac_prog", so it can be a program name with args.
10854set dummy $ac_prog; ac_word=$2
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856$as_echo_n "checking for $ac_word... " >&6; }
10857if ${ac_cv_path_TAR+:} false; then :
10858  $as_echo_n "(cached) " >&6
10859else
10860  case $TAR in
10861  [\\/]* | ?:[\\/]*)
10862  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10863  ;;
10864  *)
10865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880  ;;
10881esac
10882fi
10883TAR=$ac_cv_path_TAR
10884if test -n "$TAR"; then
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10886$as_echo "$TAR" >&6; }
10887else
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
10890fi
10891
10892
10893  test -n "$TAR" && break
10894done
10895
10896  else
10897    # The variable is set, but is it from the command line or the environment?
10898
10899    # Try to remove the string !TAR! from our list.
10900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10902      # If it failed, the variable was not from the command line. Ignore it,
10903      # but warn the user (except for BASH, which is always set by the calling BASH).
10904      if test "xTAR" != xBASH; then
10905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10906$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10907      fi
10908      # Try to locate tool using the code snippet
10909      for ac_prog in tar
10910do
10911  # Extract the first word of "$ac_prog", so it can be a program name with args.
10912set dummy $ac_prog; ac_word=$2
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10914$as_echo_n "checking for $ac_word... " >&6; }
10915if ${ac_cv_path_TAR+:} false; then :
10916  $as_echo_n "(cached) " >&6
10917else
10918  case $TAR in
10919  [\\/]* | ?:[\\/]*)
10920  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10921  ;;
10922  *)
10923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938  ;;
10939esac
10940fi
10941TAR=$ac_cv_path_TAR
10942if test -n "$TAR"; then
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10944$as_echo "$TAR" >&6; }
10945else
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948fi
10949
10950
10951  test -n "$TAR" && break
10952done
10953
10954    else
10955      # If it succeeded, then it was overridden by the user. We will use it
10956      # for the tool.
10957
10958      # First remove it from the list of overridden variables, so we can test
10959      # for unknown variables in the end.
10960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10961
10962      # Check if we try to supply an empty value
10963      if test "x$TAR" = x; then
10964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10965$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10967$as_echo_n "checking for TAR... " >&6; }
10968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10969$as_echo "disabled" >&6; }
10970      else
10971        # Check if the provided tool contains a complete path.
10972        tool_specified="$TAR"
10973        tool_basename="${tool_specified##*/}"
10974        if test "x$tool_basename" = "x$tool_specified"; then
10975          # A command without a complete path is provided, search $PATH.
10976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10977$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10978          # Extract the first word of "$tool_basename", so it can be a program name with args.
10979set dummy $tool_basename; ac_word=$2
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10981$as_echo_n "checking for $ac_word... " >&6; }
10982if ${ac_cv_path_TAR+:} false; then :
10983  $as_echo_n "(cached) " >&6
10984else
10985  case $TAR in
10986  [\\/]* | ?:[\\/]*)
10987  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10988  ;;
10989  *)
10990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10991for as_dir in $PATH
10992do
10993  IFS=$as_save_IFS
10994  test -z "$as_dir" && as_dir=.
10995    for ac_exec_ext in '' $ac_executable_extensions; do
10996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10997    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10999    break 2
11000  fi
11001done
11002  done
11003IFS=$as_save_IFS
11004
11005  ;;
11006esac
11007fi
11008TAR=$ac_cv_path_TAR
11009if test -n "$TAR"; then
11010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11011$as_echo "$TAR" >&6; }
11012else
11013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11014$as_echo "no" >&6; }
11015fi
11016
11017
11018          if test "x$TAR" = x; then
11019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11020          fi
11021        else
11022          # Otherwise we believe it is a complete path. Use it as it is.
11023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11024$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11026$as_echo_n "checking for TAR... " >&6; }
11027          if test ! -x "$tool_specified"; then
11028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11029$as_echo "not found" >&6; }
11030            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11031          fi
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11033$as_echo "$tool_specified" >&6; }
11034        fi
11035      fi
11036    fi
11037
11038  fi
11039
11040
11041
11042  if test "x$TAR" = x; then
11043    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11044  fi
11045
11046
11047
11048
11049
11050  # Publish this variable in the help.
11051
11052
11053  if [ -z "${TEE+x}" ]; then
11054    # The variable is not set by user, try to locate tool using the code snippet
11055    for ac_prog in tee
11056do
11057  # Extract the first word of "$ac_prog", so it can be a program name with args.
11058set dummy $ac_prog; ac_word=$2
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11060$as_echo_n "checking for $ac_word... " >&6; }
11061if ${ac_cv_path_TEE+:} false; then :
11062  $as_echo_n "(cached) " >&6
11063else
11064  case $TEE in
11065  [\\/]* | ?:[\\/]*)
11066  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11067  ;;
11068  *)
11069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11070for as_dir in $PATH
11071do
11072  IFS=$as_save_IFS
11073  test -z "$as_dir" && as_dir=.
11074    for ac_exec_ext in '' $ac_executable_extensions; do
11075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11076    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11078    break 2
11079  fi
11080done
11081  done
11082IFS=$as_save_IFS
11083
11084  ;;
11085esac
11086fi
11087TEE=$ac_cv_path_TEE
11088if test -n "$TEE"; then
11089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11090$as_echo "$TEE" >&6; }
11091else
11092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11093$as_echo "no" >&6; }
11094fi
11095
11096
11097  test -n "$TEE" && break
11098done
11099
11100  else
11101    # The variable is set, but is it from the command line or the environment?
11102
11103    # Try to remove the string !TEE! from our list.
11104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11106      # If it failed, the variable was not from the command line. Ignore it,
11107      # but warn the user (except for BASH, which is always set by the calling BASH).
11108      if test "xTEE" != xBASH; then
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11110$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11111      fi
11112      # Try to locate tool using the code snippet
11113      for ac_prog in tee
11114do
11115  # Extract the first word of "$ac_prog", so it can be a program name with args.
11116set dummy $ac_prog; ac_word=$2
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11118$as_echo_n "checking for $ac_word... " >&6; }
11119if ${ac_cv_path_TEE+:} false; then :
11120  $as_echo_n "(cached) " >&6
11121else
11122  case $TEE in
11123  [\\/]* | ?:[\\/]*)
11124  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11125  ;;
11126  *)
11127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11128for as_dir in $PATH
11129do
11130  IFS=$as_save_IFS
11131  test -z "$as_dir" && as_dir=.
11132    for ac_exec_ext in '' $ac_executable_extensions; do
11133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11134    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11136    break 2
11137  fi
11138done
11139  done
11140IFS=$as_save_IFS
11141
11142  ;;
11143esac
11144fi
11145TEE=$ac_cv_path_TEE
11146if test -n "$TEE"; then
11147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11148$as_echo "$TEE" >&6; }
11149else
11150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
11152fi
11153
11154
11155  test -n "$TEE" && break
11156done
11157
11158    else
11159      # If it succeeded, then it was overridden by the user. We will use it
11160      # for the tool.
11161
11162      # First remove it from the list of overridden variables, so we can test
11163      # for unknown variables in the end.
11164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11165
11166      # Check if we try to supply an empty value
11167      if test "x$TEE" = x; then
11168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11169$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11171$as_echo_n "checking for TEE... " >&6; }
11172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11173$as_echo "disabled" >&6; }
11174      else
11175        # Check if the provided tool contains a complete path.
11176        tool_specified="$TEE"
11177        tool_basename="${tool_specified##*/}"
11178        if test "x$tool_basename" = "x$tool_specified"; then
11179          # A command without a complete path is provided, search $PATH.
11180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11181$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11182          # Extract the first word of "$tool_basename", so it can be a program name with args.
11183set dummy $tool_basename; ac_word=$2
11184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11185$as_echo_n "checking for $ac_word... " >&6; }
11186if ${ac_cv_path_TEE+:} false; then :
11187  $as_echo_n "(cached) " >&6
11188else
11189  case $TEE in
11190  [\\/]* | ?:[\\/]*)
11191  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11192  ;;
11193  *)
11194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197  IFS=$as_save_IFS
11198  test -z "$as_dir" && as_dir=.
11199    for ac_exec_ext in '' $ac_executable_extensions; do
11200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11201    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11203    break 2
11204  fi
11205done
11206  done
11207IFS=$as_save_IFS
11208
11209  ;;
11210esac
11211fi
11212TEE=$ac_cv_path_TEE
11213if test -n "$TEE"; then
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11215$as_echo "$TEE" >&6; }
11216else
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
11219fi
11220
11221
11222          if test "x$TEE" = x; then
11223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11224          fi
11225        else
11226          # Otherwise we believe it is a complete path. Use it as it is.
11227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11228$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11230$as_echo_n "checking for TEE... " >&6; }
11231          if test ! -x "$tool_specified"; then
11232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11233$as_echo "not found" >&6; }
11234            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11235          fi
11236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11237$as_echo "$tool_specified" >&6; }
11238        fi
11239      fi
11240    fi
11241
11242  fi
11243
11244
11245
11246  if test "x$TEE" = x; then
11247    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11248  fi
11249
11250
11251
11252
11253
11254  # Publish this variable in the help.
11255
11256
11257  if [ -z "${TOUCH+x}" ]; then
11258    # The variable is not set by user, try to locate tool using the code snippet
11259    for ac_prog in touch
11260do
11261  # Extract the first word of "$ac_prog", so it can be a program name with args.
11262set dummy $ac_prog; ac_word=$2
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264$as_echo_n "checking for $ac_word... " >&6; }
11265if ${ac_cv_path_TOUCH+:} false; then :
11266  $as_echo_n "(cached) " >&6
11267else
11268  case $TOUCH in
11269  [\\/]* | ?:[\\/]*)
11270  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11271  ;;
11272  *)
11273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274for as_dir in $PATH
11275do
11276  IFS=$as_save_IFS
11277  test -z "$as_dir" && as_dir=.
11278    for ac_exec_ext in '' $ac_executable_extensions; do
11279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282    break 2
11283  fi
11284done
11285  done
11286IFS=$as_save_IFS
11287
11288  ;;
11289esac
11290fi
11291TOUCH=$ac_cv_path_TOUCH
11292if test -n "$TOUCH"; then
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11294$as_echo "$TOUCH" >&6; }
11295else
11296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
11298fi
11299
11300
11301  test -n "$TOUCH" && break
11302done
11303
11304  else
11305    # The variable is set, but is it from the command line or the environment?
11306
11307    # Try to remove the string !TOUCH! from our list.
11308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11310      # If it failed, the variable was not from the command line. Ignore it,
11311      # but warn the user (except for BASH, which is always set by the calling BASH).
11312      if test "xTOUCH" != xBASH; then
11313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11314$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11315      fi
11316      # Try to locate tool using the code snippet
11317      for ac_prog in touch
11318do
11319  # Extract the first word of "$ac_prog", so it can be a program name with args.
11320set dummy $ac_prog; ac_word=$2
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11322$as_echo_n "checking for $ac_word... " >&6; }
11323if ${ac_cv_path_TOUCH+:} false; then :
11324  $as_echo_n "(cached) " >&6
11325else
11326  case $TOUCH in
11327  [\\/]* | ?:[\\/]*)
11328  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11329  ;;
11330  *)
11331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11332for as_dir in $PATH
11333do
11334  IFS=$as_save_IFS
11335  test -z "$as_dir" && as_dir=.
11336    for ac_exec_ext in '' $ac_executable_extensions; do
11337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11338    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11340    break 2
11341  fi
11342done
11343  done
11344IFS=$as_save_IFS
11345
11346  ;;
11347esac
11348fi
11349TOUCH=$ac_cv_path_TOUCH
11350if test -n "$TOUCH"; then
11351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11352$as_echo "$TOUCH" >&6; }
11353else
11354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
11356fi
11357
11358
11359  test -n "$TOUCH" && break
11360done
11361
11362    else
11363      # If it succeeded, then it was overridden by the user. We will use it
11364      # for the tool.
11365
11366      # First remove it from the list of overridden variables, so we can test
11367      # for unknown variables in the end.
11368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11369
11370      # Check if we try to supply an empty value
11371      if test "x$TOUCH" = x; then
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11373$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11375$as_echo_n "checking for TOUCH... " >&6; }
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11377$as_echo "disabled" >&6; }
11378      else
11379        # Check if the provided tool contains a complete path.
11380        tool_specified="$TOUCH"
11381        tool_basename="${tool_specified##*/}"
11382        if test "x$tool_basename" = "x$tool_specified"; then
11383          # A command without a complete path is provided, search $PATH.
11384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11385$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11386          # Extract the first word of "$tool_basename", so it can be a program name with args.
11387set dummy $tool_basename; ac_word=$2
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11389$as_echo_n "checking for $ac_word... " >&6; }
11390if ${ac_cv_path_TOUCH+:} false; then :
11391  $as_echo_n "(cached) " >&6
11392else
11393  case $TOUCH in
11394  [\\/]* | ?:[\\/]*)
11395  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11396  ;;
11397  *)
11398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11399for as_dir in $PATH
11400do
11401  IFS=$as_save_IFS
11402  test -z "$as_dir" && as_dir=.
11403    for ac_exec_ext in '' $ac_executable_extensions; do
11404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11405    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11407    break 2
11408  fi
11409done
11410  done
11411IFS=$as_save_IFS
11412
11413  ;;
11414esac
11415fi
11416TOUCH=$ac_cv_path_TOUCH
11417if test -n "$TOUCH"; then
11418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11419$as_echo "$TOUCH" >&6; }
11420else
11421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
11423fi
11424
11425
11426          if test "x$TOUCH" = x; then
11427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11428          fi
11429        else
11430          # Otherwise we believe it is a complete path. Use it as it is.
11431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11432$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11434$as_echo_n "checking for TOUCH... " >&6; }
11435          if test ! -x "$tool_specified"; then
11436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11437$as_echo "not found" >&6; }
11438            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11439          fi
11440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11441$as_echo "$tool_specified" >&6; }
11442        fi
11443      fi
11444    fi
11445
11446  fi
11447
11448
11449
11450  if test "x$TOUCH" = x; then
11451    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11452  fi
11453
11454
11455
11456
11457
11458  # Publish this variable in the help.
11459
11460
11461  if [ -z "${TR+x}" ]; then
11462    # The variable is not set by user, try to locate tool using the code snippet
11463    for ac_prog in tr
11464do
11465  # Extract the first word of "$ac_prog", so it can be a program name with args.
11466set dummy $ac_prog; ac_word=$2
11467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11468$as_echo_n "checking for $ac_word... " >&6; }
11469if ${ac_cv_path_TR+:} false; then :
11470  $as_echo_n "(cached) " >&6
11471else
11472  case $TR in
11473  [\\/]* | ?:[\\/]*)
11474  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11475  ;;
11476  *)
11477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11478for as_dir in $PATH
11479do
11480  IFS=$as_save_IFS
11481  test -z "$as_dir" && as_dir=.
11482    for ac_exec_ext in '' $ac_executable_extensions; do
11483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11484    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11486    break 2
11487  fi
11488done
11489  done
11490IFS=$as_save_IFS
11491
11492  ;;
11493esac
11494fi
11495TR=$ac_cv_path_TR
11496if test -n "$TR"; then
11497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11498$as_echo "$TR" >&6; }
11499else
11500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
11502fi
11503
11504
11505  test -n "$TR" && break
11506done
11507
11508  else
11509    # The variable is set, but is it from the command line or the environment?
11510
11511    # Try to remove the string !TR! from our list.
11512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11514      # If it failed, the variable was not from the command line. Ignore it,
11515      # but warn the user (except for BASH, which is always set by the calling BASH).
11516      if test "xTR" != xBASH; then
11517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11518$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11519      fi
11520      # Try to locate tool using the code snippet
11521      for ac_prog in tr
11522do
11523  # Extract the first word of "$ac_prog", so it can be a program name with args.
11524set dummy $ac_prog; ac_word=$2
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11526$as_echo_n "checking for $ac_word... " >&6; }
11527if ${ac_cv_path_TR+:} false; then :
11528  $as_echo_n "(cached) " >&6
11529else
11530  case $TR in
11531  [\\/]* | ?:[\\/]*)
11532  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11533  ;;
11534  *)
11535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11536for as_dir in $PATH
11537do
11538  IFS=$as_save_IFS
11539  test -z "$as_dir" && as_dir=.
11540    for ac_exec_ext in '' $ac_executable_extensions; do
11541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11542    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11544    break 2
11545  fi
11546done
11547  done
11548IFS=$as_save_IFS
11549
11550  ;;
11551esac
11552fi
11553TR=$ac_cv_path_TR
11554if test -n "$TR"; then
11555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11556$as_echo "$TR" >&6; }
11557else
11558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
11560fi
11561
11562
11563  test -n "$TR" && break
11564done
11565
11566    else
11567      # If it succeeded, then it was overridden by the user. We will use it
11568      # for the tool.
11569
11570      # First remove it from the list of overridden variables, so we can test
11571      # for unknown variables in the end.
11572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11573
11574      # Check if we try to supply an empty value
11575      if test "x$TR" = x; then
11576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11577$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11579$as_echo_n "checking for TR... " >&6; }
11580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11581$as_echo "disabled" >&6; }
11582      else
11583        # Check if the provided tool contains a complete path.
11584        tool_specified="$TR"
11585        tool_basename="${tool_specified##*/}"
11586        if test "x$tool_basename" = "x$tool_specified"; then
11587          # A command without a complete path is provided, search $PATH.
11588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11589$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11590          # Extract the first word of "$tool_basename", so it can be a program name with args.
11591set dummy $tool_basename; ac_word=$2
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11593$as_echo_n "checking for $ac_word... " >&6; }
11594if ${ac_cv_path_TR+:} false; then :
11595  $as_echo_n "(cached) " >&6
11596else
11597  case $TR in
11598  [\\/]* | ?:[\\/]*)
11599  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11600  ;;
11601  *)
11602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11603for as_dir in $PATH
11604do
11605  IFS=$as_save_IFS
11606  test -z "$as_dir" && as_dir=.
11607    for ac_exec_ext in '' $ac_executable_extensions; do
11608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11609    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11611    break 2
11612  fi
11613done
11614  done
11615IFS=$as_save_IFS
11616
11617  ;;
11618esac
11619fi
11620TR=$ac_cv_path_TR
11621if test -n "$TR"; then
11622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11623$as_echo "$TR" >&6; }
11624else
11625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11626$as_echo "no" >&6; }
11627fi
11628
11629
11630          if test "x$TR" = x; then
11631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11632          fi
11633        else
11634          # Otherwise we believe it is a complete path. Use it as it is.
11635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11636$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11638$as_echo_n "checking for TR... " >&6; }
11639          if test ! -x "$tool_specified"; then
11640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11641$as_echo "not found" >&6; }
11642            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11643          fi
11644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11645$as_echo "$tool_specified" >&6; }
11646        fi
11647      fi
11648    fi
11649
11650  fi
11651
11652
11653
11654  if test "x$TR" = x; then
11655    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11656  fi
11657
11658
11659
11660
11661
11662  # Publish this variable in the help.
11663
11664
11665  if [ -z "${UNAME+x}" ]; then
11666    # The variable is not set by user, try to locate tool using the code snippet
11667    for ac_prog in uname
11668do
11669  # Extract the first word of "$ac_prog", so it can be a program name with args.
11670set dummy $ac_prog; ac_word=$2
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11672$as_echo_n "checking for $ac_word... " >&6; }
11673if ${ac_cv_path_UNAME+:} false; then :
11674  $as_echo_n "(cached) " >&6
11675else
11676  case $UNAME in
11677  [\\/]* | ?:[\\/]*)
11678  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11679  ;;
11680  *)
11681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11682for as_dir in $PATH
11683do
11684  IFS=$as_save_IFS
11685  test -z "$as_dir" && as_dir=.
11686    for ac_exec_ext in '' $ac_executable_extensions; do
11687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11688    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11690    break 2
11691  fi
11692done
11693  done
11694IFS=$as_save_IFS
11695
11696  ;;
11697esac
11698fi
11699UNAME=$ac_cv_path_UNAME
11700if test -n "$UNAME"; then
11701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11702$as_echo "$UNAME" >&6; }
11703else
11704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11705$as_echo "no" >&6; }
11706fi
11707
11708
11709  test -n "$UNAME" && break
11710done
11711
11712  else
11713    # The variable is set, but is it from the command line or the environment?
11714
11715    # Try to remove the string !UNAME! from our list.
11716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11718      # If it failed, the variable was not from the command line. Ignore it,
11719      # but warn the user (except for BASH, which is always set by the calling BASH).
11720      if test "xUNAME" != xBASH; then
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11722$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11723      fi
11724      # Try to locate tool using the code snippet
11725      for ac_prog in uname
11726do
11727  # Extract the first word of "$ac_prog", so it can be a program name with args.
11728set dummy $ac_prog; ac_word=$2
11729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11730$as_echo_n "checking for $ac_word... " >&6; }
11731if ${ac_cv_path_UNAME+:} false; then :
11732  $as_echo_n "(cached) " >&6
11733else
11734  case $UNAME in
11735  [\\/]* | ?:[\\/]*)
11736  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11737  ;;
11738  *)
11739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11740for as_dir in $PATH
11741do
11742  IFS=$as_save_IFS
11743  test -z "$as_dir" && as_dir=.
11744    for ac_exec_ext in '' $ac_executable_extensions; do
11745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11746    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11748    break 2
11749  fi
11750done
11751  done
11752IFS=$as_save_IFS
11753
11754  ;;
11755esac
11756fi
11757UNAME=$ac_cv_path_UNAME
11758if test -n "$UNAME"; then
11759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11760$as_echo "$UNAME" >&6; }
11761else
11762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
11764fi
11765
11766
11767  test -n "$UNAME" && break
11768done
11769
11770    else
11771      # If it succeeded, then it was overridden by the user. We will use it
11772      # for the tool.
11773
11774      # First remove it from the list of overridden variables, so we can test
11775      # for unknown variables in the end.
11776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11777
11778      # Check if we try to supply an empty value
11779      if test "x$UNAME" = x; then
11780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11781$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11783$as_echo_n "checking for UNAME... " >&6; }
11784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11785$as_echo "disabled" >&6; }
11786      else
11787        # Check if the provided tool contains a complete path.
11788        tool_specified="$UNAME"
11789        tool_basename="${tool_specified##*/}"
11790        if test "x$tool_basename" = "x$tool_specified"; then
11791          # A command without a complete path is provided, search $PATH.
11792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11793$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11794          # Extract the first word of "$tool_basename", so it can be a program name with args.
11795set dummy $tool_basename; ac_word=$2
11796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11797$as_echo_n "checking for $ac_word... " >&6; }
11798if ${ac_cv_path_UNAME+:} false; then :
11799  $as_echo_n "(cached) " >&6
11800else
11801  case $UNAME in
11802  [\\/]* | ?:[\\/]*)
11803  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11804  ;;
11805  *)
11806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11807for as_dir in $PATH
11808do
11809  IFS=$as_save_IFS
11810  test -z "$as_dir" && as_dir=.
11811    for ac_exec_ext in '' $ac_executable_extensions; do
11812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11813    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11815    break 2
11816  fi
11817done
11818  done
11819IFS=$as_save_IFS
11820
11821  ;;
11822esac
11823fi
11824UNAME=$ac_cv_path_UNAME
11825if test -n "$UNAME"; then
11826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11827$as_echo "$UNAME" >&6; }
11828else
11829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11830$as_echo "no" >&6; }
11831fi
11832
11833
11834          if test "x$UNAME" = x; then
11835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11836          fi
11837        else
11838          # Otherwise we believe it is a complete path. Use it as it is.
11839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11840$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11842$as_echo_n "checking for UNAME... " >&6; }
11843          if test ! -x "$tool_specified"; then
11844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11845$as_echo "not found" >&6; }
11846            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11847          fi
11848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11849$as_echo "$tool_specified" >&6; }
11850        fi
11851      fi
11852    fi
11853
11854  fi
11855
11856
11857
11858  if test "x$UNAME" = x; then
11859    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11860  fi
11861
11862
11863
11864
11865
11866  # Publish this variable in the help.
11867
11868
11869  if [ -z "${UNIQ+x}" ]; then
11870    # The variable is not set by user, try to locate tool using the code snippet
11871    for ac_prog in uniq
11872do
11873  # Extract the first word of "$ac_prog", so it can be a program name with args.
11874set dummy $ac_prog; ac_word=$2
11875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11876$as_echo_n "checking for $ac_word... " >&6; }
11877if ${ac_cv_path_UNIQ+:} false; then :
11878  $as_echo_n "(cached) " >&6
11879else
11880  case $UNIQ in
11881  [\\/]* | ?:[\\/]*)
11882  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11883  ;;
11884  *)
11885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11886for as_dir in $PATH
11887do
11888  IFS=$as_save_IFS
11889  test -z "$as_dir" && as_dir=.
11890    for ac_exec_ext in '' $ac_executable_extensions; do
11891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11892    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11894    break 2
11895  fi
11896done
11897  done
11898IFS=$as_save_IFS
11899
11900  ;;
11901esac
11902fi
11903UNIQ=$ac_cv_path_UNIQ
11904if test -n "$UNIQ"; then
11905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11906$as_echo "$UNIQ" >&6; }
11907else
11908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11909$as_echo "no" >&6; }
11910fi
11911
11912
11913  test -n "$UNIQ" && break
11914done
11915
11916  else
11917    # The variable is set, but is it from the command line or the environment?
11918
11919    # Try to remove the string !UNIQ! from our list.
11920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11922      # If it failed, the variable was not from the command line. Ignore it,
11923      # but warn the user (except for BASH, which is always set by the calling BASH).
11924      if test "xUNIQ" != xBASH; then
11925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11926$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11927      fi
11928      # Try to locate tool using the code snippet
11929      for ac_prog in uniq
11930do
11931  # Extract the first word of "$ac_prog", so it can be a program name with args.
11932set dummy $ac_prog; ac_word=$2
11933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11934$as_echo_n "checking for $ac_word... " >&6; }
11935if ${ac_cv_path_UNIQ+:} false; then :
11936  $as_echo_n "(cached) " >&6
11937else
11938  case $UNIQ in
11939  [\\/]* | ?:[\\/]*)
11940  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11941  ;;
11942  *)
11943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11944for as_dir in $PATH
11945do
11946  IFS=$as_save_IFS
11947  test -z "$as_dir" && as_dir=.
11948    for ac_exec_ext in '' $ac_executable_extensions; do
11949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11950    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11952    break 2
11953  fi
11954done
11955  done
11956IFS=$as_save_IFS
11957
11958  ;;
11959esac
11960fi
11961UNIQ=$ac_cv_path_UNIQ
11962if test -n "$UNIQ"; then
11963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11964$as_echo "$UNIQ" >&6; }
11965else
11966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967$as_echo "no" >&6; }
11968fi
11969
11970
11971  test -n "$UNIQ" && break
11972done
11973
11974    else
11975      # If it succeeded, then it was overridden by the user. We will use it
11976      # for the tool.
11977
11978      # First remove it from the list of overridden variables, so we can test
11979      # for unknown variables in the end.
11980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11981
11982      # Check if we try to supply an empty value
11983      if test "x$UNIQ" = x; then
11984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11985$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11987$as_echo_n "checking for UNIQ... " >&6; }
11988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11989$as_echo "disabled" >&6; }
11990      else
11991        # Check if the provided tool contains a complete path.
11992        tool_specified="$UNIQ"
11993        tool_basename="${tool_specified##*/}"
11994        if test "x$tool_basename" = "x$tool_specified"; then
11995          # A command without a complete path is provided, search $PATH.
11996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11997$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11998          # Extract the first word of "$tool_basename", so it can be a program name with args.
11999set dummy $tool_basename; ac_word=$2
12000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12001$as_echo_n "checking for $ac_word... " >&6; }
12002if ${ac_cv_path_UNIQ+:} false; then :
12003  $as_echo_n "(cached) " >&6
12004else
12005  case $UNIQ in
12006  [\\/]* | ?:[\\/]*)
12007  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12008  ;;
12009  *)
12010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12011for as_dir in $PATH
12012do
12013  IFS=$as_save_IFS
12014  test -z "$as_dir" && as_dir=.
12015    for ac_exec_ext in '' $ac_executable_extensions; do
12016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12017    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12019    break 2
12020  fi
12021done
12022  done
12023IFS=$as_save_IFS
12024
12025  ;;
12026esac
12027fi
12028UNIQ=$ac_cv_path_UNIQ
12029if test -n "$UNIQ"; then
12030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12031$as_echo "$UNIQ" >&6; }
12032else
12033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12034$as_echo "no" >&6; }
12035fi
12036
12037
12038          if test "x$UNIQ" = x; then
12039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12040          fi
12041        else
12042          # Otherwise we believe it is a complete path. Use it as it is.
12043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12044$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12046$as_echo_n "checking for UNIQ... " >&6; }
12047          if test ! -x "$tool_specified"; then
12048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12049$as_echo "not found" >&6; }
12050            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12051          fi
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12053$as_echo "$tool_specified" >&6; }
12054        fi
12055      fi
12056    fi
12057
12058  fi
12059
12060
12061
12062  if test "x$UNIQ" = x; then
12063    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12064  fi
12065
12066
12067
12068
12069
12070  # Publish this variable in the help.
12071
12072
12073  if [ -z "${WC+x}" ]; then
12074    # The variable is not set by user, try to locate tool using the code snippet
12075    for ac_prog in wc
12076do
12077  # Extract the first word of "$ac_prog", so it can be a program name with args.
12078set dummy $ac_prog; ac_word=$2
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12080$as_echo_n "checking for $ac_word... " >&6; }
12081if ${ac_cv_path_WC+:} false; then :
12082  $as_echo_n "(cached) " >&6
12083else
12084  case $WC in
12085  [\\/]* | ?:[\\/]*)
12086  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12087  ;;
12088  *)
12089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12090for as_dir in $PATH
12091do
12092  IFS=$as_save_IFS
12093  test -z "$as_dir" && as_dir=.
12094    for ac_exec_ext in '' $ac_executable_extensions; do
12095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12096    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12098    break 2
12099  fi
12100done
12101  done
12102IFS=$as_save_IFS
12103
12104  ;;
12105esac
12106fi
12107WC=$ac_cv_path_WC
12108if test -n "$WC"; then
12109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12110$as_echo "$WC" >&6; }
12111else
12112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12113$as_echo "no" >&6; }
12114fi
12115
12116
12117  test -n "$WC" && break
12118done
12119
12120  else
12121    # The variable is set, but is it from the command line or the environment?
12122
12123    # Try to remove the string !WC! from our list.
12124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12126      # If it failed, the variable was not from the command line. Ignore it,
12127      # but warn the user (except for BASH, which is always set by the calling BASH).
12128      if test "xWC" != xBASH; then
12129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12130$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12131      fi
12132      # Try to locate tool using the code snippet
12133      for ac_prog in wc
12134do
12135  # Extract the first word of "$ac_prog", so it can be a program name with args.
12136set dummy $ac_prog; ac_word=$2
12137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12138$as_echo_n "checking for $ac_word... " >&6; }
12139if ${ac_cv_path_WC+:} false; then :
12140  $as_echo_n "(cached) " >&6
12141else
12142  case $WC in
12143  [\\/]* | ?:[\\/]*)
12144  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12145  ;;
12146  *)
12147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12148for as_dir in $PATH
12149do
12150  IFS=$as_save_IFS
12151  test -z "$as_dir" && as_dir=.
12152    for ac_exec_ext in '' $ac_executable_extensions; do
12153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12154    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12156    break 2
12157  fi
12158done
12159  done
12160IFS=$as_save_IFS
12161
12162  ;;
12163esac
12164fi
12165WC=$ac_cv_path_WC
12166if test -n "$WC"; then
12167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12168$as_echo "$WC" >&6; }
12169else
12170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12171$as_echo "no" >&6; }
12172fi
12173
12174
12175  test -n "$WC" && break
12176done
12177
12178    else
12179      # If it succeeded, then it was overridden by the user. We will use it
12180      # for the tool.
12181
12182      # First remove it from the list of overridden variables, so we can test
12183      # for unknown variables in the end.
12184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12185
12186      # Check if we try to supply an empty value
12187      if test "x$WC" = x; then
12188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12189$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12191$as_echo_n "checking for WC... " >&6; }
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12193$as_echo "disabled" >&6; }
12194      else
12195        # Check if the provided tool contains a complete path.
12196        tool_specified="$WC"
12197        tool_basename="${tool_specified##*/}"
12198        if test "x$tool_basename" = "x$tool_specified"; then
12199          # A command without a complete path is provided, search $PATH.
12200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12201$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12202          # Extract the first word of "$tool_basename", so it can be a program name with args.
12203set dummy $tool_basename; ac_word=$2
12204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12205$as_echo_n "checking for $ac_word... " >&6; }
12206if ${ac_cv_path_WC+:} false; then :
12207  $as_echo_n "(cached) " >&6
12208else
12209  case $WC in
12210  [\\/]* | ?:[\\/]*)
12211  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12212  ;;
12213  *)
12214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12215for as_dir in $PATH
12216do
12217  IFS=$as_save_IFS
12218  test -z "$as_dir" && as_dir=.
12219    for ac_exec_ext in '' $ac_executable_extensions; do
12220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12221    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12223    break 2
12224  fi
12225done
12226  done
12227IFS=$as_save_IFS
12228
12229  ;;
12230esac
12231fi
12232WC=$ac_cv_path_WC
12233if test -n "$WC"; then
12234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12235$as_echo "$WC" >&6; }
12236else
12237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12238$as_echo "no" >&6; }
12239fi
12240
12241
12242          if test "x$WC" = x; then
12243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12244          fi
12245        else
12246          # Otherwise we believe it is a complete path. Use it as it is.
12247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12248$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12250$as_echo_n "checking for WC... " >&6; }
12251          if test ! -x "$tool_specified"; then
12252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12253$as_echo "not found" >&6; }
12254            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12255          fi
12256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12257$as_echo "$tool_specified" >&6; }
12258        fi
12259      fi
12260    fi
12261
12262  fi
12263
12264
12265
12266  if test "x$WC" = x; then
12267    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12268  fi
12269
12270
12271
12272
12273
12274  # Publish this variable in the help.
12275
12276
12277  if [ -z "${WHICH+x}" ]; then
12278    # The variable is not set by user, try to locate tool using the code snippet
12279    for ac_prog in which
12280do
12281  # Extract the first word of "$ac_prog", so it can be a program name with args.
12282set dummy $ac_prog; ac_word=$2
12283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12284$as_echo_n "checking for $ac_word... " >&6; }
12285if ${ac_cv_path_WHICH+:} false; then :
12286  $as_echo_n "(cached) " >&6
12287else
12288  case $WHICH in
12289  [\\/]* | ?:[\\/]*)
12290  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12291  ;;
12292  *)
12293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12294for as_dir in $PATH
12295do
12296  IFS=$as_save_IFS
12297  test -z "$as_dir" && as_dir=.
12298    for ac_exec_ext in '' $ac_executable_extensions; do
12299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12300    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12302    break 2
12303  fi
12304done
12305  done
12306IFS=$as_save_IFS
12307
12308  ;;
12309esac
12310fi
12311WHICH=$ac_cv_path_WHICH
12312if test -n "$WHICH"; then
12313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12314$as_echo "$WHICH" >&6; }
12315else
12316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12317$as_echo "no" >&6; }
12318fi
12319
12320
12321  test -n "$WHICH" && break
12322done
12323
12324  else
12325    # The variable is set, but is it from the command line or the environment?
12326
12327    # Try to remove the string !WHICH! from our list.
12328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12330      # If it failed, the variable was not from the command line. Ignore it,
12331      # but warn the user (except for BASH, which is always set by the calling BASH).
12332      if test "xWHICH" != xBASH; then
12333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12334$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12335      fi
12336      # Try to locate tool using the code snippet
12337      for ac_prog in which
12338do
12339  # Extract the first word of "$ac_prog", so it can be a program name with args.
12340set dummy $ac_prog; ac_word=$2
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12342$as_echo_n "checking for $ac_word... " >&6; }
12343if ${ac_cv_path_WHICH+:} false; then :
12344  $as_echo_n "(cached) " >&6
12345else
12346  case $WHICH in
12347  [\\/]* | ?:[\\/]*)
12348  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12349  ;;
12350  *)
12351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12352for as_dir in $PATH
12353do
12354  IFS=$as_save_IFS
12355  test -z "$as_dir" && as_dir=.
12356    for ac_exec_ext in '' $ac_executable_extensions; do
12357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12358    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12360    break 2
12361  fi
12362done
12363  done
12364IFS=$as_save_IFS
12365
12366  ;;
12367esac
12368fi
12369WHICH=$ac_cv_path_WHICH
12370if test -n "$WHICH"; then
12371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12372$as_echo "$WHICH" >&6; }
12373else
12374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
12376fi
12377
12378
12379  test -n "$WHICH" && break
12380done
12381
12382    else
12383      # If it succeeded, then it was overridden by the user. We will use it
12384      # for the tool.
12385
12386      # First remove it from the list of overridden variables, so we can test
12387      # for unknown variables in the end.
12388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12389
12390      # Check if we try to supply an empty value
12391      if test "x$WHICH" = x; then
12392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12393$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12395$as_echo_n "checking for WHICH... " >&6; }
12396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12397$as_echo "disabled" >&6; }
12398      else
12399        # Check if the provided tool contains a complete path.
12400        tool_specified="$WHICH"
12401        tool_basename="${tool_specified##*/}"
12402        if test "x$tool_basename" = "x$tool_specified"; then
12403          # A command without a complete path is provided, search $PATH.
12404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12405$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12406          # Extract the first word of "$tool_basename", so it can be a program name with args.
12407set dummy $tool_basename; ac_word=$2
12408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12409$as_echo_n "checking for $ac_word... " >&6; }
12410if ${ac_cv_path_WHICH+:} false; then :
12411  $as_echo_n "(cached) " >&6
12412else
12413  case $WHICH in
12414  [\\/]* | ?:[\\/]*)
12415  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12416  ;;
12417  *)
12418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12419for as_dir in $PATH
12420do
12421  IFS=$as_save_IFS
12422  test -z "$as_dir" && as_dir=.
12423    for ac_exec_ext in '' $ac_executable_extensions; do
12424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12425    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12427    break 2
12428  fi
12429done
12430  done
12431IFS=$as_save_IFS
12432
12433  ;;
12434esac
12435fi
12436WHICH=$ac_cv_path_WHICH
12437if test -n "$WHICH"; then
12438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12439$as_echo "$WHICH" >&6; }
12440else
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12442$as_echo "no" >&6; }
12443fi
12444
12445
12446          if test "x$WHICH" = x; then
12447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12448          fi
12449        else
12450          # Otherwise we believe it is a complete path. Use it as it is.
12451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12452$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12454$as_echo_n "checking for WHICH... " >&6; }
12455          if test ! -x "$tool_specified"; then
12456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12457$as_echo "not found" >&6; }
12458            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12459          fi
12460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12461$as_echo "$tool_specified" >&6; }
12462        fi
12463      fi
12464    fi
12465
12466  fi
12467
12468
12469
12470  if test "x$WHICH" = x; then
12471    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12472  fi
12473
12474
12475
12476
12477
12478  # Publish this variable in the help.
12479
12480
12481  if [ -z "${XARGS+x}" ]; then
12482    # The variable is not set by user, try to locate tool using the code snippet
12483    for ac_prog in xargs
12484do
12485  # Extract the first word of "$ac_prog", so it can be a program name with args.
12486set dummy $ac_prog; ac_word=$2
12487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12488$as_echo_n "checking for $ac_word... " >&6; }
12489if ${ac_cv_path_XARGS+:} false; then :
12490  $as_echo_n "(cached) " >&6
12491else
12492  case $XARGS in
12493  [\\/]* | ?:[\\/]*)
12494  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12495  ;;
12496  *)
12497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12498for as_dir in $PATH
12499do
12500  IFS=$as_save_IFS
12501  test -z "$as_dir" && as_dir=.
12502    for ac_exec_ext in '' $ac_executable_extensions; do
12503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12504    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12506    break 2
12507  fi
12508done
12509  done
12510IFS=$as_save_IFS
12511
12512  ;;
12513esac
12514fi
12515XARGS=$ac_cv_path_XARGS
12516if test -n "$XARGS"; then
12517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12518$as_echo "$XARGS" >&6; }
12519else
12520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12521$as_echo "no" >&6; }
12522fi
12523
12524
12525  test -n "$XARGS" && break
12526done
12527
12528  else
12529    # The variable is set, but is it from the command line or the environment?
12530
12531    # Try to remove the string !XARGS! from our list.
12532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12534      # If it failed, the variable was not from the command line. Ignore it,
12535      # but warn the user (except for BASH, which is always set by the calling BASH).
12536      if test "xXARGS" != xBASH; then
12537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12538$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12539      fi
12540      # Try to locate tool using the code snippet
12541      for ac_prog in xargs
12542do
12543  # Extract the first word of "$ac_prog", so it can be a program name with args.
12544set dummy $ac_prog; ac_word=$2
12545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12546$as_echo_n "checking for $ac_word... " >&6; }
12547if ${ac_cv_path_XARGS+:} false; then :
12548  $as_echo_n "(cached) " >&6
12549else
12550  case $XARGS in
12551  [\\/]* | ?:[\\/]*)
12552  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12553  ;;
12554  *)
12555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12556for as_dir in $PATH
12557do
12558  IFS=$as_save_IFS
12559  test -z "$as_dir" && as_dir=.
12560    for ac_exec_ext in '' $ac_executable_extensions; do
12561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12562    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12564    break 2
12565  fi
12566done
12567  done
12568IFS=$as_save_IFS
12569
12570  ;;
12571esac
12572fi
12573XARGS=$ac_cv_path_XARGS
12574if test -n "$XARGS"; then
12575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12576$as_echo "$XARGS" >&6; }
12577else
12578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12579$as_echo "no" >&6; }
12580fi
12581
12582
12583  test -n "$XARGS" && break
12584done
12585
12586    else
12587      # If it succeeded, then it was overridden by the user. We will use it
12588      # for the tool.
12589
12590      # First remove it from the list of overridden variables, so we can test
12591      # for unknown variables in the end.
12592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12593
12594      # Check if we try to supply an empty value
12595      if test "x$XARGS" = x; then
12596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12597$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12599$as_echo_n "checking for XARGS... " >&6; }
12600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12601$as_echo "disabled" >&6; }
12602      else
12603        # Check if the provided tool contains a complete path.
12604        tool_specified="$XARGS"
12605        tool_basename="${tool_specified##*/}"
12606        if test "x$tool_basename" = "x$tool_specified"; then
12607          # A command without a complete path is provided, search $PATH.
12608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12609$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12610          # Extract the first word of "$tool_basename", so it can be a program name with args.
12611set dummy $tool_basename; ac_word=$2
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12613$as_echo_n "checking for $ac_word... " >&6; }
12614if ${ac_cv_path_XARGS+:} false; then :
12615  $as_echo_n "(cached) " >&6
12616else
12617  case $XARGS in
12618  [\\/]* | ?:[\\/]*)
12619  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12620  ;;
12621  *)
12622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12623for as_dir in $PATH
12624do
12625  IFS=$as_save_IFS
12626  test -z "$as_dir" && as_dir=.
12627    for ac_exec_ext in '' $ac_executable_extensions; do
12628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12629    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12631    break 2
12632  fi
12633done
12634  done
12635IFS=$as_save_IFS
12636
12637  ;;
12638esac
12639fi
12640XARGS=$ac_cv_path_XARGS
12641if test -n "$XARGS"; then
12642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12643$as_echo "$XARGS" >&6; }
12644else
12645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12646$as_echo "no" >&6; }
12647fi
12648
12649
12650          if test "x$XARGS" = x; then
12651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12652          fi
12653        else
12654          # Otherwise we believe it is a complete path. Use it as it is.
12655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12656$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12658$as_echo_n "checking for XARGS... " >&6; }
12659          if test ! -x "$tool_specified"; then
12660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12661$as_echo "not found" >&6; }
12662            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12663          fi
12664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12665$as_echo "$tool_specified" >&6; }
12666        fi
12667      fi
12668    fi
12669
12670  fi
12671
12672
12673
12674  if test "x$XARGS" = x; then
12675    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12676  fi
12677
12678
12679
12680  # Then required tools that require some special treatment.
12681
12682
12683  # Publish this variable in the help.
12684
12685
12686  if [ -z "${AWK+x}" ]; then
12687    # The variable is not set by user, try to locate tool using the code snippet
12688    for ac_prog in gawk mawk nawk awk
12689do
12690  # Extract the first word of "$ac_prog", so it can be a program name with args.
12691set dummy $ac_prog; ac_word=$2
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12693$as_echo_n "checking for $ac_word... " >&6; }
12694if ${ac_cv_prog_AWK+:} false; then :
12695  $as_echo_n "(cached) " >&6
12696else
12697  if test -n "$AWK"; then
12698  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12699else
12700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_prog_AWK="$ac_prog"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715fi
12716fi
12717AWK=$ac_cv_prog_AWK
12718if test -n "$AWK"; then
12719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12720$as_echo "$AWK" >&6; }
12721else
12722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
12724fi
12725
12726
12727  test -n "$AWK" && break
12728done
12729
12730  else
12731    # The variable is set, but is it from the command line or the environment?
12732
12733    # Try to remove the string !AWK! from our list.
12734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12736      # If it failed, the variable was not from the command line. Ignore it,
12737      # but warn the user (except for BASH, which is always set by the calling BASH).
12738      if test "xAWK" != xBASH; then
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12740$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12741      fi
12742      # Try to locate tool using the code snippet
12743      for ac_prog in gawk mawk nawk awk
12744do
12745  # Extract the first word of "$ac_prog", so it can be a program name with args.
12746set dummy $ac_prog; ac_word=$2
12747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12748$as_echo_n "checking for $ac_word... " >&6; }
12749if ${ac_cv_prog_AWK+:} false; then :
12750  $as_echo_n "(cached) " >&6
12751else
12752  if test -n "$AWK"; then
12753  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12754else
12755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12756for as_dir in $PATH
12757do
12758  IFS=$as_save_IFS
12759  test -z "$as_dir" && as_dir=.
12760    for ac_exec_ext in '' $ac_executable_extensions; do
12761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12762    ac_cv_prog_AWK="$ac_prog"
12763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12764    break 2
12765  fi
12766done
12767  done
12768IFS=$as_save_IFS
12769
12770fi
12771fi
12772AWK=$ac_cv_prog_AWK
12773if test -n "$AWK"; then
12774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12775$as_echo "$AWK" >&6; }
12776else
12777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12778$as_echo "no" >&6; }
12779fi
12780
12781
12782  test -n "$AWK" && break
12783done
12784
12785    else
12786      # If it succeeded, then it was overridden by the user. We will use it
12787      # for the tool.
12788
12789      # First remove it from the list of overridden variables, so we can test
12790      # for unknown variables in the end.
12791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12792
12793      # Check if we try to supply an empty value
12794      if test "x$AWK" = x; then
12795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12796$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12798$as_echo_n "checking for AWK... " >&6; }
12799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12800$as_echo "disabled" >&6; }
12801      else
12802        # Check if the provided tool contains a complete path.
12803        tool_specified="$AWK"
12804        tool_basename="${tool_specified##*/}"
12805        if test "x$tool_basename" = "x$tool_specified"; then
12806          # A command without a complete path is provided, search $PATH.
12807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12808$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12809          # Extract the first word of "$tool_basename", so it can be a program name with args.
12810set dummy $tool_basename; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_AWK+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $AWK in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839AWK=$ac_cv_path_AWK
12840if test -n "$AWK"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12842$as_echo "$AWK" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849          if test "x$AWK" = x; then
12850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12851          fi
12852        else
12853          # Otherwise we believe it is a complete path. Use it as it is.
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12855$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12857$as_echo_n "checking for AWK... " >&6; }
12858          if test ! -x "$tool_specified"; then
12859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12860$as_echo "not found" >&6; }
12861            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12862          fi
12863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12864$as_echo "$tool_specified" >&6; }
12865        fi
12866      fi
12867    fi
12868
12869  fi
12870
12871
12872  if test "x$AWK" = x; then
12873    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12874  fi
12875
12876
12877
12878
12879  # Publish this variable in the help.
12880
12881
12882  if [ -z "${GREP+x}" ]; then
12883    # The variable is not set by user, try to locate tool using the code snippet
12884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12885$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12886if ${ac_cv_path_GREP+:} false; then :
12887  $as_echo_n "(cached) " >&6
12888else
12889  if test -z "$GREP"; then
12890  ac_path_GREP_found=false
12891  # Loop through the user's path and test for each of PROGNAME-LIST
12892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12893for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12894do
12895  IFS=$as_save_IFS
12896  test -z "$as_dir" && as_dir=.
12897    for ac_prog in grep ggrep; do
12898    for ac_exec_ext in '' $ac_executable_extensions; do
12899      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12900      as_fn_executable_p "$ac_path_GREP" || continue
12901# Check for GNU ac_path_GREP and select it if it is found.
12902  # Check for GNU $ac_path_GREP
12903case `"$ac_path_GREP" --version 2>&1` in
12904*GNU*)
12905  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12906*)
12907  ac_count=0
12908  $as_echo_n 0123456789 >"conftest.in"
12909  while :
12910  do
12911    cat "conftest.in" "conftest.in" >"conftest.tmp"
12912    mv "conftest.tmp" "conftest.in"
12913    cp "conftest.in" "conftest.nl"
12914    $as_echo 'GREP' >> "conftest.nl"
12915    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12916    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12917    as_fn_arith $ac_count + 1 && ac_count=$as_val
12918    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12919      # Best one so far, save it but keep looking for a better one
12920      ac_cv_path_GREP="$ac_path_GREP"
12921      ac_path_GREP_max=$ac_count
12922    fi
12923    # 10*(2^10) chars as input seems more than enough
12924    test $ac_count -gt 10 && break
12925  done
12926  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12927esac
12928
12929      $ac_path_GREP_found && break 3
12930    done
12931  done
12932  done
12933IFS=$as_save_IFS
12934  if test -z "$ac_cv_path_GREP"; then
12935    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12936  fi
12937else
12938  ac_cv_path_GREP=$GREP
12939fi
12940
12941fi
12942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12943$as_echo "$ac_cv_path_GREP" >&6; }
12944 GREP="$ac_cv_path_GREP"
12945
12946
12947  else
12948    # The variable is set, but is it from the command line or the environment?
12949
12950    # Try to remove the string !GREP! from our list.
12951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12953      # If it failed, the variable was not from the command line. Ignore it,
12954      # but warn the user (except for BASH, which is always set by the calling BASH).
12955      if test "xGREP" != xBASH; then
12956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12957$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12958      fi
12959      # Try to locate tool using the code snippet
12960      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12961$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12962if ${ac_cv_path_GREP+:} false; then :
12963  $as_echo_n "(cached) " >&6
12964else
12965  if test -z "$GREP"; then
12966  ac_path_GREP_found=false
12967  # Loop through the user's path and test for each of PROGNAME-LIST
12968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12969for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12970do
12971  IFS=$as_save_IFS
12972  test -z "$as_dir" && as_dir=.
12973    for ac_prog in grep ggrep; do
12974    for ac_exec_ext in '' $ac_executable_extensions; do
12975      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12976      as_fn_executable_p "$ac_path_GREP" || continue
12977# Check for GNU ac_path_GREP and select it if it is found.
12978  # Check for GNU $ac_path_GREP
12979case `"$ac_path_GREP" --version 2>&1` in
12980*GNU*)
12981  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12982*)
12983  ac_count=0
12984  $as_echo_n 0123456789 >"conftest.in"
12985  while :
12986  do
12987    cat "conftest.in" "conftest.in" >"conftest.tmp"
12988    mv "conftest.tmp" "conftest.in"
12989    cp "conftest.in" "conftest.nl"
12990    $as_echo 'GREP' >> "conftest.nl"
12991    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12992    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12993    as_fn_arith $ac_count + 1 && ac_count=$as_val
12994    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12995      # Best one so far, save it but keep looking for a better one
12996      ac_cv_path_GREP="$ac_path_GREP"
12997      ac_path_GREP_max=$ac_count
12998    fi
12999    # 10*(2^10) chars as input seems more than enough
13000    test $ac_count -gt 10 && break
13001  done
13002  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13003esac
13004
13005      $ac_path_GREP_found && break 3
13006    done
13007  done
13008  done
13009IFS=$as_save_IFS
13010  if test -z "$ac_cv_path_GREP"; then
13011    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13012  fi
13013else
13014  ac_cv_path_GREP=$GREP
13015fi
13016
13017fi
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13019$as_echo "$ac_cv_path_GREP" >&6; }
13020 GREP="$ac_cv_path_GREP"
13021
13022
13023    else
13024      # If it succeeded, then it was overridden by the user. We will use it
13025      # for the tool.
13026
13027      # First remove it from the list of overridden variables, so we can test
13028      # for unknown variables in the end.
13029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13030
13031      # Check if we try to supply an empty value
13032      if test "x$GREP" = x; then
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13034$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13036$as_echo_n "checking for GREP... " >&6; }
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13038$as_echo "disabled" >&6; }
13039      else
13040        # Check if the provided tool contains a complete path.
13041        tool_specified="$GREP"
13042        tool_basename="${tool_specified##*/}"
13043        if test "x$tool_basename" = "x$tool_specified"; then
13044          # A command without a complete path is provided, search $PATH.
13045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13046$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13047          # Extract the first word of "$tool_basename", so it can be a program name with args.
13048set dummy $tool_basename; ac_word=$2
13049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13050$as_echo_n "checking for $ac_word... " >&6; }
13051if ${ac_cv_path_GREP+:} false; then :
13052  $as_echo_n "(cached) " >&6
13053else
13054  case $GREP in
13055  [\\/]* | ?:[\\/]*)
13056  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13057  ;;
13058  *)
13059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13060for as_dir in $PATH
13061do
13062  IFS=$as_save_IFS
13063  test -z "$as_dir" && as_dir=.
13064    for ac_exec_ext in '' $ac_executable_extensions; do
13065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13066    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13068    break 2
13069  fi
13070done
13071  done
13072IFS=$as_save_IFS
13073
13074  ;;
13075esac
13076fi
13077GREP=$ac_cv_path_GREP
13078if test -n "$GREP"; then
13079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13080$as_echo "$GREP" >&6; }
13081else
13082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13083$as_echo "no" >&6; }
13084fi
13085
13086
13087          if test "x$GREP" = x; then
13088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13089          fi
13090        else
13091          # Otherwise we believe it is a complete path. Use it as it is.
13092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13093$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13095$as_echo_n "checking for GREP... " >&6; }
13096          if test ! -x "$tool_specified"; then
13097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13098$as_echo "not found" >&6; }
13099            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13100          fi
13101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13102$as_echo "$tool_specified" >&6; }
13103        fi
13104      fi
13105    fi
13106
13107  fi
13108
13109
13110  if test "x$GREP" = x; then
13111    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13112  fi
13113
13114
13115
13116
13117  # Publish this variable in the help.
13118
13119
13120  if [ -z "${EGREP+x}" ]; then
13121    # The variable is not set by user, try to locate tool using the code snippet
13122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13123$as_echo_n "checking for egrep... " >&6; }
13124if ${ac_cv_path_EGREP+:} false; then :
13125  $as_echo_n "(cached) " >&6
13126else
13127  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13128   then ac_cv_path_EGREP="$GREP -E"
13129   else
13130     if test -z "$EGREP"; then
13131  ac_path_EGREP_found=false
13132  # Loop through the user's path and test for each of PROGNAME-LIST
13133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_prog in egrep; do
13139    for ac_exec_ext in '' $ac_executable_extensions; do
13140      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13141      as_fn_executable_p "$ac_path_EGREP" || continue
13142# Check for GNU ac_path_EGREP and select it if it is found.
13143  # Check for GNU $ac_path_EGREP
13144case `"$ac_path_EGREP" --version 2>&1` in
13145*GNU*)
13146  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13147*)
13148  ac_count=0
13149  $as_echo_n 0123456789 >"conftest.in"
13150  while :
13151  do
13152    cat "conftest.in" "conftest.in" >"conftest.tmp"
13153    mv "conftest.tmp" "conftest.in"
13154    cp "conftest.in" "conftest.nl"
13155    $as_echo 'EGREP' >> "conftest.nl"
13156    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13157    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13158    as_fn_arith $ac_count + 1 && ac_count=$as_val
13159    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13160      # Best one so far, save it but keep looking for a better one
13161      ac_cv_path_EGREP="$ac_path_EGREP"
13162      ac_path_EGREP_max=$ac_count
13163    fi
13164    # 10*(2^10) chars as input seems more than enough
13165    test $ac_count -gt 10 && break
13166  done
13167  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13168esac
13169
13170      $ac_path_EGREP_found && break 3
13171    done
13172  done
13173  done
13174IFS=$as_save_IFS
13175  if test -z "$ac_cv_path_EGREP"; then
13176    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13177  fi
13178else
13179  ac_cv_path_EGREP=$EGREP
13180fi
13181
13182   fi
13183fi
13184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13185$as_echo "$ac_cv_path_EGREP" >&6; }
13186 EGREP="$ac_cv_path_EGREP"
13187
13188
13189  else
13190    # The variable is set, but is it from the command line or the environment?
13191
13192    # Try to remove the string !EGREP! from our list.
13193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13195      # If it failed, the variable was not from the command line. Ignore it,
13196      # but warn the user (except for BASH, which is always set by the calling BASH).
13197      if test "xEGREP" != xBASH; then
13198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13199$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13200      fi
13201      # Try to locate tool using the code snippet
13202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13203$as_echo_n "checking for egrep... " >&6; }
13204if ${ac_cv_path_EGREP+:} false; then :
13205  $as_echo_n "(cached) " >&6
13206else
13207  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13208   then ac_cv_path_EGREP="$GREP -E"
13209   else
13210     if test -z "$EGREP"; then
13211  ac_path_EGREP_found=false
13212  # Loop through the user's path and test for each of PROGNAME-LIST
13213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13214for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13215do
13216  IFS=$as_save_IFS
13217  test -z "$as_dir" && as_dir=.
13218    for ac_prog in egrep; do
13219    for ac_exec_ext in '' $ac_executable_extensions; do
13220      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13221      as_fn_executable_p "$ac_path_EGREP" || continue
13222# Check for GNU ac_path_EGREP and select it if it is found.
13223  # Check for GNU $ac_path_EGREP
13224case `"$ac_path_EGREP" --version 2>&1` in
13225*GNU*)
13226  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13227*)
13228  ac_count=0
13229  $as_echo_n 0123456789 >"conftest.in"
13230  while :
13231  do
13232    cat "conftest.in" "conftest.in" >"conftest.tmp"
13233    mv "conftest.tmp" "conftest.in"
13234    cp "conftest.in" "conftest.nl"
13235    $as_echo 'EGREP' >> "conftest.nl"
13236    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13237    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13238    as_fn_arith $ac_count + 1 && ac_count=$as_val
13239    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13240      # Best one so far, save it but keep looking for a better one
13241      ac_cv_path_EGREP="$ac_path_EGREP"
13242      ac_path_EGREP_max=$ac_count
13243    fi
13244    # 10*(2^10) chars as input seems more than enough
13245    test $ac_count -gt 10 && break
13246  done
13247  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13248esac
13249
13250      $ac_path_EGREP_found && break 3
13251    done
13252  done
13253  done
13254IFS=$as_save_IFS
13255  if test -z "$ac_cv_path_EGREP"; then
13256    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13257  fi
13258else
13259  ac_cv_path_EGREP=$EGREP
13260fi
13261
13262   fi
13263fi
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13265$as_echo "$ac_cv_path_EGREP" >&6; }
13266 EGREP="$ac_cv_path_EGREP"
13267
13268
13269    else
13270      # If it succeeded, then it was overridden by the user. We will use it
13271      # for the tool.
13272
13273      # First remove it from the list of overridden variables, so we can test
13274      # for unknown variables in the end.
13275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13276
13277      # Check if we try to supply an empty value
13278      if test "x$EGREP" = x; then
13279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13280$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13282$as_echo_n "checking for EGREP... " >&6; }
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13284$as_echo "disabled" >&6; }
13285      else
13286        # Check if the provided tool contains a complete path.
13287        tool_specified="$EGREP"
13288        tool_basename="${tool_specified##*/}"
13289        if test "x$tool_basename" = "x$tool_specified"; then
13290          # A command without a complete path is provided, search $PATH.
13291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13292$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13293          # Extract the first word of "$tool_basename", so it can be a program name with args.
13294set dummy $tool_basename; ac_word=$2
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13296$as_echo_n "checking for $ac_word... " >&6; }
13297if ${ac_cv_path_EGREP+:} false; then :
13298  $as_echo_n "(cached) " >&6
13299else
13300  case $EGREP in
13301  [\\/]* | ?:[\\/]*)
13302  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13303  ;;
13304  *)
13305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13306for as_dir in $PATH
13307do
13308  IFS=$as_save_IFS
13309  test -z "$as_dir" && as_dir=.
13310    for ac_exec_ext in '' $ac_executable_extensions; do
13311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13312    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13314    break 2
13315  fi
13316done
13317  done
13318IFS=$as_save_IFS
13319
13320  ;;
13321esac
13322fi
13323EGREP=$ac_cv_path_EGREP
13324if test -n "$EGREP"; then
13325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13326$as_echo "$EGREP" >&6; }
13327else
13328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13329$as_echo "no" >&6; }
13330fi
13331
13332
13333          if test "x$EGREP" = x; then
13334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13335          fi
13336        else
13337          # Otherwise we believe it is a complete path. Use it as it is.
13338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13339$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13341$as_echo_n "checking for EGREP... " >&6; }
13342          if test ! -x "$tool_specified"; then
13343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13344$as_echo "not found" >&6; }
13345            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13346          fi
13347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13348$as_echo "$tool_specified" >&6; }
13349        fi
13350      fi
13351    fi
13352
13353  fi
13354
13355
13356  if test "x$EGREP" = x; then
13357    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13358  fi
13359
13360
13361
13362
13363  # Publish this variable in the help.
13364
13365
13366  if [ -z "${FGREP+x}" ]; then
13367    # The variable is not set by user, try to locate tool using the code snippet
13368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13369$as_echo_n "checking for fgrep... " >&6; }
13370if ${ac_cv_path_FGREP+:} false; then :
13371  $as_echo_n "(cached) " >&6
13372else
13373  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13374   then ac_cv_path_FGREP="$GREP -F"
13375   else
13376     if test -z "$FGREP"; then
13377  ac_path_FGREP_found=false
13378  # Loop through the user's path and test for each of PROGNAME-LIST
13379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13380for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13381do
13382  IFS=$as_save_IFS
13383  test -z "$as_dir" && as_dir=.
13384    for ac_prog in fgrep; do
13385    for ac_exec_ext in '' $ac_executable_extensions; do
13386      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13387      as_fn_executable_p "$ac_path_FGREP" || continue
13388# Check for GNU ac_path_FGREP and select it if it is found.
13389  # Check for GNU $ac_path_FGREP
13390case `"$ac_path_FGREP" --version 2>&1` in
13391*GNU*)
13392  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13393*)
13394  ac_count=0
13395  $as_echo_n 0123456789 >"conftest.in"
13396  while :
13397  do
13398    cat "conftest.in" "conftest.in" >"conftest.tmp"
13399    mv "conftest.tmp" "conftest.in"
13400    cp "conftest.in" "conftest.nl"
13401    $as_echo 'FGREP' >> "conftest.nl"
13402    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13403    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13404    as_fn_arith $ac_count + 1 && ac_count=$as_val
13405    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13406      # Best one so far, save it but keep looking for a better one
13407      ac_cv_path_FGREP="$ac_path_FGREP"
13408      ac_path_FGREP_max=$ac_count
13409    fi
13410    # 10*(2^10) chars as input seems more than enough
13411    test $ac_count -gt 10 && break
13412  done
13413  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13414esac
13415
13416      $ac_path_FGREP_found && break 3
13417    done
13418  done
13419  done
13420IFS=$as_save_IFS
13421  if test -z "$ac_cv_path_FGREP"; then
13422    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13423  fi
13424else
13425  ac_cv_path_FGREP=$FGREP
13426fi
13427
13428   fi
13429fi
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13431$as_echo "$ac_cv_path_FGREP" >&6; }
13432 FGREP="$ac_cv_path_FGREP"
13433
13434
13435  else
13436    # The variable is set, but is it from the command line or the environment?
13437
13438    # Try to remove the string !FGREP! from our list.
13439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13441      # If it failed, the variable was not from the command line. Ignore it,
13442      # but warn the user (except for BASH, which is always set by the calling BASH).
13443      if test "xFGREP" != xBASH; then
13444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13445$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13446      fi
13447      # Try to locate tool using the code snippet
13448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13449$as_echo_n "checking for fgrep... " >&6; }
13450if ${ac_cv_path_FGREP+:} false; then :
13451  $as_echo_n "(cached) " >&6
13452else
13453  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13454   then ac_cv_path_FGREP="$GREP -F"
13455   else
13456     if test -z "$FGREP"; then
13457  ac_path_FGREP_found=false
13458  # Loop through the user's path and test for each of PROGNAME-LIST
13459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13460for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13461do
13462  IFS=$as_save_IFS
13463  test -z "$as_dir" && as_dir=.
13464    for ac_prog in fgrep; do
13465    for ac_exec_ext in '' $ac_executable_extensions; do
13466      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13467      as_fn_executable_p "$ac_path_FGREP" || continue
13468# Check for GNU ac_path_FGREP and select it if it is found.
13469  # Check for GNU $ac_path_FGREP
13470case `"$ac_path_FGREP" --version 2>&1` in
13471*GNU*)
13472  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13473*)
13474  ac_count=0
13475  $as_echo_n 0123456789 >"conftest.in"
13476  while :
13477  do
13478    cat "conftest.in" "conftest.in" >"conftest.tmp"
13479    mv "conftest.tmp" "conftest.in"
13480    cp "conftest.in" "conftest.nl"
13481    $as_echo 'FGREP' >> "conftest.nl"
13482    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13483    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13484    as_fn_arith $ac_count + 1 && ac_count=$as_val
13485    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13486      # Best one so far, save it but keep looking for a better one
13487      ac_cv_path_FGREP="$ac_path_FGREP"
13488      ac_path_FGREP_max=$ac_count
13489    fi
13490    # 10*(2^10) chars as input seems more than enough
13491    test $ac_count -gt 10 && break
13492  done
13493  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13494esac
13495
13496      $ac_path_FGREP_found && break 3
13497    done
13498  done
13499  done
13500IFS=$as_save_IFS
13501  if test -z "$ac_cv_path_FGREP"; then
13502    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13503  fi
13504else
13505  ac_cv_path_FGREP=$FGREP
13506fi
13507
13508   fi
13509fi
13510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13511$as_echo "$ac_cv_path_FGREP" >&6; }
13512 FGREP="$ac_cv_path_FGREP"
13513
13514
13515    else
13516      # If it succeeded, then it was overridden by the user. We will use it
13517      # for the tool.
13518
13519      # First remove it from the list of overridden variables, so we can test
13520      # for unknown variables in the end.
13521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13522
13523      # Check if we try to supply an empty value
13524      if test "x$FGREP" = x; then
13525        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13526$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13528$as_echo_n "checking for FGREP... " >&6; }
13529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13530$as_echo "disabled" >&6; }
13531      else
13532        # Check if the provided tool contains a complete path.
13533        tool_specified="$FGREP"
13534        tool_basename="${tool_specified##*/}"
13535        if test "x$tool_basename" = "x$tool_specified"; then
13536          # A command without a complete path is provided, search $PATH.
13537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13538$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13539          # Extract the first word of "$tool_basename", so it can be a program name with args.
13540set dummy $tool_basename; ac_word=$2
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13542$as_echo_n "checking for $ac_word... " >&6; }
13543if ${ac_cv_path_FGREP+:} false; then :
13544  $as_echo_n "(cached) " >&6
13545else
13546  case $FGREP in
13547  [\\/]* | ?:[\\/]*)
13548  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13549  ;;
13550  *)
13551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13552for as_dir in $PATH
13553do
13554  IFS=$as_save_IFS
13555  test -z "$as_dir" && as_dir=.
13556    for ac_exec_ext in '' $ac_executable_extensions; do
13557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13558    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13560    break 2
13561  fi
13562done
13563  done
13564IFS=$as_save_IFS
13565
13566  ;;
13567esac
13568fi
13569FGREP=$ac_cv_path_FGREP
13570if test -n "$FGREP"; then
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13572$as_echo "$FGREP" >&6; }
13573else
13574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13575$as_echo "no" >&6; }
13576fi
13577
13578
13579          if test "x$FGREP" = x; then
13580            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13581          fi
13582        else
13583          # Otherwise we believe it is a complete path. Use it as it is.
13584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13585$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13587$as_echo_n "checking for FGREP... " >&6; }
13588          if test ! -x "$tool_specified"; then
13589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13590$as_echo "not found" >&6; }
13591            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13592          fi
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13594$as_echo "$tool_specified" >&6; }
13595        fi
13596      fi
13597    fi
13598
13599  fi
13600
13601
13602  if test "x$FGREP" = x; then
13603    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13604  fi
13605
13606
13607
13608
13609  # Publish this variable in the help.
13610
13611
13612  if [ -z "${SED+x}" ]; then
13613    # The variable is not set by user, try to locate tool using the code snippet
13614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13615$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13616if ${ac_cv_path_SED+:} false; then :
13617  $as_echo_n "(cached) " >&6
13618else
13619            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13620     for ac_i in 1 2 3 4 5 6 7; do
13621       ac_script="$ac_script$as_nl$ac_script"
13622     done
13623     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13624     { ac_script=; unset ac_script;}
13625     if test -z "$SED"; then
13626  ac_path_SED_found=false
13627  # Loop through the user's path and test for each of PROGNAME-LIST
13628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13629for as_dir in $PATH
13630do
13631  IFS=$as_save_IFS
13632  test -z "$as_dir" && as_dir=.
13633    for ac_prog in sed gsed; do
13634    for ac_exec_ext in '' $ac_executable_extensions; do
13635      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13636      as_fn_executable_p "$ac_path_SED" || continue
13637# Check for GNU ac_path_SED and select it if it is found.
13638  # Check for GNU $ac_path_SED
13639case `"$ac_path_SED" --version 2>&1` in
13640*GNU*)
13641  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13642*)
13643  ac_count=0
13644  $as_echo_n 0123456789 >"conftest.in"
13645  while :
13646  do
13647    cat "conftest.in" "conftest.in" >"conftest.tmp"
13648    mv "conftest.tmp" "conftest.in"
13649    cp "conftest.in" "conftest.nl"
13650    $as_echo '' >> "conftest.nl"
13651    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13652    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13653    as_fn_arith $ac_count + 1 && ac_count=$as_val
13654    if test $ac_count -gt ${ac_path_SED_max-0}; then
13655      # Best one so far, save it but keep looking for a better one
13656      ac_cv_path_SED="$ac_path_SED"
13657      ac_path_SED_max=$ac_count
13658    fi
13659    # 10*(2^10) chars as input seems more than enough
13660    test $ac_count -gt 10 && break
13661  done
13662  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13663esac
13664
13665      $ac_path_SED_found && break 3
13666    done
13667  done
13668  done
13669IFS=$as_save_IFS
13670  if test -z "$ac_cv_path_SED"; then
13671    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13672  fi
13673else
13674  ac_cv_path_SED=$SED
13675fi
13676
13677fi
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13679$as_echo "$ac_cv_path_SED" >&6; }
13680 SED="$ac_cv_path_SED"
13681  rm -f conftest.sed
13682
13683  else
13684    # The variable is set, but is it from the command line or the environment?
13685
13686    # Try to remove the string !SED! from our list.
13687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13689      # If it failed, the variable was not from the command line. Ignore it,
13690      # but warn the user (except for BASH, which is always set by the calling BASH).
13691      if test "xSED" != xBASH; then
13692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13693$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13694      fi
13695      # Try to locate tool using the code snippet
13696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13697$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13698if ${ac_cv_path_SED+:} false; then :
13699  $as_echo_n "(cached) " >&6
13700else
13701            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13702     for ac_i in 1 2 3 4 5 6 7; do
13703       ac_script="$ac_script$as_nl$ac_script"
13704     done
13705     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13706     { ac_script=; unset ac_script;}
13707     if test -z "$SED"; then
13708  ac_path_SED_found=false
13709  # Loop through the user's path and test for each of PROGNAME-LIST
13710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13711for as_dir in $PATH
13712do
13713  IFS=$as_save_IFS
13714  test -z "$as_dir" && as_dir=.
13715    for ac_prog in sed gsed; do
13716    for ac_exec_ext in '' $ac_executable_extensions; do
13717      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13718      as_fn_executable_p "$ac_path_SED" || continue
13719# Check for GNU ac_path_SED and select it if it is found.
13720  # Check for GNU $ac_path_SED
13721case `"$ac_path_SED" --version 2>&1` in
13722*GNU*)
13723  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13724*)
13725  ac_count=0
13726  $as_echo_n 0123456789 >"conftest.in"
13727  while :
13728  do
13729    cat "conftest.in" "conftest.in" >"conftest.tmp"
13730    mv "conftest.tmp" "conftest.in"
13731    cp "conftest.in" "conftest.nl"
13732    $as_echo '' >> "conftest.nl"
13733    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13734    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13735    as_fn_arith $ac_count + 1 && ac_count=$as_val
13736    if test $ac_count -gt ${ac_path_SED_max-0}; then
13737      # Best one so far, save it but keep looking for a better one
13738      ac_cv_path_SED="$ac_path_SED"
13739      ac_path_SED_max=$ac_count
13740    fi
13741    # 10*(2^10) chars as input seems more than enough
13742    test $ac_count -gt 10 && break
13743  done
13744  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13745esac
13746
13747      $ac_path_SED_found && break 3
13748    done
13749  done
13750  done
13751IFS=$as_save_IFS
13752  if test -z "$ac_cv_path_SED"; then
13753    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13754  fi
13755else
13756  ac_cv_path_SED=$SED
13757fi
13758
13759fi
13760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13761$as_echo "$ac_cv_path_SED" >&6; }
13762 SED="$ac_cv_path_SED"
13763  rm -f conftest.sed
13764
13765    else
13766      # If it succeeded, then it was overridden by the user. We will use it
13767      # for the tool.
13768
13769      # First remove it from the list of overridden variables, so we can test
13770      # for unknown variables in the end.
13771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13772
13773      # Check if we try to supply an empty value
13774      if test "x$SED" = x; then
13775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13776$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13778$as_echo_n "checking for SED... " >&6; }
13779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13780$as_echo "disabled" >&6; }
13781      else
13782        # Check if the provided tool contains a complete path.
13783        tool_specified="$SED"
13784        tool_basename="${tool_specified##*/}"
13785        if test "x$tool_basename" = "x$tool_specified"; then
13786          # A command without a complete path is provided, search $PATH.
13787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13788$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13789          # Extract the first word of "$tool_basename", so it can be a program name with args.
13790set dummy $tool_basename; ac_word=$2
13791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13792$as_echo_n "checking for $ac_word... " >&6; }
13793if ${ac_cv_path_SED+:} false; then :
13794  $as_echo_n "(cached) " >&6
13795else
13796  case $SED in
13797  [\\/]* | ?:[\\/]*)
13798  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13799  ;;
13800  *)
13801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13802for as_dir in $PATH
13803do
13804  IFS=$as_save_IFS
13805  test -z "$as_dir" && as_dir=.
13806    for ac_exec_ext in '' $ac_executable_extensions; do
13807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13808    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13810    break 2
13811  fi
13812done
13813  done
13814IFS=$as_save_IFS
13815
13816  ;;
13817esac
13818fi
13819SED=$ac_cv_path_SED
13820if test -n "$SED"; then
13821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13822$as_echo "$SED" >&6; }
13823else
13824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13825$as_echo "no" >&6; }
13826fi
13827
13828
13829          if test "x$SED" = x; then
13830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13831          fi
13832        else
13833          # Otherwise we believe it is a complete path. Use it as it is.
13834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13835$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13837$as_echo_n "checking for SED... " >&6; }
13838          if test ! -x "$tool_specified"; then
13839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13840$as_echo "not found" >&6; }
13841            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13842          fi
13843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13844$as_echo "$tool_specified" >&6; }
13845        fi
13846      fi
13847    fi
13848
13849  fi
13850
13851
13852  if test "x$SED" = x; then
13853    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13854  fi
13855
13856
13857
13858  # Always force rm.
13859  RM="$RM -f"
13860
13861  # pwd behaves differently on various platforms and some don't support the -L flag.
13862  # Always use the bash builtin pwd to get uniform behavior.
13863  THEPWDCMD=pwd
13864
13865  # These are not required on all platforms
13866
13867
13868  # Publish this variable in the help.
13869
13870
13871  if [ -z "${CYGPATH+x}" ]; then
13872    # The variable is not set by user, try to locate tool using the code snippet
13873    for ac_prog in cygpath
13874do
13875  # Extract the first word of "$ac_prog", so it can be a program name with args.
13876set dummy $ac_prog; ac_word=$2
13877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13878$as_echo_n "checking for $ac_word... " >&6; }
13879if ${ac_cv_path_CYGPATH+:} false; then :
13880  $as_echo_n "(cached) " >&6
13881else
13882  case $CYGPATH in
13883  [\\/]* | ?:[\\/]*)
13884  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13885  ;;
13886  *)
13887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13888for as_dir in $PATH
13889do
13890  IFS=$as_save_IFS
13891  test -z "$as_dir" && as_dir=.
13892    for ac_exec_ext in '' $ac_executable_extensions; do
13893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13894    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13896    break 2
13897  fi
13898done
13899  done
13900IFS=$as_save_IFS
13901
13902  ;;
13903esac
13904fi
13905CYGPATH=$ac_cv_path_CYGPATH
13906if test -n "$CYGPATH"; then
13907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13908$as_echo "$CYGPATH" >&6; }
13909else
13910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13911$as_echo "no" >&6; }
13912fi
13913
13914
13915  test -n "$CYGPATH" && break
13916done
13917
13918  else
13919    # The variable is set, but is it from the command line or the environment?
13920
13921    # Try to remove the string !CYGPATH! from our list.
13922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13924      # If it failed, the variable was not from the command line. Ignore it,
13925      # but warn the user (except for BASH, which is always set by the calling BASH).
13926      if test "xCYGPATH" != xBASH; then
13927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13928$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13929      fi
13930      # Try to locate tool using the code snippet
13931      for ac_prog in cygpath
13932do
13933  # Extract the first word of "$ac_prog", so it can be a program name with args.
13934set dummy $ac_prog; ac_word=$2
13935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13936$as_echo_n "checking for $ac_word... " >&6; }
13937if ${ac_cv_path_CYGPATH+:} false; then :
13938  $as_echo_n "(cached) " >&6
13939else
13940  case $CYGPATH in
13941  [\\/]* | ?:[\\/]*)
13942  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13943  ;;
13944  *)
13945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13946for as_dir in $PATH
13947do
13948  IFS=$as_save_IFS
13949  test -z "$as_dir" && as_dir=.
13950    for ac_exec_ext in '' $ac_executable_extensions; do
13951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13952    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13954    break 2
13955  fi
13956done
13957  done
13958IFS=$as_save_IFS
13959
13960  ;;
13961esac
13962fi
13963CYGPATH=$ac_cv_path_CYGPATH
13964if test -n "$CYGPATH"; then
13965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13966$as_echo "$CYGPATH" >&6; }
13967else
13968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13969$as_echo "no" >&6; }
13970fi
13971
13972
13973  test -n "$CYGPATH" && break
13974done
13975
13976    else
13977      # If it succeeded, then it was overridden by the user. We will use it
13978      # for the tool.
13979
13980      # First remove it from the list of overridden variables, so we can test
13981      # for unknown variables in the end.
13982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13983
13984      # Check if we try to supply an empty value
13985      if test "x$CYGPATH" = x; then
13986        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13987$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13989$as_echo_n "checking for CYGPATH... " >&6; }
13990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13991$as_echo "disabled" >&6; }
13992      else
13993        # Check if the provided tool contains a complete path.
13994        tool_specified="$CYGPATH"
13995        tool_basename="${tool_specified##*/}"
13996        if test "x$tool_basename" = "x$tool_specified"; then
13997          # A command without a complete path is provided, search $PATH.
13998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13999$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14000          # Extract the first word of "$tool_basename", so it can be a program name with args.
14001set dummy $tool_basename; ac_word=$2
14002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14003$as_echo_n "checking for $ac_word... " >&6; }
14004if ${ac_cv_path_CYGPATH+:} false; then :
14005  $as_echo_n "(cached) " >&6
14006else
14007  case $CYGPATH in
14008  [\\/]* | ?:[\\/]*)
14009  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14010  ;;
14011  *)
14012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14013for as_dir in $PATH
14014do
14015  IFS=$as_save_IFS
14016  test -z "$as_dir" && as_dir=.
14017    for ac_exec_ext in '' $ac_executable_extensions; do
14018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14019    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14021    break 2
14022  fi
14023done
14024  done
14025IFS=$as_save_IFS
14026
14027  ;;
14028esac
14029fi
14030CYGPATH=$ac_cv_path_CYGPATH
14031if test -n "$CYGPATH"; then
14032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14033$as_echo "$CYGPATH" >&6; }
14034else
14035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14036$as_echo "no" >&6; }
14037fi
14038
14039
14040          if test "x$CYGPATH" = x; then
14041            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14042          fi
14043        else
14044          # Otherwise we believe it is a complete path. Use it as it is.
14045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14046$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14047          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14048$as_echo_n "checking for CYGPATH... " >&6; }
14049          if test ! -x "$tool_specified"; then
14050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14051$as_echo "not found" >&6; }
14052            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14053          fi
14054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14055$as_echo "$tool_specified" >&6; }
14056        fi
14057      fi
14058    fi
14059
14060  fi
14061
14062
14063
14064
14065  # Publish this variable in the help.
14066
14067
14068  if [ -z "${READLINK+x}" ]; then
14069    # The variable is not set by user, try to locate tool using the code snippet
14070    for ac_prog in greadlink readlink
14071do
14072  # Extract the first word of "$ac_prog", so it can be a program name with args.
14073set dummy $ac_prog; ac_word=$2
14074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14075$as_echo_n "checking for $ac_word... " >&6; }
14076if ${ac_cv_path_READLINK+:} false; then :
14077  $as_echo_n "(cached) " >&6
14078else
14079  case $READLINK in
14080  [\\/]* | ?:[\\/]*)
14081  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14082  ;;
14083  *)
14084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14085for as_dir in $PATH
14086do
14087  IFS=$as_save_IFS
14088  test -z "$as_dir" && as_dir=.
14089    for ac_exec_ext in '' $ac_executable_extensions; do
14090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14091    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14093    break 2
14094  fi
14095done
14096  done
14097IFS=$as_save_IFS
14098
14099  ;;
14100esac
14101fi
14102READLINK=$ac_cv_path_READLINK
14103if test -n "$READLINK"; then
14104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14105$as_echo "$READLINK" >&6; }
14106else
14107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14108$as_echo "no" >&6; }
14109fi
14110
14111
14112  test -n "$READLINK" && break
14113done
14114
14115  else
14116    # The variable is set, but is it from the command line or the environment?
14117
14118    # Try to remove the string !READLINK! from our list.
14119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14121      # If it failed, the variable was not from the command line. Ignore it,
14122      # but warn the user (except for BASH, which is always set by the calling BASH).
14123      if test "xREADLINK" != xBASH; then
14124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14125$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14126      fi
14127      # Try to locate tool using the code snippet
14128      for ac_prog in greadlink readlink
14129do
14130  # Extract the first word of "$ac_prog", so it can be a program name with args.
14131set dummy $ac_prog; ac_word=$2
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14133$as_echo_n "checking for $ac_word... " >&6; }
14134if ${ac_cv_path_READLINK+:} false; then :
14135  $as_echo_n "(cached) " >&6
14136else
14137  case $READLINK in
14138  [\\/]* | ?:[\\/]*)
14139  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14140  ;;
14141  *)
14142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143for as_dir in $PATH
14144do
14145  IFS=$as_save_IFS
14146  test -z "$as_dir" && as_dir=.
14147    for ac_exec_ext in '' $ac_executable_extensions; do
14148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14149    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14151    break 2
14152  fi
14153done
14154  done
14155IFS=$as_save_IFS
14156
14157  ;;
14158esac
14159fi
14160READLINK=$ac_cv_path_READLINK
14161if test -n "$READLINK"; then
14162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14163$as_echo "$READLINK" >&6; }
14164else
14165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14166$as_echo "no" >&6; }
14167fi
14168
14169
14170  test -n "$READLINK" && break
14171done
14172
14173    else
14174      # If it succeeded, then it was overridden by the user. We will use it
14175      # for the tool.
14176
14177      # First remove it from the list of overridden variables, so we can test
14178      # for unknown variables in the end.
14179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14180
14181      # Check if we try to supply an empty value
14182      if test "x$READLINK" = x; then
14183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14184$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14186$as_echo_n "checking for READLINK... " >&6; }
14187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14188$as_echo "disabled" >&6; }
14189      else
14190        # Check if the provided tool contains a complete path.
14191        tool_specified="$READLINK"
14192        tool_basename="${tool_specified##*/}"
14193        if test "x$tool_basename" = "x$tool_specified"; then
14194          # A command without a complete path is provided, search $PATH.
14195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14196$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14197          # Extract the first word of "$tool_basename", so it can be a program name with args.
14198set dummy $tool_basename; ac_word=$2
14199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14200$as_echo_n "checking for $ac_word... " >&6; }
14201if ${ac_cv_path_READLINK+:} false; then :
14202  $as_echo_n "(cached) " >&6
14203else
14204  case $READLINK in
14205  [\\/]* | ?:[\\/]*)
14206  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14207  ;;
14208  *)
14209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14210for as_dir in $PATH
14211do
14212  IFS=$as_save_IFS
14213  test -z "$as_dir" && as_dir=.
14214    for ac_exec_ext in '' $ac_executable_extensions; do
14215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14216    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14218    break 2
14219  fi
14220done
14221  done
14222IFS=$as_save_IFS
14223
14224  ;;
14225esac
14226fi
14227READLINK=$ac_cv_path_READLINK
14228if test -n "$READLINK"; then
14229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14230$as_echo "$READLINK" >&6; }
14231else
14232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14233$as_echo "no" >&6; }
14234fi
14235
14236
14237          if test "x$READLINK" = x; then
14238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14239          fi
14240        else
14241          # Otherwise we believe it is a complete path. Use it as it is.
14242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14243$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14245$as_echo_n "checking for READLINK... " >&6; }
14246          if test ! -x "$tool_specified"; then
14247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14248$as_echo "not found" >&6; }
14249            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14250          fi
14251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14252$as_echo "$tool_specified" >&6; }
14253        fi
14254      fi
14255    fi
14256
14257  fi
14258
14259
14260
14261
14262  # Publish this variable in the help.
14263
14264
14265  if [ -z "${DF+x}" ]; then
14266    # The variable is not set by user, try to locate tool using the code snippet
14267    for ac_prog in df
14268do
14269  # Extract the first word of "$ac_prog", so it can be a program name with args.
14270set dummy $ac_prog; ac_word=$2
14271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14272$as_echo_n "checking for $ac_word... " >&6; }
14273if ${ac_cv_path_DF+:} false; then :
14274  $as_echo_n "(cached) " >&6
14275else
14276  case $DF in
14277  [\\/]* | ?:[\\/]*)
14278  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14279  ;;
14280  *)
14281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14282for as_dir in $PATH
14283do
14284  IFS=$as_save_IFS
14285  test -z "$as_dir" && as_dir=.
14286    for ac_exec_ext in '' $ac_executable_extensions; do
14287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14288    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14290    break 2
14291  fi
14292done
14293  done
14294IFS=$as_save_IFS
14295
14296  ;;
14297esac
14298fi
14299DF=$ac_cv_path_DF
14300if test -n "$DF"; then
14301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14302$as_echo "$DF" >&6; }
14303else
14304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14305$as_echo "no" >&6; }
14306fi
14307
14308
14309  test -n "$DF" && break
14310done
14311
14312  else
14313    # The variable is set, but is it from the command line or the environment?
14314
14315    # Try to remove the string !DF! from our list.
14316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14318      # If it failed, the variable was not from the command line. Ignore it,
14319      # but warn the user (except for BASH, which is always set by the calling BASH).
14320      if test "xDF" != xBASH; then
14321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14322$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14323      fi
14324      # Try to locate tool using the code snippet
14325      for ac_prog in df
14326do
14327  # Extract the first word of "$ac_prog", so it can be a program name with args.
14328set dummy $ac_prog; ac_word=$2
14329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14330$as_echo_n "checking for $ac_word... " >&6; }
14331if ${ac_cv_path_DF+:} false; then :
14332  $as_echo_n "(cached) " >&6
14333else
14334  case $DF in
14335  [\\/]* | ?:[\\/]*)
14336  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14337  ;;
14338  *)
14339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14340for as_dir in $PATH
14341do
14342  IFS=$as_save_IFS
14343  test -z "$as_dir" && as_dir=.
14344    for ac_exec_ext in '' $ac_executable_extensions; do
14345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14346    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14348    break 2
14349  fi
14350done
14351  done
14352IFS=$as_save_IFS
14353
14354  ;;
14355esac
14356fi
14357DF=$ac_cv_path_DF
14358if test -n "$DF"; then
14359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14360$as_echo "$DF" >&6; }
14361else
14362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14363$as_echo "no" >&6; }
14364fi
14365
14366
14367  test -n "$DF" && break
14368done
14369
14370    else
14371      # If it succeeded, then it was overridden by the user. We will use it
14372      # for the tool.
14373
14374      # First remove it from the list of overridden variables, so we can test
14375      # for unknown variables in the end.
14376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14377
14378      # Check if we try to supply an empty value
14379      if test "x$DF" = x; then
14380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14381$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14383$as_echo_n "checking for DF... " >&6; }
14384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14385$as_echo "disabled" >&6; }
14386      else
14387        # Check if the provided tool contains a complete path.
14388        tool_specified="$DF"
14389        tool_basename="${tool_specified##*/}"
14390        if test "x$tool_basename" = "x$tool_specified"; then
14391          # A command without a complete path is provided, search $PATH.
14392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14393$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14394          # Extract the first word of "$tool_basename", so it can be a program name with args.
14395set dummy $tool_basename; ac_word=$2
14396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14397$as_echo_n "checking for $ac_word... " >&6; }
14398if ${ac_cv_path_DF+:} false; then :
14399  $as_echo_n "(cached) " >&6
14400else
14401  case $DF in
14402  [\\/]* | ?:[\\/]*)
14403  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14404  ;;
14405  *)
14406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14407for as_dir in $PATH
14408do
14409  IFS=$as_save_IFS
14410  test -z "$as_dir" && as_dir=.
14411    for ac_exec_ext in '' $ac_executable_extensions; do
14412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14413    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14415    break 2
14416  fi
14417done
14418  done
14419IFS=$as_save_IFS
14420
14421  ;;
14422esac
14423fi
14424DF=$ac_cv_path_DF
14425if test -n "$DF"; then
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14427$as_echo "$DF" >&6; }
14428else
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14430$as_echo "no" >&6; }
14431fi
14432
14433
14434          if test "x$DF" = x; then
14435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14436          fi
14437        else
14438          # Otherwise we believe it is a complete path. Use it as it is.
14439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14440$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14442$as_echo_n "checking for DF... " >&6; }
14443          if test ! -x "$tool_specified"; then
14444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14445$as_echo "not found" >&6; }
14446            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14447          fi
14448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14449$as_echo "$tool_specified" >&6; }
14450        fi
14451      fi
14452    fi
14453
14454  fi
14455
14456
14457
14458
14459  # Publish this variable in the help.
14460
14461
14462  if [ -z "${CPIO+x}" ]; then
14463    # The variable is not set by user, try to locate tool using the code snippet
14464    for ac_prog in cpio bsdcpio
14465do
14466  # Extract the first word of "$ac_prog", so it can be a program name with args.
14467set dummy $ac_prog; ac_word=$2
14468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14469$as_echo_n "checking for $ac_word... " >&6; }
14470if ${ac_cv_path_CPIO+:} false; then :
14471  $as_echo_n "(cached) " >&6
14472else
14473  case $CPIO in
14474  [\\/]* | ?:[\\/]*)
14475  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14476  ;;
14477  *)
14478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14479for as_dir in $PATH
14480do
14481  IFS=$as_save_IFS
14482  test -z "$as_dir" && as_dir=.
14483    for ac_exec_ext in '' $ac_executable_extensions; do
14484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14485    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14487    break 2
14488  fi
14489done
14490  done
14491IFS=$as_save_IFS
14492
14493  ;;
14494esac
14495fi
14496CPIO=$ac_cv_path_CPIO
14497if test -n "$CPIO"; then
14498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14499$as_echo "$CPIO" >&6; }
14500else
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14502$as_echo "no" >&6; }
14503fi
14504
14505
14506  test -n "$CPIO" && break
14507done
14508
14509  else
14510    # The variable is set, but is it from the command line or the environment?
14511
14512    # Try to remove the string !CPIO! from our list.
14513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14515      # If it failed, the variable was not from the command line. Ignore it,
14516      # but warn the user (except for BASH, which is always set by the calling BASH).
14517      if test "xCPIO" != xBASH; then
14518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14519$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14520      fi
14521      # Try to locate tool using the code snippet
14522      for ac_prog in cpio bsdcpio
14523do
14524  # Extract the first word of "$ac_prog", so it can be a program name with args.
14525set dummy $ac_prog; ac_word=$2
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14527$as_echo_n "checking for $ac_word... " >&6; }
14528if ${ac_cv_path_CPIO+:} false; then :
14529  $as_echo_n "(cached) " >&6
14530else
14531  case $CPIO in
14532  [\\/]* | ?:[\\/]*)
14533  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14534  ;;
14535  *)
14536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14537for as_dir in $PATH
14538do
14539  IFS=$as_save_IFS
14540  test -z "$as_dir" && as_dir=.
14541    for ac_exec_ext in '' $ac_executable_extensions; do
14542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14543    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14545    break 2
14546  fi
14547done
14548  done
14549IFS=$as_save_IFS
14550
14551  ;;
14552esac
14553fi
14554CPIO=$ac_cv_path_CPIO
14555if test -n "$CPIO"; then
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14557$as_echo "$CPIO" >&6; }
14558else
14559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
14561fi
14562
14563
14564  test -n "$CPIO" && break
14565done
14566
14567    else
14568      # If it succeeded, then it was overridden by the user. We will use it
14569      # for the tool.
14570
14571      # First remove it from the list of overridden variables, so we can test
14572      # for unknown variables in the end.
14573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14574
14575      # Check if we try to supply an empty value
14576      if test "x$CPIO" = x; then
14577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14578$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14580$as_echo_n "checking for CPIO... " >&6; }
14581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14582$as_echo "disabled" >&6; }
14583      else
14584        # Check if the provided tool contains a complete path.
14585        tool_specified="$CPIO"
14586        tool_basename="${tool_specified##*/}"
14587        if test "x$tool_basename" = "x$tool_specified"; then
14588          # A command without a complete path is provided, search $PATH.
14589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14590$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14591          # Extract the first word of "$tool_basename", so it can be a program name with args.
14592set dummy $tool_basename; ac_word=$2
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14594$as_echo_n "checking for $ac_word... " >&6; }
14595if ${ac_cv_path_CPIO+:} false; then :
14596  $as_echo_n "(cached) " >&6
14597else
14598  case $CPIO in
14599  [\\/]* | ?:[\\/]*)
14600  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14601  ;;
14602  *)
14603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14604for as_dir in $PATH
14605do
14606  IFS=$as_save_IFS
14607  test -z "$as_dir" && as_dir=.
14608    for ac_exec_ext in '' $ac_executable_extensions; do
14609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14610    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14612    break 2
14613  fi
14614done
14615  done
14616IFS=$as_save_IFS
14617
14618  ;;
14619esac
14620fi
14621CPIO=$ac_cv_path_CPIO
14622if test -n "$CPIO"; then
14623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14624$as_echo "$CPIO" >&6; }
14625else
14626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14627$as_echo "no" >&6; }
14628fi
14629
14630
14631          if test "x$CPIO" = x; then
14632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14633          fi
14634        else
14635          # Otherwise we believe it is a complete path. Use it as it is.
14636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14637$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14639$as_echo_n "checking for CPIO... " >&6; }
14640          if test ! -x "$tool_specified"; then
14641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14642$as_echo "not found" >&6; }
14643            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14644          fi
14645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14646$as_echo "$tool_specified" >&6; }
14647        fi
14648      fi
14649    fi
14650
14651  fi
14652
14653
14654
14655
14656  # Publish this variable in the help.
14657
14658
14659  if [ -z "${NICE+x}" ]; then
14660    # The variable is not set by user, try to locate tool using the code snippet
14661    for ac_prog in nice
14662do
14663  # Extract the first word of "$ac_prog", so it can be a program name with args.
14664set dummy $ac_prog; ac_word=$2
14665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14666$as_echo_n "checking for $ac_word... " >&6; }
14667if ${ac_cv_path_NICE+:} false; then :
14668  $as_echo_n "(cached) " >&6
14669else
14670  case $NICE in
14671  [\\/]* | ?:[\\/]*)
14672  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14673  ;;
14674  *)
14675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14676for as_dir in $PATH
14677do
14678  IFS=$as_save_IFS
14679  test -z "$as_dir" && as_dir=.
14680    for ac_exec_ext in '' $ac_executable_extensions; do
14681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14682    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14684    break 2
14685  fi
14686done
14687  done
14688IFS=$as_save_IFS
14689
14690  ;;
14691esac
14692fi
14693NICE=$ac_cv_path_NICE
14694if test -n "$NICE"; then
14695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14696$as_echo "$NICE" >&6; }
14697else
14698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14699$as_echo "no" >&6; }
14700fi
14701
14702
14703  test -n "$NICE" && break
14704done
14705
14706  else
14707    # The variable is set, but is it from the command line or the environment?
14708
14709    # Try to remove the string !NICE! from our list.
14710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14712      # If it failed, the variable was not from the command line. Ignore it,
14713      # but warn the user (except for BASH, which is always set by the calling BASH).
14714      if test "xNICE" != xBASH; then
14715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14716$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14717      fi
14718      # Try to locate tool using the code snippet
14719      for ac_prog in nice
14720do
14721  # Extract the first word of "$ac_prog", so it can be a program name with args.
14722set dummy $ac_prog; ac_word=$2
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14724$as_echo_n "checking for $ac_word... " >&6; }
14725if ${ac_cv_path_NICE+:} false; then :
14726  $as_echo_n "(cached) " >&6
14727else
14728  case $NICE in
14729  [\\/]* | ?:[\\/]*)
14730  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14731  ;;
14732  *)
14733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14734for as_dir in $PATH
14735do
14736  IFS=$as_save_IFS
14737  test -z "$as_dir" && as_dir=.
14738    for ac_exec_ext in '' $ac_executable_extensions; do
14739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14740    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14742    break 2
14743  fi
14744done
14745  done
14746IFS=$as_save_IFS
14747
14748  ;;
14749esac
14750fi
14751NICE=$ac_cv_path_NICE
14752if test -n "$NICE"; then
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14754$as_echo "$NICE" >&6; }
14755else
14756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14757$as_echo "no" >&6; }
14758fi
14759
14760
14761  test -n "$NICE" && break
14762done
14763
14764    else
14765      # If it succeeded, then it was overridden by the user. We will use it
14766      # for the tool.
14767
14768      # First remove it from the list of overridden variables, so we can test
14769      # for unknown variables in the end.
14770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14771
14772      # Check if we try to supply an empty value
14773      if test "x$NICE" = x; then
14774        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14775$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14777$as_echo_n "checking for NICE... " >&6; }
14778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14779$as_echo "disabled" >&6; }
14780      else
14781        # Check if the provided tool contains a complete path.
14782        tool_specified="$NICE"
14783        tool_basename="${tool_specified##*/}"
14784        if test "x$tool_basename" = "x$tool_specified"; then
14785          # A command without a complete path is provided, search $PATH.
14786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14787$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14788          # Extract the first word of "$tool_basename", so it can be a program name with args.
14789set dummy $tool_basename; ac_word=$2
14790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14791$as_echo_n "checking for $ac_word... " >&6; }
14792if ${ac_cv_path_NICE+:} false; then :
14793  $as_echo_n "(cached) " >&6
14794else
14795  case $NICE in
14796  [\\/]* | ?:[\\/]*)
14797  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14798  ;;
14799  *)
14800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14801for as_dir in $PATH
14802do
14803  IFS=$as_save_IFS
14804  test -z "$as_dir" && as_dir=.
14805    for ac_exec_ext in '' $ac_executable_extensions; do
14806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14807    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14809    break 2
14810  fi
14811done
14812  done
14813IFS=$as_save_IFS
14814
14815  ;;
14816esac
14817fi
14818NICE=$ac_cv_path_NICE
14819if test -n "$NICE"; then
14820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14821$as_echo "$NICE" >&6; }
14822else
14823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14824$as_echo "no" >&6; }
14825fi
14826
14827
14828          if test "x$NICE" = x; then
14829            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14830          fi
14831        else
14832          # Otherwise we believe it is a complete path. Use it as it is.
14833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14834$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14836$as_echo_n "checking for NICE... " >&6; }
14837          if test ! -x "$tool_specified"; then
14838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14839$as_echo "not found" >&6; }
14840            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14841          fi
14842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14843$as_echo "$tool_specified" >&6; }
14844        fi
14845      fi
14846    fi
14847
14848  fi
14849
14850
14851
14852
14853# Now we can determine OpenJDK build and target platforms. This is required to
14854# have early on.
14855# Make sure we can run config.sub.
14856$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14857  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14858
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14860$as_echo_n "checking build system type... " >&6; }
14861if ${ac_cv_build+:} false; then :
14862  $as_echo_n "(cached) " >&6
14863else
14864  ac_build_alias=$build_alias
14865test "x$ac_build_alias" = x &&
14866  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14867test "x$ac_build_alias" = x &&
14868  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14869ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14870  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14871
14872fi
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14874$as_echo "$ac_cv_build" >&6; }
14875case $ac_cv_build in
14876*-*-*) ;;
14877*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14878esac
14879build=$ac_cv_build
14880ac_save_IFS=$IFS; IFS='-'
14881set x $ac_cv_build
14882shift
14883build_cpu=$1
14884build_vendor=$2
14885shift; shift
14886# Remember, the first character of IFS is used to create $*,
14887# except with old shells:
14888build_os=$*
14889IFS=$ac_save_IFS
14890case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14891
14892
14893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14894$as_echo_n "checking host system type... " >&6; }
14895if ${ac_cv_host+:} false; then :
14896  $as_echo_n "(cached) " >&6
14897else
14898  if test "x$host_alias" = x; then
14899  ac_cv_host=$ac_cv_build
14900else
14901  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14902    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14903fi
14904
14905fi
14906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14907$as_echo "$ac_cv_host" >&6; }
14908case $ac_cv_host in
14909*-*-*) ;;
14910*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14911esac
14912host=$ac_cv_host
14913ac_save_IFS=$IFS; IFS='-'
14914set x $ac_cv_host
14915shift
14916host_cpu=$1
14917host_vendor=$2
14918shift; shift
14919# Remember, the first character of IFS is used to create $*,
14920# except with old shells:
14921host_os=$*
14922IFS=$ac_save_IFS
14923case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14924
14925
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14927$as_echo_n "checking target system type... " >&6; }
14928if ${ac_cv_target+:} false; then :
14929  $as_echo_n "(cached) " >&6
14930else
14931  if test "x$target_alias" = x; then
14932  ac_cv_target=$ac_cv_host
14933else
14934  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14935    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14936fi
14937
14938fi
14939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14940$as_echo "$ac_cv_target" >&6; }
14941case $ac_cv_target in
14942*-*-*) ;;
14943*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14944esac
14945target=$ac_cv_target
14946ac_save_IFS=$IFS; IFS='-'
14947set x $ac_cv_target
14948shift
14949target_cpu=$1
14950target_vendor=$2
14951shift; shift
14952# Remember, the first character of IFS is used to create $*,
14953# except with old shells:
14954target_os=$*
14955IFS=$ac_save_IFS
14956case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14957
14958
14959# The aliases save the names the user supplied, while $host etc.
14960# will get canonicalized.
14961test -n "$target_alias" &&
14962  test "$program_prefix$program_suffix$program_transform_name" = \
14963    NONENONEs,x,x, &&
14964  program_prefix=${target_alias}-
14965
14966  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14967  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14968  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14969  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14970  # to use the configure naming style.
14971
14972
14973
14974
14975
14976  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14977  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14978  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14979  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14980  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14981  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14982
14983
14984
14985  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14986
14987  case "$build_os" in
14988    *linux*)
14989      VAR_OS=linux
14990      VAR_OS_TYPE=unix
14991      ;;
14992    *solaris*)
14993      VAR_OS=solaris
14994      VAR_OS_TYPE=unix
14995      ;;
14996    *darwin*)
14997      VAR_OS=macosx
14998      VAR_OS_TYPE=unix
14999      ;;
15000    *bsd*)
15001      VAR_OS=bsd
15002      VAR_OS_TYPE=unix
15003      ;;
15004    *cygwin*)
15005      VAR_OS=windows
15006      VAR_OS_ENV=windows.cygwin
15007      ;;
15008    *mingw*)
15009      VAR_OS=windows
15010      VAR_OS_ENV=windows.msys
15011      ;;
15012    *aix*)
15013      VAR_OS=aix
15014      VAR_OS_TYPE=unix
15015      ;;
15016    *)
15017      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15018      ;;
15019  esac
15020
15021
15022  # First argument is the cpu name from the trip/quad
15023  case "$build_cpu" in
15024    x86_64)
15025      VAR_CPU=x86_64
15026      VAR_CPU_ARCH=x86
15027      VAR_CPU_BITS=64
15028      VAR_CPU_ENDIAN=little
15029      ;;
15030    i?86)
15031      VAR_CPU=x86
15032      VAR_CPU_ARCH=x86
15033      VAR_CPU_BITS=32
15034      VAR_CPU_ENDIAN=little
15035      ;;
15036    arm*)
15037      VAR_CPU=arm
15038      VAR_CPU_ARCH=arm
15039      VAR_CPU_BITS=32
15040      VAR_CPU_ENDIAN=little
15041      ;;
15042    aarch64)
15043      VAR_CPU=aarch64
15044      VAR_CPU_ARCH=aarch64
15045      VAR_CPU_BITS=64
15046      VAR_CPU_ENDIAN=little
15047      ;;
15048    powerpc)
15049      VAR_CPU=ppc
15050      VAR_CPU_ARCH=ppc
15051      VAR_CPU_BITS=32
15052      VAR_CPU_ENDIAN=big
15053      ;;
15054    powerpc64)
15055      VAR_CPU=ppc64
15056      VAR_CPU_ARCH=ppc
15057      VAR_CPU_BITS=64
15058      VAR_CPU_ENDIAN=big
15059      ;;
15060    powerpc64le)
15061      VAR_CPU=ppc64le
15062      VAR_CPU_ARCH=ppc
15063      VAR_CPU_BITS=64
15064      VAR_CPU_ENDIAN=little
15065      ;;
15066    s390)
15067      VAR_CPU=s390
15068      VAR_CPU_ARCH=s390
15069      VAR_CPU_BITS=32
15070      VAR_CPU_ENDIAN=big
15071      ;;
15072    s390x)
15073      VAR_CPU=s390x
15074      VAR_CPU_ARCH=s390
15075      VAR_CPU_BITS=64
15076      VAR_CPU_ENDIAN=big
15077      ;;
15078    sparc)
15079      VAR_CPU=sparc
15080      VAR_CPU_ARCH=sparc
15081      VAR_CPU_BITS=32
15082      VAR_CPU_ENDIAN=big
15083      ;;
15084    sparcv9|sparc64)
15085      VAR_CPU=sparcv9
15086      VAR_CPU_ARCH=sparc
15087      VAR_CPU_BITS=64
15088      VAR_CPU_ENDIAN=big
15089      ;;
15090    *)
15091      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15092      ;;
15093  esac
15094
15095  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15096  OPENJDK_BUILD_OS="$VAR_OS"
15097  if test "x$VAR_OS_TYPE" != x; then
15098    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15099  else
15100    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15101  fi
15102  if test "x$VAR_OS_ENV" != x; then
15103    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15104  else
15105    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15106  fi
15107  OPENJDK_BUILD_CPU="$VAR_CPU"
15108  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15109  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15110  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15111
15112
15113
15114
15115
15116
15117
15118
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15120$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15122$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15123
15124  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15125
15126  case "$host_os" in
15127    *linux*)
15128      VAR_OS=linux
15129      VAR_OS_TYPE=unix
15130      ;;
15131    *solaris*)
15132      VAR_OS=solaris
15133      VAR_OS_TYPE=unix
15134      ;;
15135    *darwin*)
15136      VAR_OS=macosx
15137      VAR_OS_TYPE=unix
15138      ;;
15139    *bsd*)
15140      VAR_OS=bsd
15141      VAR_OS_TYPE=unix
15142      ;;
15143    *cygwin*)
15144      VAR_OS=windows
15145      VAR_OS_ENV=windows.cygwin
15146      ;;
15147    *mingw*)
15148      VAR_OS=windows
15149      VAR_OS_ENV=windows.msys
15150      ;;
15151    *aix*)
15152      VAR_OS=aix
15153      VAR_OS_TYPE=unix
15154      ;;
15155    *)
15156      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15157      ;;
15158  esac
15159
15160
15161  # First argument is the cpu name from the trip/quad
15162  case "$host_cpu" in
15163    x86_64)
15164      VAR_CPU=x86_64
15165      VAR_CPU_ARCH=x86
15166      VAR_CPU_BITS=64
15167      VAR_CPU_ENDIAN=little
15168      ;;
15169    i?86)
15170      VAR_CPU=x86
15171      VAR_CPU_ARCH=x86
15172      VAR_CPU_BITS=32
15173      VAR_CPU_ENDIAN=little
15174      ;;
15175    arm*)
15176      VAR_CPU=arm
15177      VAR_CPU_ARCH=arm
15178      VAR_CPU_BITS=32
15179      VAR_CPU_ENDIAN=little
15180      ;;
15181    aarch64)
15182      VAR_CPU=aarch64
15183      VAR_CPU_ARCH=aarch64
15184      VAR_CPU_BITS=64
15185      VAR_CPU_ENDIAN=little
15186      ;;
15187    powerpc)
15188      VAR_CPU=ppc
15189      VAR_CPU_ARCH=ppc
15190      VAR_CPU_BITS=32
15191      VAR_CPU_ENDIAN=big
15192      ;;
15193    powerpc64)
15194      VAR_CPU=ppc64
15195      VAR_CPU_ARCH=ppc
15196      VAR_CPU_BITS=64
15197      VAR_CPU_ENDIAN=big
15198      ;;
15199    powerpc64le)
15200      VAR_CPU=ppc64le
15201      VAR_CPU_ARCH=ppc
15202      VAR_CPU_BITS=64
15203      VAR_CPU_ENDIAN=little
15204      ;;
15205    s390)
15206      VAR_CPU=s390
15207      VAR_CPU_ARCH=s390
15208      VAR_CPU_BITS=32
15209      VAR_CPU_ENDIAN=big
15210      ;;
15211    s390x)
15212      VAR_CPU=s390x
15213      VAR_CPU_ARCH=s390
15214      VAR_CPU_BITS=64
15215      VAR_CPU_ENDIAN=big
15216      ;;
15217    sparc)
15218      VAR_CPU=sparc
15219      VAR_CPU_ARCH=sparc
15220      VAR_CPU_BITS=32
15221      VAR_CPU_ENDIAN=big
15222      ;;
15223    sparcv9|sparc64)
15224      VAR_CPU=sparcv9
15225      VAR_CPU_ARCH=sparc
15226      VAR_CPU_BITS=64
15227      VAR_CPU_ENDIAN=big
15228      ;;
15229    *)
15230      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15231      ;;
15232  esac
15233
15234  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15235  OPENJDK_TARGET_OS="$VAR_OS"
15236  if test "x$VAR_OS_TYPE" != x; then
15237    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15238  else
15239    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15240  fi
15241  if test "x$VAR_OS_ENV" != x; then
15242    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15243  else
15244    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15245  fi
15246  OPENJDK_TARGET_CPU="$VAR_CPU"
15247  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15248  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15249  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15250
15251
15252
15253
15254
15255
15256
15257
15258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15259$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15261$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15262
15263
15264
15265# Check whether --with-target-bits was given.
15266if test "${with_target_bits+set}" = set; then :
15267  withval=$with_target_bits;
15268fi
15269
15270
15271  # We have three types of compiles:
15272  # native  == normal compilation, target system == build system
15273  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15274  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15275  #
15276  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15277    # We're doing a proper cross-compilation
15278    COMPILE_TYPE="cross"
15279  else
15280    COMPILE_TYPE="native"
15281  fi
15282
15283  if test "x$with_target_bits" != x; then
15284    if test "x$COMPILE_TYPE" = "xcross"; then
15285      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15286    fi
15287
15288    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15289      # A reduced build is requested
15290      COMPILE_TYPE="reduced"
15291      OPENJDK_TARGET_CPU_BITS=32
15292      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15293        OPENJDK_TARGET_CPU=x86
15294      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15295        OPENJDK_TARGET_CPU=sparc
15296      else
15297        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15298      fi
15299    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15300      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
15301    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15302      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15303$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15304    else
15305      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15306    fi
15307  fi
15308
15309
15310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15311$as_echo_n "checking compilation type... " >&6; }
15312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15313$as_echo "$COMPILE_TYPE" >&6; }
15314
15315
15316  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15317    REQUIRED_OS_NAME=SunOS
15318    REQUIRED_OS_VERSION=5.10
15319  fi
15320  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15321    REQUIRED_OS_NAME=Linux
15322    REQUIRED_OS_VERSION=2.6
15323  fi
15324  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15325    REQUIRED_OS_NAME=Windows
15326    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15327      REQUIRED_OS_VERSION=5.2
15328    else
15329      REQUIRED_OS_VERSION=5.1
15330    fi
15331  fi
15332  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15333    REQUIRED_OS_NAME=Darwin
15334    REQUIRED_OS_VERSION=11.2
15335  fi
15336  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15337    REQUIRED_OS_NAME=AIX
15338    REQUIRED_OS_VERSION=7.1
15339  fi
15340
15341
15342
15343
15344
15345
15346  # Also store the legacy naming of the cpu.
15347  # Ie i586 and amd64 instead of x86 and x86_64
15348  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15349  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15350    OPENJDK_TARGET_CPU_LEGACY="i586"
15351  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15352    # On all platforms except MacOSX replace x86_64 with amd64.
15353    OPENJDK_TARGET_CPU_LEGACY="amd64"
15354  fi
15355
15356
15357  # And the second legacy naming of the cpu.
15358  # Ie i386 and amd64 instead of x86 and x86_64.
15359  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15360  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15361    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15362  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15363    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15364  fi
15365
15366
15367  # This is the name of the cpu (but using i386 and amd64 instead of
15368  # x86 and x86_64, respectively), preceeded by a /, to be used when
15369  # locating libraries. On macosx, it's empty, though.
15370  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15371  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15372    OPENJDK_TARGET_CPU_LIBDIR=""
15373  fi
15374
15375
15376  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15377  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15378  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15379  OPENJDK_TARGET_CPU_ISADIR=""
15380  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15381    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15382      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15383    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15384      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15385    fi
15386  fi
15387
15388
15389  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15390  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15391  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15392    # On linux only, we replace x86 with i386.
15393    OPENJDK_TARGET_CPU_OSARCH="i386"
15394  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15395    # On all platforms except macosx, we replace x86_64 with amd64.
15396    OPENJDK_TARGET_CPU_OSARCH="amd64"
15397  fi
15398
15399
15400  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15401  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15402    OPENJDK_TARGET_CPU_JLI="i386"
15403  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15404    # On all platforms except macosx, we replace x86_64 with amd64.
15405    OPENJDK_TARGET_CPU_JLI="amd64"
15406  fi
15407  # Now setup the -D flags for building libjli.
15408  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15409  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15410    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15411      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15412    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15413      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15414    fi
15415  fi
15416
15417
15418  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15419      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15420  else
15421      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15422  fi
15423
15424
15425  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15426    A_LP64="LP64:="
15427    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15428    # unpack200.exe
15429    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15430      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15431    fi
15432  fi
15433  LP64=$A_LP64
15434
15435
15436  if test "x$COMPILE_TYPE" = "xcross"; then
15437    # FIXME: ... or should this include reduced builds..?
15438    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15439  else
15440    DEFINE_CROSS_COMPILE_ARCH=""
15441  fi
15442
15443
15444  # Convert openjdk platform names to hotspot names
15445
15446  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15447  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15448    HOTSPOT_TARGET_OS=bsd
15449  fi
15450
15451
15452  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15453  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15454    HOTSPOT_TARGET_OS_TYPE=posix
15455  fi
15456
15457
15458  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15459  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15460    HOTSPOT_TARGET_CPU=x86_32
15461  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15462    HOTSPOT_TARGET_CPU=sparc
15463  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15464    HOTSPOT_TARGET_CPU=ppc_64
15465  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15466    HOTSPOT_TARGET_CPU=ppc_64
15467  fi
15468
15469
15470  # This is identical with OPENJDK_*, but define anyway for consistency.
15471  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15472
15473
15474  # Setup HOTSPOT_TARGET_CPU_DEFINE
15475  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15476    HOTSPOT_TARGET_CPU_DEFINE=IA32
15477  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15478    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15479  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15480    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15481  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15482    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15483  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15484    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15485  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15486    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15487
15488  # The cpu defines below are for zero, we don't support them directly.
15489  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15490    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15491  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15492    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15493  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15494    HOTSPOT_TARGET_CPU_DEFINE=S390
15495  elif test "x$OPENJDK_TARGET_CPU" = ss390x; then
15496    HOTSPOT_TARGET_CPU_DEFINE=S390
15497  fi
15498
15499
15500
15501
15502  # Also store the legacy naming of the cpu.
15503  # Ie i586 and amd64 instead of x86 and x86_64
15504  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15505  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15506    OPENJDK_BUILD_CPU_LEGACY="i586"
15507  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15508    # On all platforms except MacOSX replace x86_64 with amd64.
15509    OPENJDK_BUILD_CPU_LEGACY="amd64"
15510  fi
15511
15512
15513  # And the second legacy naming of the cpu.
15514  # Ie i386 and amd64 instead of x86 and x86_64.
15515  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15516  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15517    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15518  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15519    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15520  fi
15521
15522
15523  # This is the name of the cpu (but using i386 and amd64 instead of
15524  # x86 and x86_64, respectively), preceeded by a /, to be used when
15525  # locating libraries. On macosx, it's empty, though.
15526  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15527  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15528    OPENJDK_BUILD_CPU_LIBDIR=""
15529  fi
15530
15531
15532  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15533  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15534  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15535  OPENJDK_BUILD_CPU_ISADIR=""
15536  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15537    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15538      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15539    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15540      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15541    fi
15542  fi
15543
15544
15545  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15546  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15547  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15548    # On linux only, we replace x86 with i386.
15549    OPENJDK_BUILD_CPU_OSARCH="i386"
15550  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15551    # On all platforms except macosx, we replace x86_64 with amd64.
15552    OPENJDK_BUILD_CPU_OSARCH="amd64"
15553  fi
15554
15555
15556  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15557  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15558    OPENJDK_BUILD_CPU_JLI="i386"
15559  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15560    # On all platforms except macosx, we replace x86_64 with amd64.
15561    OPENJDK_BUILD_CPU_JLI="amd64"
15562  fi
15563  # Now setup the -D flags for building libjli.
15564  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15565  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15566    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15567      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15568    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15569      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15570    fi
15571  fi
15572
15573
15574  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15575      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15576  else
15577      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15578  fi
15579
15580
15581  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15582    A_LP64="LP64:="
15583    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15584    # unpack200.exe
15585    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15586      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15587    fi
15588  fi
15589  LP64=$A_LP64
15590
15591
15592  if test "x$COMPILE_TYPE" = "xcross"; then
15593    # FIXME: ... or should this include reduced builds..?
15594    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15595  else
15596    DEFINE_CROSS_COMPILE_ARCH=""
15597  fi
15598
15599
15600  # Convert openjdk platform names to hotspot names
15601
15602  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15603  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15604    HOTSPOT_BUILD_OS=bsd
15605  fi
15606
15607
15608  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15609  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15610    HOTSPOT_BUILD_OS_TYPE=posix
15611  fi
15612
15613
15614  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15615  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15616    HOTSPOT_BUILD_CPU=x86_32
15617  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15618    HOTSPOT_BUILD_CPU=sparc
15619  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15620    HOTSPOT_BUILD_CPU=ppc_64
15621  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15622    HOTSPOT_BUILD_CPU=ppc_64
15623  fi
15624
15625
15626  # This is identical with OPENJDK_*, but define anyway for consistency.
15627  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15628
15629
15630  # Setup HOTSPOT_BUILD_CPU_DEFINE
15631  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15632    HOTSPOT_BUILD_CPU_DEFINE=IA32
15633  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15634    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15635  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15636    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15637  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15638    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15639  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15640    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15641  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15642    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15643
15644  # The cpu defines below are for zero, we don't support them directly.
15645  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15646    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15647  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15648    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15649  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15650    HOTSPOT_BUILD_CPU_DEFINE=S390
15651  elif test "x$OPENJDK_BUILD_CPU" = ss390x; then
15652    HOTSPOT_BUILD_CPU_DEFINE=S390
15653  fi
15654
15655
15656
15657
15658  # ZERO_ARCHDEF is used to enable architecture-specific code.
15659  # This is used in legacy hotspot build.
15660  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15661
15662
15663
15664
15665
15666# Continue setting up basic stuff. Most remaining code require fundamental tools.
15667
15668  # Save the current directory this script was started from
15669  CURDIR="$PWD"
15670
15671  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15672  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15673  # was not available at that time.
15674  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15675  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15676    ORIGINAL_PATH="$REWRITTEN_PATH"
15677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15678$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15679  fi
15680
15681  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15682    PATH_SEP=";"
15683
15684  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15685  if test $SRC_ROOT_LENGTH -gt 100; then
15686    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15687  fi
15688
15689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15691$as_echo_n "checking cygwin release... " >&6; }
15692    CYGWIN_VERSION=`$UNAME -r`
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15694$as_echo "$CYGWIN_VERSION" >&6; }
15695    WINDOWS_ENV_VENDOR='cygwin'
15696    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15697
15698    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15699    if test "x$CYGWIN_VERSION_OLD" != x; then
15700      { $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
15701$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;}
15702      as_fn_error $? "Cannot continue" "$LINENO" 5
15703    fi
15704    if test "x$CYGPATH" = x; then
15705      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15706    fi
15707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15708$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15709    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15710    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15711    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15712    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15714$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15715    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15716    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15717    if test "x$test_cygdrive_prefix" = x; then
15718      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15719    fi
15720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15722$as_echo_n "checking msys release... " >&6; }
15723    MSYS_VERSION=`$UNAME -r`
15724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15725$as_echo "$MSYS_VERSION" >&6; }
15726
15727    WINDOWS_ENV_VENDOR='msys'
15728    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15729
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15731$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15732    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15733    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15734
15735  windows_path="$MSYS_ROOT_PATH"
15736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15737    unix_path=`$CYGPATH -u "$windows_path"`
15738    MSYS_ROOT_PATH="$unix_path"
15739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15741    MSYS_ROOT_PATH="$unix_path"
15742  fi
15743
15744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15745$as_echo "$MSYS_ROOT_PATH" >&6; }
15746    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15747  else
15748    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15749  fi
15750
15751  # Test if windows or unix (cygwin/msys) find is first in path.
15752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15753$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15754  FIND_BINARY_OUTPUT=`find --version 2>&1`
15755  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15757$as_echo "unix style" >&6; }
15758  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15760$as_echo "Windows" >&6; }
15761    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15762$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15763    { $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
15764$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15765    as_fn_error $? "Cannot continue" "$LINENO" 5
15766  else
15767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15768$as_echo "unknown" >&6; }
15769    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15770$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15771  fi
15772
15773  else
15774    PATH_SEP=":"
15775  fi
15776
15777
15778  # We get the top-level directory from the supporting wrappers.
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15780$as_echo_n "checking for top-level directory... " >&6; }
15781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15782$as_echo "$TOPDIR" >&6; }
15783
15784
15785  # Save the original version of TOPDIR for string comparisons
15786  ORIGINAL_TOPDIR="$TOPDIR"
15787
15788
15789  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15790
15791  # Only process if variable expands to non-empty
15792
15793  if test "x$CURDIR" != x; then
15794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15795
15796  # Input might be given as Windows format, start by converting to
15797  # unix format.
15798  path="$CURDIR"
15799  new_path=`$CYGPATH -u "$path"`
15800
15801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15804  # "foo.exe" is OK but "foo" is an error.
15805  #
15806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15807  # It is also a way to make sure we got the proper file name for the real test later on.
15808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15809  if test "x$test_shortpath" = x; then
15810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15811$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15812    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15813  fi
15814
15815  # Call helper function which possibly converts this using DOS-style short mode.
15816  # If so, the updated path is stored in $new_path.
15817
15818  input_path="$new_path"
15819  # Check if we need to convert this using DOS-style short mode. If the path
15820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15821  # take no chances and rewrite it.
15822  # Note: m4 eats our [], so we need to use [ and ] instead.
15823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15824  if test "x$has_forbidden_chars" != x; then
15825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15829      # Going to short mode and back again did indeed matter. Since short mode is
15830      # case insensitive, let's make it lowercase to improve readability.
15831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15832      # Now convert it back to Unix-style (cygpath)
15833      input_path=`$CYGPATH -u "$shortmode_path"`
15834      new_path="$input_path"
15835    fi
15836  fi
15837
15838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15839  if test "x$test_cygdrive_prefix" = x; then
15840    # As a simple fix, exclude /usr/bin since it's not a real path.
15841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15843      # a path prefixed by /cygdrive for fixpath to work.
15844      new_path="$CYGWIN_ROOT_PATH$input_path"
15845    fi
15846  fi
15847
15848
15849  if test "x$path" != "x$new_path"; then
15850    CURDIR="$new_path"
15851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15852$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15853  fi
15854
15855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15856
15857  path="$CURDIR"
15858  has_colon=`$ECHO $path | $GREP ^.:`
15859  new_path="$path"
15860  if test "x$has_colon" = x; then
15861    # Not in mixed or Windows style, start by that.
15862    new_path=`cmd //c echo $path`
15863  fi
15864
15865
15866  input_path="$new_path"
15867  # Check if we need to convert this using DOS-style short mode. If the path
15868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15869  # take no chances and rewrite it.
15870  # Note: m4 eats our [], so we need to use [ and ] instead.
15871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15872  if test "x$has_forbidden_chars" != x; then
15873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15875  fi
15876
15877
15878  windows_path="$new_path"
15879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15880    unix_path=`$CYGPATH -u "$windows_path"`
15881    new_path="$unix_path"
15882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15884    new_path="$unix_path"
15885  fi
15886
15887  if test "x$path" != "x$new_path"; then
15888    CURDIR="$new_path"
15889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15890$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15891  fi
15892
15893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15895
15896    else
15897      # We're on a unix platform. Hooray! :)
15898      path="$CURDIR"
15899      has_space=`$ECHO "$path" | $GREP " "`
15900      if test "x$has_space" != x; then
15901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15902$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15904      fi
15905
15906      # Use eval to expand a potential ~
15907      eval path="$path"
15908      if test ! -f "$path" && test ! -d "$path"; then
15909        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15910      fi
15911
15912      if test -d "$path"; then
15913        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15914      else
15915        dir="`$DIRNAME "$path"`"
15916        base="`$BASENAME "$path"`"
15917        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15918      fi
15919    fi
15920  fi
15921
15922
15923  # Only process if variable expands to non-empty
15924
15925  if test "x$TOPDIR" != x; then
15926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15927
15928  # Input might be given as Windows format, start by converting to
15929  # unix format.
15930  path="$TOPDIR"
15931  new_path=`$CYGPATH -u "$path"`
15932
15933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15936  # "foo.exe" is OK but "foo" is an error.
15937  #
15938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15939  # It is also a way to make sure we got the proper file name for the real test later on.
15940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15941  if test "x$test_shortpath" = x; then
15942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15943$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15944    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15945  fi
15946
15947  # Call helper function which possibly converts this using DOS-style short mode.
15948  # If so, the updated path is stored in $new_path.
15949
15950  input_path="$new_path"
15951  # Check if we need to convert this using DOS-style short mode. If the path
15952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15953  # take no chances and rewrite it.
15954  # Note: m4 eats our [], so we need to use [ and ] instead.
15955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15956  if test "x$has_forbidden_chars" != x; then
15957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15961      # Going to short mode and back again did indeed matter. Since short mode is
15962      # case insensitive, let's make it lowercase to improve readability.
15963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15964      # Now convert it back to Unix-style (cygpath)
15965      input_path=`$CYGPATH -u "$shortmode_path"`
15966      new_path="$input_path"
15967    fi
15968  fi
15969
15970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15971  if test "x$test_cygdrive_prefix" = x; then
15972    # As a simple fix, exclude /usr/bin since it's not a real path.
15973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15975      # a path prefixed by /cygdrive for fixpath to work.
15976      new_path="$CYGWIN_ROOT_PATH$input_path"
15977    fi
15978  fi
15979
15980
15981  if test "x$path" != "x$new_path"; then
15982    TOPDIR="$new_path"
15983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15984$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15985  fi
15986
15987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15988
15989  path="$TOPDIR"
15990  has_colon=`$ECHO $path | $GREP ^.:`
15991  new_path="$path"
15992  if test "x$has_colon" = x; then
15993    # Not in mixed or Windows style, start by that.
15994    new_path=`cmd //c echo $path`
15995  fi
15996
15997
15998  input_path="$new_path"
15999  # Check if we need to convert this using DOS-style short mode. If the path
16000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16001  # take no chances and rewrite it.
16002  # Note: m4 eats our [], so we need to use [ and ] instead.
16003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16004  if test "x$has_forbidden_chars" != x; then
16005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16007  fi
16008
16009
16010  windows_path="$new_path"
16011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16012    unix_path=`$CYGPATH -u "$windows_path"`
16013    new_path="$unix_path"
16014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16016    new_path="$unix_path"
16017  fi
16018
16019  if test "x$path" != "x$new_path"; then
16020    TOPDIR="$new_path"
16021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16022$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16023  fi
16024
16025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16027
16028    else
16029      # We're on a unix platform. Hooray! :)
16030      path="$TOPDIR"
16031      has_space=`$ECHO "$path" | $GREP " "`
16032      if test "x$has_space" != x; then
16033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16034$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16036      fi
16037
16038      # Use eval to expand a potential ~
16039      eval path="$path"
16040      if test ! -f "$path" && test ! -d "$path"; then
16041        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16042      fi
16043
16044      if test -d "$path"; then
16045        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16046      else
16047        dir="`$DIRNAME "$path"`"
16048        base="`$BASENAME "$path"`"
16049        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16050      fi
16051    fi
16052  fi
16053
16054  # SRC_ROOT is a traditional alias for TOPDIR.
16055  SRC_ROOT=$TOPDIR
16056
16057  # Calculate a canonical version of TOPDIR for string comparisons
16058  CANONICAL_TOPDIR=$TOPDIR
16059
16060  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16061    # Follow a chain of symbolic links. Use readlink
16062    # where it exists, else fall back to horribly
16063    # complicated shell code.
16064    if test "x$READLINK_TESTED" != yes; then
16065      # On MacOSX there is a readlink tool with a different
16066      # purpose than the GNU readlink tool. Check the found readlink.
16067      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16068      if test "x$ISGNU" = x; then
16069        # A readlink that we do not know how to use.
16070        # Are there other non-GNU readlinks out there?
16071        READLINK_TESTED=yes
16072        READLINK=
16073      fi
16074    fi
16075
16076    if test "x$READLINK" != x; then
16077      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16078    else
16079      # Save the current directory for restoring afterwards
16080      STARTDIR=$PWD
16081      COUNTER=0
16082      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16083      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16084      cd $sym_link_dir
16085      # Use -P flag to resolve symlinks in directories.
16086      cd `$THEPWDCMD -P`
16087      sym_link_dir=`$THEPWDCMD -P`
16088      # Resolve file symlinks
16089      while test $COUNTER -lt 20; do
16090        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16091        if test "x$ISLINK" == x; then
16092          # This is not a symbolic link! We are done!
16093          break
16094        fi
16095        # Again resolve directory symlinks since the target of the just found
16096        # link could be in a different directory
16097        cd `$DIRNAME $ISLINK`
16098        sym_link_dir=`$THEPWDCMD -P`
16099        sym_link_file=`$BASENAME $ISLINK`
16100        let COUNTER=COUNTER+1
16101      done
16102      cd $STARTDIR
16103      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16104    fi
16105  fi
16106
16107
16108
16109  # Locate the directory of this script.
16110  AUTOCONF_DIR=$TOPDIR/common/autoconf
16111
16112  # Setup username (for use in adhoc version strings etc)
16113  # Outer [ ] to quote m4.
16114   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16115
16116
16117
16118# Check if it's a pure open build or if custom sources are to be used.
16119
16120  # Check whether --enable-openjdk-only was given.
16121if test "${enable_openjdk_only+set}" = set; then :
16122  enableval=$enable_openjdk_only;
16123else
16124  enable_openjdk_only="no"
16125fi
16126
16127
16128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16129$as_echo_n "checking for presence of closed sources... " >&6; }
16130  if test -d "$SRC_ROOT/jdk/src/closed"; then
16131    CLOSED_SOURCE_PRESENT=yes
16132  else
16133    CLOSED_SOURCE_PRESENT=no
16134  fi
16135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16136$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16137
16138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16139$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16140  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16142$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16143
16144  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16145    OPENJDK=true
16146    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16147      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16148$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16149    fi
16150  else
16151    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16152      OPENJDK=true
16153    else
16154      OPENJDK=false
16155    fi
16156  fi
16157
16158  if test "x$OPENJDK" = "xtrue"; then
16159    SET_OPENJDK="OPENJDK=true"
16160  fi
16161
16162
16163
16164  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16165  # the IncludeCustomExtension macro.
16166
16167
16168# Check whether --with-custom-make-dir was given.
16169if test "${with_custom_make_dir+set}" = set; then :
16170  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
16171$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16172fi
16173
16174
16175
16176
16177# These are needed to be able to create a configuration name (and thus the output directory)
16178
16179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16180$as_echo_n "checking which variant of the JDK to build... " >&6; }
16181
16182# Check whether --with-jdk-variant was given.
16183if test "${with_jdk_variant+set}" = set; then :
16184  withval=$with_jdk_variant;
16185fi
16186
16187
16188  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16189    JDK_VARIANT="normal"
16190  else
16191    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16192  fi
16193
16194
16195
16196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16197$as_echo "$JDK_VARIANT" >&6; }
16198
16199
16200  DEBUG_LEVEL="release"
16201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16202$as_echo_n "checking which debug level to use... " >&6; }
16203  # Check whether --enable-debug was given.
16204if test "${enable_debug+set}" = set; then :
16205  enableval=$enable_debug;
16206        ENABLE_DEBUG="${enableval}"
16207        DEBUG_LEVEL="fastdebug"
16208
16209else
16210  ENABLE_DEBUG="no"
16211fi
16212
16213
16214
16215# Check whether --with-debug-level was given.
16216if test "${with_debug_level+set}" = set; then :
16217  withval=$with_debug_level;
16218        DEBUG_LEVEL="${withval}"
16219        if test "x$ENABLE_DEBUG" = xyes; then
16220          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16221        fi
16222
16223fi
16224
16225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16226$as_echo "$DEBUG_LEVEL" >&6; }
16227
16228  if test "x$DEBUG_LEVEL" != xrelease && \
16229      test "x$DEBUG_LEVEL" != xoptimized && \
16230      test "x$DEBUG_LEVEL" != xfastdebug && \
16231      test "x$DEBUG_LEVEL" != xslowdebug; then
16232    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16233  fi
16234
16235  # Translate DEBUG_LEVEL to debug level used by Hotspot
16236  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16237  if test "x$DEBUG_LEVEL" = xrelease; then
16238    HOTSPOT_DEBUG_LEVEL="product"
16239  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16240    HOTSPOT_DEBUG_LEVEL="debug"
16241  fi
16242
16243  if test "x$DEBUG_LEVEL" = xoptimized; then
16244    # The debug level 'optimized' is a little special because it is currently only
16245    # applicable to the HotSpot build where it means to build a completely
16246    # optimized version of the VM without any debugging code (like for the
16247    # 'release' debug level which is called 'product' in the HotSpot build) but
16248    # with the exception that it can contain additional code which is otherwise
16249    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16250    # test new and/or experimental features which are not intended for customer
16251    # shipment. Because these new features need to be tested and benchmarked in
16252    # real world scenarios, we want to build the containing JDK at the 'release'
16253    # debug level.
16254    DEBUG_LEVEL="release"
16255  fi
16256
16257
16258
16259
16260
16261
16262# Check whether --with-jvm-variants was given.
16263if test "${with_jvm_variants+set}" = set; then :
16264  withval=$with_jvm_variants;
16265fi
16266
16267
16268  if test "x$with_jvm_variants" = x; then
16269    with_jvm_variants="server"
16270  fi
16271  JVM_VARIANTS_OPT="$with_jvm_variants"
16272
16273  # Has the user listed more than one variant?
16274  # Additional [] needed to keep m4 from mangling shell constructs.
16275  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16276    BUILDING_MULTIPLE_JVM_VARIANTS=true
16277  else
16278    BUILDING_MULTIPLE_JVM_VARIANTS=false
16279  fi
16280  # Replace the commas with AND for use in the build directory name.
16281  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16282
16283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16284$as_echo_n "checking which variants of the JVM to build... " >&6; }
16285  # JVM_VARIANTS is a space-separated list.
16286  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16287  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16289$as_echo "$JVM_VARIANTS" >&6; }
16290
16291  # Check that the selected variants are valid
16292
16293  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16294  # Notice that the original variant failes on SLES 10 and 11
16295  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16296  STACK=${JVM_VARIANTS// /$'\n'}
16297  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16298  if test "x$INVALID_VARIANTS" != x; then
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16300$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16301    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16302  fi
16303
16304  # All "special" variants share the same output directory ("server")
16305  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16306  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16307  STACK=${JVM_VARIANTS// /$'\n'}
16308  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16309  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16310    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16311  fi
16312
16313
16314
16315
16316  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16317    # zero behaves as a platform and rewrites these values. This is really weird. :(
16318    # We are guaranteed that we do not build any other variants when building zero.
16319    HOTSPOT_TARGET_CPU=zero
16320    HOTSPOT_TARGET_CPU_ARCH=zero
16321  fi
16322
16323
16324# With basic setup done, call the custom early hook.
16325
16326
16327# Check if we have devkits, extra paths or sysroot set.
16328
16329
16330# Check whether --with-devkit was given.
16331if test "${with_devkit+set}" = set; then :
16332  withval=$with_devkit;
16333
16334  # Only process if variable expands to non-empty
16335
16336  if test "x$with_devkit" != x; then
16337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338
16339  # Input might be given as Windows format, start by converting to
16340  # unix format.
16341  path="$with_devkit"
16342  new_path=`$CYGPATH -u "$path"`
16343
16344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16347  # "foo.exe" is OK but "foo" is an error.
16348  #
16349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16350  # It is also a way to make sure we got the proper file name for the real test later on.
16351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16352  if test "x$test_shortpath" = x; then
16353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16354$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16355    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16356  fi
16357
16358  # Call helper function which possibly converts this using DOS-style short mode.
16359  # If so, the updated path is stored in $new_path.
16360
16361  input_path="$new_path"
16362  # Check if we need to convert this using DOS-style short mode. If the path
16363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16364  # take no chances and rewrite it.
16365  # Note: m4 eats our [], so we need to use [ and ] instead.
16366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16367  if test "x$has_forbidden_chars" != x; then
16368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16372      # Going to short mode and back again did indeed matter. Since short mode is
16373      # case insensitive, let's make it lowercase to improve readability.
16374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16375      # Now convert it back to Unix-style (cygpath)
16376      input_path=`$CYGPATH -u "$shortmode_path"`
16377      new_path="$input_path"
16378    fi
16379  fi
16380
16381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16382  if test "x$test_cygdrive_prefix" = x; then
16383    # As a simple fix, exclude /usr/bin since it's not a real path.
16384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16386      # a path prefixed by /cygdrive for fixpath to work.
16387      new_path="$CYGWIN_ROOT_PATH$input_path"
16388    fi
16389  fi
16390
16391
16392  if test "x$path" != "x$new_path"; then
16393    with_devkit="$new_path"
16394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16395$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16396  fi
16397
16398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399
16400  path="$with_devkit"
16401  has_colon=`$ECHO $path | $GREP ^.:`
16402  new_path="$path"
16403  if test "x$has_colon" = x; then
16404    # Not in mixed or Windows style, start by that.
16405    new_path=`cmd //c echo $path`
16406  fi
16407
16408
16409  input_path="$new_path"
16410  # Check if we need to convert this using DOS-style short mode. If the path
16411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16412  # take no chances and rewrite it.
16413  # Note: m4 eats our [], so we need to use [ and ] instead.
16414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16415  if test "x$has_forbidden_chars" != x; then
16416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16418  fi
16419
16420
16421  windows_path="$new_path"
16422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16423    unix_path=`$CYGPATH -u "$windows_path"`
16424    new_path="$unix_path"
16425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16427    new_path="$unix_path"
16428  fi
16429
16430  if test "x$path" != "x$new_path"; then
16431    with_devkit="$new_path"
16432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16433$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16434  fi
16435
16436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16438
16439    else
16440      # We're on a unix platform. Hooray! :)
16441      path="$with_devkit"
16442      has_space=`$ECHO "$path" | $GREP " "`
16443      if test "x$has_space" != x; then
16444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16445$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16447      fi
16448
16449      # Use eval to expand a potential ~
16450      eval path="$path"
16451      if test ! -f "$path" && test ! -d "$path"; then
16452        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16453      fi
16454
16455      if test -d "$path"; then
16456        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16457      else
16458        dir="`$DIRNAME "$path"`"
16459        base="`$BASENAME "$path"`"
16460        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16461      fi
16462    fi
16463  fi
16464
16465        DEVKIT_ROOT="$with_devkit"
16466        # Check for a meta data info file in the root of the devkit
16467        if test -f "$DEVKIT_ROOT/devkit.info"; then
16468          . $DEVKIT_ROOT/devkit.info
16469          # This potentially sets the following:
16470          # A descriptive name of the devkit
16471
16472  if test "x$DEVKIT_NAME" = x; then
16473    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16474  fi
16475
16476          # Corresponds to --with-extra-path
16477
16478  if test "x$DEVKIT_EXTRA_PATH" = x; then
16479    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16480  fi
16481
16482          # Corresponds to --with-toolchain-path
16483
16484  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16485    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16486  fi
16487
16488          # Corresponds to --with-sysroot
16489
16490  if test "x$DEVKIT_SYSROOT" = x; then
16491    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16492  fi
16493
16494
16495          # Identifies the Visual Studio version in the devkit
16496
16497  if test "x$DEVKIT_VS_VERSION" = x; then
16498    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16499  fi
16500
16501          # The Visual Studio include environment variable
16502
16503  if test "x$DEVKIT_VS_INCLUDE" = x; then
16504    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16505  fi
16506
16507          # The Visual Studio lib environment variable
16508
16509  if test "x$DEVKIT_VS_LIB" = x; then
16510    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16511  fi
16512
16513          # Corresponds to --with-msvcr-dll
16514
16515  if test "x$DEVKIT_MSVCR_DLL" = x; then
16516    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16517  fi
16518
16519          # Corresponds to --with-msvcp-dll
16520
16521  if test "x$DEVKIT_MSVCP_DLL" = x; then
16522    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16523  fi
16524
16525        fi
16526
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16528$as_echo_n "checking for devkit... " >&6; }
16529        if test "x$DEVKIT_NAME" != x; then
16530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16531$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16532        else
16533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16534$as_echo "$DEVKIT_ROOT" >&6; }
16535        fi
16536
16537
16538  if test "x$DEVKIT_EXTRA_PATH" != x; then
16539    if test "x$EXTRA_PATH" = x; then
16540      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16541    else
16542      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16543    fi
16544  fi
16545
16546
16547        # Fallback default of just /bin if DEVKIT_PATH is not defined
16548        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16549          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16550        fi
16551
16552  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16553    if test "x$TOOLCHAIN_PATH" = x; then
16554      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16555    else
16556      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16557    fi
16558  fi
16559
16560
16561        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16562        # places for backwards compatiblity.
16563        if test "x$DEVKIT_SYSROOT" != x; then
16564          SYSROOT="$DEVKIT_SYSROOT"
16565        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16566          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16567        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16568          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16569        fi
16570
16571
16572fi
16573
16574
16575  # You can force the sysroot if the sysroot encoded into the compiler tools
16576  # is not correct.
16577
16578# Check whether --with-sys-root was given.
16579if test "${with_sys_root+set}" = set; then :
16580  withval=$with_sys_root; SYSROOT=$with_sys_root
16581
16582fi
16583
16584
16585
16586# Check whether --with-sysroot was given.
16587if test "${with_sysroot+set}" = set; then :
16588  withval=$with_sysroot; SYSROOT=$with_sysroot
16589
16590fi
16591
16592
16593
16594# Check whether --with-tools-dir was given.
16595if test "${with_tools_dir+set}" = set; then :
16596  withval=$with_tools_dir;
16597  if test "x$with_tools_dir" != x; then
16598    if test "x$TOOLCHAIN_PATH" = x; then
16599      TOOLCHAIN_PATH="$with_tools_dir"
16600    else
16601      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16602    fi
16603  fi
16604
16605
16606fi
16607
16608
16609
16610# Check whether --with-toolchain-path was given.
16611if test "${with_toolchain_path+set}" = set; then :
16612  withval=$with_toolchain_path;
16613  if test "x$with_toolchain_path" != x; then
16614    if test "x$TOOLCHAIN_PATH" = x; then
16615      TOOLCHAIN_PATH="$with_toolchain_path"
16616    else
16617      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16618    fi
16619  fi
16620
16621
16622fi
16623
16624
16625
16626# Check whether --with-extra-path was given.
16627if test "${with_extra_path+set}" = set; then :
16628  withval=$with_extra_path;
16629  if test "x$with_extra_path" != x; then
16630    if test "x$EXTRA_PATH" = x; then
16631      EXTRA_PATH="$with_extra_path"
16632    else
16633      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16634    fi
16635  fi
16636
16637
16638fi
16639
16640
16641  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16642    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16643    # If not, detect if Xcode is installed by running xcodebuild -version
16644    # if no Xcode installed, xcodebuild exits with 1
16645    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16646    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16647      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16648      # fall back on the stub binary in /usr/bin/xcodebuild
16649      # Extract the first word of "xcodebuild", so it can be a program name with args.
16650set dummy xcodebuild; ac_word=$2
16651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16652$as_echo_n "checking for $ac_word... " >&6; }
16653if ${ac_cv_path_XCODEBUILD+:} false; then :
16654  $as_echo_n "(cached) " >&6
16655else
16656  case $XCODEBUILD in
16657  [\\/]* | ?:[\\/]*)
16658  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16659  ;;
16660  *)
16661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16662for as_dir in $TOOLCHAIN_PATH
16663do
16664  IFS=$as_save_IFS
16665  test -z "$as_dir" && as_dir=.
16666    for ac_exec_ext in '' $ac_executable_extensions; do
16667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16668    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16670    break 2
16671  fi
16672done
16673  done
16674IFS=$as_save_IFS
16675
16676  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16677  ;;
16678esac
16679fi
16680XCODEBUILD=$ac_cv_path_XCODEBUILD
16681if test -n "$XCODEBUILD"; then
16682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16683$as_echo "$XCODEBUILD" >&6; }
16684else
16685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16686$as_echo "no" >&6; }
16687fi
16688
16689
16690    else
16691      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16692      # when only the command line tools are installed there are no SDKs, so headers
16693      # are copied into the system frameworks
16694      XCODEBUILD=
16695
16696    fi
16697
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16699$as_echo_n "checking for sdk name... " >&6; }
16700
16701# Check whether --with-sdk-name was given.
16702if test "${with_sdk_name+set}" = set; then :
16703  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16704
16705fi
16706
16707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16708$as_echo "$SDKNAME" >&6; }
16709
16710    # if toolchain path is specified then don't rely on system headers, they may not compile
16711    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16712    test -z "$TOOLCHAIN_PATH" && \
16713      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16714
16715    if test -z "$SYSROOT"; then
16716      if test -n "$XCODEBUILD"; then
16717        # if we don't have system headers, use default SDK name (last resort)
16718        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16719          SDKNAME=${SDKNAME:-macosx}
16720        fi
16721
16722        if test -n "$SDKNAME"; then
16723          # Call xcodebuild to determine SYSROOT
16724          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16725        fi
16726      else
16727        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16728          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
16729        fi
16730      fi
16731    else
16732      # warn user if --with-sdk-name was also set
16733      if test -n "$with_sdk_name"; then
16734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16735$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16736      fi
16737    fi
16738
16739    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16740      # If no system framework headers, then SYSROOT must be set, or we won't build
16741      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
16742    fi
16743
16744    # Perform a basic sanity test
16745    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16746      if test -z "$SYSROOT"; then
16747        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
16748      else
16749        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16750      fi
16751    fi
16752
16753    # set SDKROOT too, Xcode tools will pick it up
16754    SDKROOT=$SYSROOT
16755
16756  fi
16757
16758  # Prepend the extra path to the global path
16759
16760  if test "x$EXTRA_PATH" != x; then
16761    if test "x$PATH" = x; then
16762      PATH="$EXTRA_PATH"
16763    else
16764      PATH="$EXTRA_PATH:$PATH"
16765    fi
16766  fi
16767
16768
16769  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16770    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16771    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16772  fi
16773
16774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16775$as_echo_n "checking for sysroot... " >&6; }
16776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16777$as_echo "$SYSROOT" >&6; }
16778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16779$as_echo_n "checking for toolchain path... " >&6; }
16780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16781$as_echo "$TOOLCHAIN_PATH" >&6; }
16782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16783$as_echo_n "checking for extra path... " >&6; }
16784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16785$as_echo "$EXTRA_PATH" >&6; }
16786
16787
16788# To properly create a configuration name, we need to have the OpenJDK target
16789# and options (variants and debug level) parsed.
16790
16791
16792
16793# Check whether --with-conf-name was given.
16794if test "${with_conf_name+set}" = set; then :
16795  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16796fi
16797
16798
16799  # Test from where we are running configure, in or outside of src root.
16800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16801$as_echo_n "checking where to store configuration... " >&6; }
16802  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16803      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16804      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16805    # We are running configure from the src root.
16806    # Create a default ./build/target-variant-debuglevel output root.
16807    if test "x${CONF_NAME}" = x; then
16808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16809$as_echo "in default location" >&6; }
16810      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16811    else
16812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16813$as_echo "in build directory with custom name" >&6; }
16814    fi
16815    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16816    $MKDIR -p "$OUTPUT_ROOT"
16817    if test ! -d "$OUTPUT_ROOT"; then
16818      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16819    fi
16820  else
16821    # We are running configure from outside of the src dir.
16822    # Then use the current directory as output dir!
16823    # If configuration is situated in normal build directory, just use the build
16824    # directory name as configuration name, otherwise use the complete path.
16825    if test "x${CONF_NAME}" = x; then
16826      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16827    fi
16828    OUTPUT_ROOT="$CURDIR"
16829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16830$as_echo "in current directory" >&6; }
16831
16832    # WARNING: This might be a bad thing to do. You need to be sure you want to
16833    # have a configuration in this directory. Do some sanity checks!
16834
16835    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16836      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16837      # other files
16838      files_present=`$LS $OUTPUT_ROOT`
16839      # Configure has already touched config.log and confdefs.h in the current dir when this check
16840      # is performed.
16841      filtered_files=`$ECHO "$files_present" \
16842          | $SED -e 's/config.log//g' \
16843              -e 's/configure.log//g' \
16844              -e 's/confdefs.h//g' \
16845              -e 's/ //g' \
16846          | $TR -d '\n'`
16847      if test "x$filtered_files" != x; then
16848        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16849$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16850        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16851$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16852        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16853$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16855$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16856        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16857$as_echo "$as_me: seriously mess up just about everything." >&6;}
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16859$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16861$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16862        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16863      fi
16864    fi
16865  fi
16866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16867$as_echo_n "checking what configuration name to use... " >&6; }
16868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16869$as_echo "$CONF_NAME" >&6; }
16870
16871
16872  # Only process if variable expands to non-empty
16873
16874  if test "x$OUTPUT_ROOT" != x; then
16875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16876
16877  # Input might be given as Windows format, start by converting to
16878  # unix format.
16879  path="$OUTPUT_ROOT"
16880  new_path=`$CYGPATH -u "$path"`
16881
16882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16885  # "foo.exe" is OK but "foo" is an error.
16886  #
16887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16888  # It is also a way to make sure we got the proper file name for the real test later on.
16889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16890  if test "x$test_shortpath" = x; then
16891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16892$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16893    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16894  fi
16895
16896  # Call helper function which possibly converts this using DOS-style short mode.
16897  # If so, the updated path is stored in $new_path.
16898
16899  input_path="$new_path"
16900  # Check if we need to convert this using DOS-style short mode. If the path
16901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16902  # take no chances and rewrite it.
16903  # Note: m4 eats our [], so we need to use [ and ] instead.
16904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16905  if test "x$has_forbidden_chars" != x; then
16906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16910      # Going to short mode and back again did indeed matter. Since short mode is
16911      # case insensitive, let's make it lowercase to improve readability.
16912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16913      # Now convert it back to Unix-style (cygpath)
16914      input_path=`$CYGPATH -u "$shortmode_path"`
16915      new_path="$input_path"
16916    fi
16917  fi
16918
16919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16920  if test "x$test_cygdrive_prefix" = x; then
16921    # As a simple fix, exclude /usr/bin since it's not a real path.
16922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16924      # a path prefixed by /cygdrive for fixpath to work.
16925      new_path="$CYGWIN_ROOT_PATH$input_path"
16926    fi
16927  fi
16928
16929
16930  if test "x$path" != "x$new_path"; then
16931    OUTPUT_ROOT="$new_path"
16932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16933$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16934  fi
16935
16936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16937
16938  path="$OUTPUT_ROOT"
16939  has_colon=`$ECHO $path | $GREP ^.:`
16940  new_path="$path"
16941  if test "x$has_colon" = x; then
16942    # Not in mixed or Windows style, start by that.
16943    new_path=`cmd //c echo $path`
16944  fi
16945
16946
16947  input_path="$new_path"
16948  # Check if we need to convert this using DOS-style short mode. If the path
16949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16950  # take no chances and rewrite it.
16951  # Note: m4 eats our [], so we need to use [ and ] instead.
16952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16953  if test "x$has_forbidden_chars" != x; then
16954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16956  fi
16957
16958
16959  windows_path="$new_path"
16960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16961    unix_path=`$CYGPATH -u "$windows_path"`
16962    new_path="$unix_path"
16963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16965    new_path="$unix_path"
16966  fi
16967
16968  if test "x$path" != "x$new_path"; then
16969    OUTPUT_ROOT="$new_path"
16970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16971$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16972  fi
16973
16974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16976
16977    else
16978      # We're on a unix platform. Hooray! :)
16979      path="$OUTPUT_ROOT"
16980      has_space=`$ECHO "$path" | $GREP " "`
16981      if test "x$has_space" != x; then
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16983$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16984        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16985      fi
16986
16987      # Use eval to expand a potential ~
16988      eval path="$path"
16989      if test ! -f "$path" && test ! -d "$path"; then
16990        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16991      fi
16992
16993      if test -d "$path"; then
16994        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16995      else
16996        dir="`$DIRNAME "$path"`"
16997        base="`$BASENAME "$path"`"
16998        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16999      fi
17000    fi
17001  fi
17002
17003
17004  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17005  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17006
17007  SPEC=$OUTPUT_ROOT/spec.gmk
17008
17009  CONF_NAME=$CONF_NAME
17010
17011  OUTPUT_ROOT=$OUTPUT_ROOT
17012
17013
17014
17015  # The spec.gmk file contains all variables for the make system.
17016  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17017
17018  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17019  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17020
17021  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17022  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17023
17024  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17025  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17026
17027  # The compare.sh is used to compare the build output to other builds.
17028  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17029
17030  # The generated Makefile knows where the spec.gmk is and where the source is.
17031  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17032  # which will look for generated configurations
17033  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17034
17035
17036
17037# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17038
17039  for ac_prog in apt-get yum port pkgutil pkgadd
17040do
17041  # Extract the first word of "$ac_prog", so it can be a program name with args.
17042set dummy $ac_prog; ac_word=$2
17043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17044$as_echo_n "checking for $ac_word... " >&6; }
17045if ${ac_cv_prog_PKGHANDLER+:} false; then :
17046  $as_echo_n "(cached) " >&6
17047else
17048  if test -n "$PKGHANDLER"; then
17049  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17050else
17051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17052for as_dir in $PATH
17053do
17054  IFS=$as_save_IFS
17055  test -z "$as_dir" && as_dir=.
17056    for ac_exec_ext in '' $ac_executable_extensions; do
17057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17058    ac_cv_prog_PKGHANDLER="$ac_prog"
17059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17060    break 2
17061  fi
17062done
17063  done
17064IFS=$as_save_IFS
17065
17066fi
17067fi
17068PKGHANDLER=$ac_cv_prog_PKGHANDLER
17069if test -n "$PKGHANDLER"; then
17070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17071$as_echo "$PKGHANDLER" >&6; }
17072else
17073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17074$as_echo "no" >&6; }
17075fi
17076
17077
17078  test -n "$PKGHANDLER" && break
17079done
17080
17081
17082
17083# Setup tools that requires more complex handling, or that is not needed by the configure script.
17084
17085
17086
17087  # Publish this variable in the help.
17088
17089
17090  if [ -z "${MAKE+x}" ]; then
17091    # The variable is not set by user, try to locate tool using the code snippet
17092
17093    # Try our hardest to locate a correct version of GNU make
17094    for ac_prog in gmake
17095do
17096  # Extract the first word of "$ac_prog", so it can be a program name with args.
17097set dummy $ac_prog; ac_word=$2
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17099$as_echo_n "checking for $ac_word... " >&6; }
17100if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17101  $as_echo_n "(cached) " >&6
17102else
17103  case $CHECK_GMAKE in
17104  [\\/]* | ?:[\\/]*)
17105  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17106  ;;
17107  *)
17108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17109for as_dir in $PATH
17110do
17111  IFS=$as_save_IFS
17112  test -z "$as_dir" && as_dir=.
17113    for ac_exec_ext in '' $ac_executable_extensions; do
17114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17115    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17117    break 2
17118  fi
17119done
17120  done
17121IFS=$as_save_IFS
17122
17123  ;;
17124esac
17125fi
17126CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17127if test -n "$CHECK_GMAKE"; then
17128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17129$as_echo "$CHECK_GMAKE" >&6; }
17130else
17131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17132$as_echo "no" >&6; }
17133fi
17134
17135
17136  test -n "$CHECK_GMAKE" && break
17137done
17138
17139
17140  MAKE_CANDIDATE=""$CHECK_GMAKE""
17141  DESCRIPTION="gmake in PATH"
17142
17143  # On Cygwin, we require a newer version of make than on other platforms
17144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145    MAKE_VERSION_EXPR="-e 4\."
17146    MAKE_REQUIRED_VERSION="4.0"
17147   else
17148    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17149    MAKE_REQUIRED_VERSION="3.81"
17150  fi
17151
17152  if test "x$MAKE_CANDIDATE" != x; then
17153    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17154$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17155    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17156    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17157    if test "x$IS_GNU_MAKE" = x; then
17158      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17159$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17160    else
17161      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17162      if test "x$IS_MODERN_MAKE" = x; then
17163        { $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
17164$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;}
17165      else
17166        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17167          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17168            MAKE_EXPECTED_ENV='cygwin'
17169          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17170            MAKE_EXPECTED_ENV='msys'
17171          else
17172            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17173          fi
17174          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17175          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17176        else
17177          # Not relevant for non-Windows
17178          IS_MAKE_CORRECT_ENV=true
17179        fi
17180        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17181          { $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
17182$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;}
17183        else
17184          FOUND_MAKE=$MAKE_CANDIDATE
17185
17186  # Only process if variable expands to non-empty
17187
17188  if test "x$FOUND_MAKE" != x; then
17189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17190
17191  # First separate the path from the arguments. This will split at the first
17192  # space.
17193  complete="$FOUND_MAKE"
17194  path="${complete%% *}"
17195  tmp="$complete EOL"
17196  arguments="${tmp#* }"
17197
17198  # Input might be given as Windows format, start by converting to
17199  # unix format.
17200  new_path=`$CYGPATH -u "$path"`
17201
17202  # Now try to locate executable using which
17203  new_path=`$WHICH "$new_path" 2> /dev/null`
17204  # bat and cmd files are not always considered executable in cygwin causing which
17205  # to not find them
17206  if test "x$new_path" = x \
17207      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17208      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17209    new_path=`$CYGPATH -u "$path"`
17210  fi
17211  if test "x$new_path" = x; then
17212    # Oops. Which didn't find the executable.
17213    # The splitting of arguments from the executable at a space might have been incorrect,
17214    # since paths with space are more likely in Windows. Give it another try with the whole
17215    # argument.
17216    path="$complete"
17217    arguments="EOL"
17218    new_path=`$CYGPATH -u "$path"`
17219    new_path=`$WHICH "$new_path" 2> /dev/null`
17220    # bat and cmd files are not always considered executable in cygwin causing which
17221    # to not find them
17222    if test "x$new_path" = x \
17223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17225      new_path=`$CYGPATH -u "$path"`
17226    fi
17227    if test "x$new_path" = x; then
17228      # It's still not found. Now this is an unrecoverable error.
17229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17230$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17231      has_space=`$ECHO "$complete" | $GREP " "`
17232      if test "x$has_space" != x; then
17233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17235      fi
17236      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17237    fi
17238  fi
17239
17240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17243  # "foo.exe" is OK but "foo" is an error.
17244  #
17245  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17246  # It is also a way to make sure we got the proper file name for the real test later on.
17247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17248  if test "x$test_shortpath" = x; then
17249    # Short path failed, file does not exist as specified.
17250    # Try adding .exe or .cmd
17251    if test -f "${new_path}.exe"; then
17252      input_to_shortpath="${new_path}.exe"
17253    elif test -f "${new_path}.cmd"; then
17254      input_to_shortpath="${new_path}.cmd"
17255    else
17256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17258      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17259$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17260      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17261    fi
17262  else
17263    input_to_shortpath="$new_path"
17264  fi
17265
17266  # Call helper function which possibly converts this using DOS-style short mode.
17267  # If so, the updated path is stored in $new_path.
17268  new_path="$input_to_shortpath"
17269
17270  input_path="$input_to_shortpath"
17271  # Check if we need to convert this using DOS-style short mode. If the path
17272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17273  # take no chances and rewrite it.
17274  # Note: m4 eats our [], so we need to use [ and ] instead.
17275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17276  if test "x$has_forbidden_chars" != x; then
17277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17281      # Going to short mode and back again did indeed matter. Since short mode is
17282      # case insensitive, let's make it lowercase to improve readability.
17283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17284      # Now convert it back to Unix-style (cygpath)
17285      input_path=`$CYGPATH -u "$shortmode_path"`
17286      new_path="$input_path"
17287    fi
17288  fi
17289
17290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17291  if test "x$test_cygdrive_prefix" = x; then
17292    # As a simple fix, exclude /usr/bin since it's not a real path.
17293    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17295      # a path prefixed by /cygdrive for fixpath to work.
17296      new_path="$CYGWIN_ROOT_PATH$input_path"
17297    fi
17298  fi
17299
17300  # remove trailing .exe if any
17301  new_path="${new_path/%.exe/}"
17302
17303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17304
17305  # First separate the path from the arguments. This will split at the first
17306  # space.
17307  complete="$FOUND_MAKE"
17308  path="${complete%% *}"
17309  tmp="$complete EOL"
17310  arguments="${tmp#* }"
17311
17312  # Input might be given as Windows format, start by converting to
17313  # unix format.
17314  new_path="$path"
17315
17316  windows_path="$new_path"
17317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17318    unix_path=`$CYGPATH -u "$windows_path"`
17319    new_path="$unix_path"
17320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17322    new_path="$unix_path"
17323  fi
17324
17325
17326  # Now try to locate executable using which
17327  new_path=`$WHICH "$new_path" 2> /dev/null`
17328
17329  if test "x$new_path" = x; then
17330    # Oops. Which didn't find the executable.
17331    # The splitting of arguments from the executable at a space might have been incorrect,
17332    # since paths with space are more likely in Windows. Give it another try with the whole
17333    # argument.
17334    path="$complete"
17335    arguments="EOL"
17336    new_path="$path"
17337
17338  windows_path="$new_path"
17339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340    unix_path=`$CYGPATH -u "$windows_path"`
17341    new_path="$unix_path"
17342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17344    new_path="$unix_path"
17345  fi
17346
17347
17348    new_path=`$WHICH "$new_path" 2> /dev/null`
17349    # bat and cmd files are not always considered executable in MSYS causing which
17350    # to not find them
17351    if test "x$new_path" = x \
17352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17354      new_path="$path"
17355
17356  windows_path="$new_path"
17357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17358    unix_path=`$CYGPATH -u "$windows_path"`
17359    new_path="$unix_path"
17360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17362    new_path="$unix_path"
17363  fi
17364
17365    fi
17366
17367    if test "x$new_path" = x; then
17368      # It's still not found. Now this is an unrecoverable error.
17369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17370$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17371      has_space=`$ECHO "$complete" | $GREP " "`
17372      if test "x$has_space" != x; then
17373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17375      fi
17376      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17377    fi
17378  fi
17379
17380  # Now new_path has a complete unix path to the binary
17381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17382    # Keep paths in /bin as-is, but remove trailing .exe if any
17383    new_path="${new_path/%.exe/}"
17384    # Do not save /bin paths to all_fixpath_prefixes!
17385  else
17386    # Not in mixed or Windows style, start by that.
17387    new_path=`cmd //c echo $new_path`
17388
17389  input_path="$new_path"
17390  # Check if we need to convert this using DOS-style short mode. If the path
17391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17392  # take no chances and rewrite it.
17393  # Note: m4 eats our [], so we need to use [ and ] instead.
17394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17395  if test "x$has_forbidden_chars" != x; then
17396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17398  fi
17399
17400    # Output is in $new_path
17401
17402  windows_path="$new_path"
17403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17404    unix_path=`$CYGPATH -u "$windows_path"`
17405    new_path="$unix_path"
17406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17408    new_path="$unix_path"
17409  fi
17410
17411    # remove trailing .exe if any
17412    new_path="${new_path/%.exe/}"
17413
17414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416  fi
17417
17418    else
17419      # We're on a unix platform. Hooray! :)
17420      # First separate the path from the arguments. This will split at the first
17421      # space.
17422      complete="$FOUND_MAKE"
17423      path="${complete%% *}"
17424      tmp="$complete EOL"
17425      arguments="${tmp#* }"
17426
17427      # Cannot rely on the command "which" here since it doesn't always work.
17428      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17429      if test -z "$is_absolute_path"; then
17430        # Path to executable is not absolute. Find it.
17431        IFS_save="$IFS"
17432        IFS=:
17433        for p in $PATH; do
17434          if test -f "$p/$path" && test -x "$p/$path"; then
17435            new_path="$p/$path"
17436            break
17437          fi
17438        done
17439        IFS="$IFS_save"
17440      else
17441        # This is an absolute path, we can use it without further modifications.
17442        new_path="$path"
17443      fi
17444
17445      if test "x$new_path" = x; then
17446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17448        has_space=`$ECHO "$complete" | $GREP " "`
17449        if test "x$has_space" != x; then
17450          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17451$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17452        fi
17453        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17454      fi
17455    fi
17456
17457    # Now join together the path and the arguments once again
17458    if test "x$arguments" != xEOL; then
17459      new_complete="$new_path ${arguments% *}"
17460    else
17461      new_complete="$new_path"
17462    fi
17463
17464    if test "x$complete" != "x$new_complete"; then
17465      FOUND_MAKE="$new_complete"
17466      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17467$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17468    fi
17469  fi
17470
17471        fi
17472      fi
17473    fi
17474  fi
17475
17476
17477    if test "x$FOUND_MAKE" = x; then
17478      for ac_prog in make
17479do
17480  # Extract the first word of "$ac_prog", so it can be a program name with args.
17481set dummy $ac_prog; ac_word=$2
17482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17483$as_echo_n "checking for $ac_word... " >&6; }
17484if ${ac_cv_path_CHECK_MAKE+:} false; then :
17485  $as_echo_n "(cached) " >&6
17486else
17487  case $CHECK_MAKE in
17488  [\\/]* | ?:[\\/]*)
17489  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17490  ;;
17491  *)
17492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17493for as_dir in $PATH
17494do
17495  IFS=$as_save_IFS
17496  test -z "$as_dir" && as_dir=.
17497    for ac_exec_ext in '' $ac_executable_extensions; do
17498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17499    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17501    break 2
17502  fi
17503done
17504  done
17505IFS=$as_save_IFS
17506
17507  ;;
17508esac
17509fi
17510CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17511if test -n "$CHECK_MAKE"; then
17512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17513$as_echo "$CHECK_MAKE" >&6; }
17514else
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17516$as_echo "no" >&6; }
17517fi
17518
17519
17520  test -n "$CHECK_MAKE" && break
17521done
17522
17523
17524  MAKE_CANDIDATE=""$CHECK_MAKE""
17525  DESCRIPTION="make in PATH"
17526
17527  # On Cygwin, we require a newer version of make than on other platforms
17528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17529    MAKE_VERSION_EXPR="-e 4\."
17530    MAKE_REQUIRED_VERSION="4.0"
17531   else
17532    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17533    MAKE_REQUIRED_VERSION="3.81"
17534  fi
17535
17536  if test "x$MAKE_CANDIDATE" != x; then
17537    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17538$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17539    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17540    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17541    if test "x$IS_GNU_MAKE" = x; then
17542      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17543$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17544    else
17545      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17546      if test "x$IS_MODERN_MAKE" = x; then
17547        { $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
17548$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;}
17549      else
17550        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17551          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17552            MAKE_EXPECTED_ENV='cygwin'
17553          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17554            MAKE_EXPECTED_ENV='msys'
17555          else
17556            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17557          fi
17558          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17559          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17560        else
17561          # Not relevant for non-Windows
17562          IS_MAKE_CORRECT_ENV=true
17563        fi
17564        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17565          { $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
17566$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;}
17567        else
17568          FOUND_MAKE=$MAKE_CANDIDATE
17569
17570  # Only process if variable expands to non-empty
17571
17572  if test "x$FOUND_MAKE" != x; then
17573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17574
17575  # First separate the path from the arguments. This will split at the first
17576  # space.
17577  complete="$FOUND_MAKE"
17578  path="${complete%% *}"
17579  tmp="$complete EOL"
17580  arguments="${tmp#* }"
17581
17582  # Input might be given as Windows format, start by converting to
17583  # unix format.
17584  new_path=`$CYGPATH -u "$path"`
17585
17586  # Now try to locate executable using which
17587  new_path=`$WHICH "$new_path" 2> /dev/null`
17588  # bat and cmd files are not always considered executable in cygwin causing which
17589  # to not find them
17590  if test "x$new_path" = x \
17591      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17592      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17593    new_path=`$CYGPATH -u "$path"`
17594  fi
17595  if test "x$new_path" = x; then
17596    # Oops. Which didn't find the executable.
17597    # The splitting of arguments from the executable at a space might have been incorrect,
17598    # since paths with space are more likely in Windows. Give it another try with the whole
17599    # argument.
17600    path="$complete"
17601    arguments="EOL"
17602    new_path=`$CYGPATH -u "$path"`
17603    new_path=`$WHICH "$new_path" 2> /dev/null`
17604    # bat and cmd files are not always considered executable in cygwin causing which
17605    # to not find them
17606    if test "x$new_path" = x \
17607        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17608        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17609      new_path=`$CYGPATH -u "$path"`
17610    fi
17611    if test "x$new_path" = x; then
17612      # It's still not found. Now this is an unrecoverable error.
17613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17614$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17615      has_space=`$ECHO "$complete" | $GREP " "`
17616      if test "x$has_space" != x; then
17617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17619      fi
17620      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17621    fi
17622  fi
17623
17624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17627  # "foo.exe" is OK but "foo" is an error.
17628  #
17629  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17630  # It is also a way to make sure we got the proper file name for the real test later on.
17631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17632  if test "x$test_shortpath" = x; then
17633    # Short path failed, file does not exist as specified.
17634    # Try adding .exe or .cmd
17635    if test -f "${new_path}.exe"; then
17636      input_to_shortpath="${new_path}.exe"
17637    elif test -f "${new_path}.cmd"; then
17638      input_to_shortpath="${new_path}.cmd"
17639    else
17640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17641$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17642      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17643$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17644      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17645    fi
17646  else
17647    input_to_shortpath="$new_path"
17648  fi
17649
17650  # Call helper function which possibly converts this using DOS-style short mode.
17651  # If so, the updated path is stored in $new_path.
17652  new_path="$input_to_shortpath"
17653
17654  input_path="$input_to_shortpath"
17655  # Check if we need to convert this using DOS-style short mode. If the path
17656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17657  # take no chances and rewrite it.
17658  # Note: m4 eats our [], so we need to use [ and ] instead.
17659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17660  if test "x$has_forbidden_chars" != x; then
17661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17665      # Going to short mode and back again did indeed matter. Since short mode is
17666      # case insensitive, let's make it lowercase to improve readability.
17667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17668      # Now convert it back to Unix-style (cygpath)
17669      input_path=`$CYGPATH -u "$shortmode_path"`
17670      new_path="$input_path"
17671    fi
17672  fi
17673
17674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17675  if test "x$test_cygdrive_prefix" = x; then
17676    # As a simple fix, exclude /usr/bin since it's not a real path.
17677    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17679      # a path prefixed by /cygdrive for fixpath to work.
17680      new_path="$CYGWIN_ROOT_PATH$input_path"
17681    fi
17682  fi
17683
17684  # remove trailing .exe if any
17685  new_path="${new_path/%.exe/}"
17686
17687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17688
17689  # First separate the path from the arguments. This will split at the first
17690  # space.
17691  complete="$FOUND_MAKE"
17692  path="${complete%% *}"
17693  tmp="$complete EOL"
17694  arguments="${tmp#* }"
17695
17696  # Input might be given as Windows format, start by converting to
17697  # unix format.
17698  new_path="$path"
17699
17700  windows_path="$new_path"
17701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17702    unix_path=`$CYGPATH -u "$windows_path"`
17703    new_path="$unix_path"
17704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17706    new_path="$unix_path"
17707  fi
17708
17709
17710  # Now try to locate executable using which
17711  new_path=`$WHICH "$new_path" 2> /dev/null`
17712
17713  if test "x$new_path" = x; then
17714    # Oops. Which didn't find the executable.
17715    # The splitting of arguments from the executable at a space might have been incorrect,
17716    # since paths with space are more likely in Windows. Give it another try with the whole
17717    # argument.
17718    path="$complete"
17719    arguments="EOL"
17720    new_path="$path"
17721
17722  windows_path="$new_path"
17723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17724    unix_path=`$CYGPATH -u "$windows_path"`
17725    new_path="$unix_path"
17726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17728    new_path="$unix_path"
17729  fi
17730
17731
17732    new_path=`$WHICH "$new_path" 2> /dev/null`
17733    # bat and cmd files are not always considered executable in MSYS causing which
17734    # to not find them
17735    if test "x$new_path" = x \
17736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17738      new_path="$path"
17739
17740  windows_path="$new_path"
17741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17742    unix_path=`$CYGPATH -u "$windows_path"`
17743    new_path="$unix_path"
17744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17746    new_path="$unix_path"
17747  fi
17748
17749    fi
17750
17751    if test "x$new_path" = x; then
17752      # It's still not found. Now this is an unrecoverable error.
17753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17754$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17755      has_space=`$ECHO "$complete" | $GREP " "`
17756      if test "x$has_space" != x; then
17757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17759      fi
17760      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17761    fi
17762  fi
17763
17764  # Now new_path has a complete unix path to the binary
17765  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17766    # Keep paths in /bin as-is, but remove trailing .exe if any
17767    new_path="${new_path/%.exe/}"
17768    # Do not save /bin paths to all_fixpath_prefixes!
17769  else
17770    # Not in mixed or Windows style, start by that.
17771    new_path=`cmd //c echo $new_path`
17772
17773  input_path="$new_path"
17774  # Check if we need to convert this using DOS-style short mode. If the path
17775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17776  # take no chances and rewrite it.
17777  # Note: m4 eats our [], so we need to use [ and ] instead.
17778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17779  if test "x$has_forbidden_chars" != x; then
17780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17782  fi
17783
17784    # Output is in $new_path
17785
17786  windows_path="$new_path"
17787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17788    unix_path=`$CYGPATH -u "$windows_path"`
17789    new_path="$unix_path"
17790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17792    new_path="$unix_path"
17793  fi
17794
17795    # remove trailing .exe if any
17796    new_path="${new_path/%.exe/}"
17797
17798    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17799    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17800  fi
17801
17802    else
17803      # We're on a unix platform. Hooray! :)
17804      # First separate the path from the arguments. This will split at the first
17805      # space.
17806      complete="$FOUND_MAKE"
17807      path="${complete%% *}"
17808      tmp="$complete EOL"
17809      arguments="${tmp#* }"
17810
17811      # Cannot rely on the command "which" here since it doesn't always work.
17812      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17813      if test -z "$is_absolute_path"; then
17814        # Path to executable is not absolute. Find it.
17815        IFS_save="$IFS"
17816        IFS=:
17817        for p in $PATH; do
17818          if test -f "$p/$path" && test -x "$p/$path"; then
17819            new_path="$p/$path"
17820            break
17821          fi
17822        done
17823        IFS="$IFS_save"
17824      else
17825        # This is an absolute path, we can use it without further modifications.
17826        new_path="$path"
17827      fi
17828
17829      if test "x$new_path" = x; then
17830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17832        has_space=`$ECHO "$complete" | $GREP " "`
17833        if test "x$has_space" != x; then
17834          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17835$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17836        fi
17837        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17838      fi
17839    fi
17840
17841    # Now join together the path and the arguments once again
17842    if test "x$arguments" != xEOL; then
17843      new_complete="$new_path ${arguments% *}"
17844    else
17845      new_complete="$new_path"
17846    fi
17847
17848    if test "x$complete" != "x$new_complete"; then
17849      FOUND_MAKE="$new_complete"
17850      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17851$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17852    fi
17853  fi
17854
17855        fi
17856      fi
17857    fi
17858  fi
17859
17860    fi
17861
17862    if test "x$FOUND_MAKE" = x; then
17863      if test "x$TOOLCHAIN_PATH" != x; then
17864        # We have a toolchain path, check that as well before giving up.
17865        OLD_PATH=$PATH
17866        PATH=$TOOLCHAIN_PATH:$PATH
17867        for ac_prog in gmake
17868do
17869  # Extract the first word of "$ac_prog", so it can be a program name with args.
17870set dummy $ac_prog; ac_word=$2
17871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17872$as_echo_n "checking for $ac_word... " >&6; }
17873if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17874  $as_echo_n "(cached) " >&6
17875else
17876  case $CHECK_TOOLSDIR_GMAKE in
17877  [\\/]* | ?:[\\/]*)
17878  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17879  ;;
17880  *)
17881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17882for as_dir in $PATH
17883do
17884  IFS=$as_save_IFS
17885  test -z "$as_dir" && as_dir=.
17886    for ac_exec_ext in '' $ac_executable_extensions; do
17887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17888    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17890    break 2
17891  fi
17892done
17893  done
17894IFS=$as_save_IFS
17895
17896  ;;
17897esac
17898fi
17899CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17900if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17902$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17903else
17904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17905$as_echo "no" >&6; }
17906fi
17907
17908
17909  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17910done
17911
17912
17913  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17914  DESCRIPTION="gmake in tools-dir"
17915
17916  # On Cygwin, we require a newer version of make than on other platforms
17917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17918    MAKE_VERSION_EXPR="-e 4\."
17919    MAKE_REQUIRED_VERSION="4.0"
17920   else
17921    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17922    MAKE_REQUIRED_VERSION="3.81"
17923  fi
17924
17925  if test "x$MAKE_CANDIDATE" != x; then
17926    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17927$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17928    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17929    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17930    if test "x$IS_GNU_MAKE" = x; then
17931      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17932$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17933    else
17934      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17935      if test "x$IS_MODERN_MAKE" = x; then
17936        { $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
17937$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;}
17938      else
17939        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17940          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17941            MAKE_EXPECTED_ENV='cygwin'
17942          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17943            MAKE_EXPECTED_ENV='msys'
17944          else
17945            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17946          fi
17947          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17948          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17949        else
17950          # Not relevant for non-Windows
17951          IS_MAKE_CORRECT_ENV=true
17952        fi
17953        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17954          { $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
17955$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;}
17956        else
17957          FOUND_MAKE=$MAKE_CANDIDATE
17958
17959  # Only process if variable expands to non-empty
17960
17961  if test "x$FOUND_MAKE" != x; then
17962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17963
17964  # First separate the path from the arguments. This will split at the first
17965  # space.
17966  complete="$FOUND_MAKE"
17967  path="${complete%% *}"
17968  tmp="$complete EOL"
17969  arguments="${tmp#* }"
17970
17971  # Input might be given as Windows format, start by converting to
17972  # unix format.
17973  new_path=`$CYGPATH -u "$path"`
17974
17975  # Now try to locate executable using which
17976  new_path=`$WHICH "$new_path" 2> /dev/null`
17977  # bat and cmd files are not always considered executable in cygwin causing which
17978  # to not find them
17979  if test "x$new_path" = x \
17980      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17981      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17982    new_path=`$CYGPATH -u "$path"`
17983  fi
17984  if test "x$new_path" = x; then
17985    # Oops. Which didn't find the executable.
17986    # The splitting of arguments from the executable at a space might have been incorrect,
17987    # since paths with space are more likely in Windows. Give it another try with the whole
17988    # argument.
17989    path="$complete"
17990    arguments="EOL"
17991    new_path=`$CYGPATH -u "$path"`
17992    new_path=`$WHICH "$new_path" 2> /dev/null`
17993    # bat and cmd files are not always considered executable in cygwin causing which
17994    # to not find them
17995    if test "x$new_path" = x \
17996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17998      new_path=`$CYGPATH -u "$path"`
17999    fi
18000    if test "x$new_path" = x; then
18001      # It's still not found. Now this is an unrecoverable error.
18002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18003$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18004      has_space=`$ECHO "$complete" | $GREP " "`
18005      if test "x$has_space" != x; then
18006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18008      fi
18009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18010    fi
18011  fi
18012
18013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18016  # "foo.exe" is OK but "foo" is an error.
18017  #
18018  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18019  # It is also a way to make sure we got the proper file name for the real test later on.
18020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18021  if test "x$test_shortpath" = x; then
18022    # Short path failed, file does not exist as specified.
18023    # Try adding .exe or .cmd
18024    if test -f "${new_path}.exe"; then
18025      input_to_shortpath="${new_path}.exe"
18026    elif test -f "${new_path}.cmd"; then
18027      input_to_shortpath="${new_path}.cmd"
18028    else
18029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18033      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18034    fi
18035  else
18036    input_to_shortpath="$new_path"
18037  fi
18038
18039  # Call helper function which possibly converts this using DOS-style short mode.
18040  # If so, the updated path is stored in $new_path.
18041  new_path="$input_to_shortpath"
18042
18043  input_path="$input_to_shortpath"
18044  # Check if we need to convert this using DOS-style short mode. If the path
18045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18046  # take no chances and rewrite it.
18047  # Note: m4 eats our [], so we need to use [ and ] instead.
18048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18049  if test "x$has_forbidden_chars" != x; then
18050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18054      # Going to short mode and back again did indeed matter. Since short mode is
18055      # case insensitive, let's make it lowercase to improve readability.
18056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18057      # Now convert it back to Unix-style (cygpath)
18058      input_path=`$CYGPATH -u "$shortmode_path"`
18059      new_path="$input_path"
18060    fi
18061  fi
18062
18063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18064  if test "x$test_cygdrive_prefix" = x; then
18065    # As a simple fix, exclude /usr/bin since it's not a real path.
18066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18068      # a path prefixed by /cygdrive for fixpath to work.
18069      new_path="$CYGWIN_ROOT_PATH$input_path"
18070    fi
18071  fi
18072
18073  # remove trailing .exe if any
18074  new_path="${new_path/%.exe/}"
18075
18076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18077
18078  # First separate the path from the arguments. This will split at the first
18079  # space.
18080  complete="$FOUND_MAKE"
18081  path="${complete%% *}"
18082  tmp="$complete EOL"
18083  arguments="${tmp#* }"
18084
18085  # Input might be given as Windows format, start by converting to
18086  # unix format.
18087  new_path="$path"
18088
18089  windows_path="$new_path"
18090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18091    unix_path=`$CYGPATH -u "$windows_path"`
18092    new_path="$unix_path"
18093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18095    new_path="$unix_path"
18096  fi
18097
18098
18099  # Now try to locate executable using which
18100  new_path=`$WHICH "$new_path" 2> /dev/null`
18101
18102  if test "x$new_path" = x; then
18103    # Oops. Which didn't find the executable.
18104    # The splitting of arguments from the executable at a space might have been incorrect,
18105    # since paths with space are more likely in Windows. Give it another try with the whole
18106    # argument.
18107    path="$complete"
18108    arguments="EOL"
18109    new_path="$path"
18110
18111  windows_path="$new_path"
18112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18113    unix_path=`$CYGPATH -u "$windows_path"`
18114    new_path="$unix_path"
18115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18117    new_path="$unix_path"
18118  fi
18119
18120
18121    new_path=`$WHICH "$new_path" 2> /dev/null`
18122    # bat and cmd files are not always considered executable in MSYS causing which
18123    # to not find them
18124    if test "x$new_path" = x \
18125        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18126        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18127      new_path="$path"
18128
18129  windows_path="$new_path"
18130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18131    unix_path=`$CYGPATH -u "$windows_path"`
18132    new_path="$unix_path"
18133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18135    new_path="$unix_path"
18136  fi
18137
18138    fi
18139
18140    if test "x$new_path" = x; then
18141      # It's still not found. Now this is an unrecoverable error.
18142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18143$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18144      has_space=`$ECHO "$complete" | $GREP " "`
18145      if test "x$has_space" != x; then
18146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18148      fi
18149      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18150    fi
18151  fi
18152
18153  # Now new_path has a complete unix path to the binary
18154  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18155    # Keep paths in /bin as-is, but remove trailing .exe if any
18156    new_path="${new_path/%.exe/}"
18157    # Do not save /bin paths to all_fixpath_prefixes!
18158  else
18159    # Not in mixed or Windows style, start by that.
18160    new_path=`cmd //c echo $new_path`
18161
18162  input_path="$new_path"
18163  # Check if we need to convert this using DOS-style short mode. If the path
18164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18165  # take no chances and rewrite it.
18166  # Note: m4 eats our [], so we need to use [ and ] instead.
18167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18168  if test "x$has_forbidden_chars" != x; then
18169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18171  fi
18172
18173    # Output is in $new_path
18174
18175  windows_path="$new_path"
18176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18177    unix_path=`$CYGPATH -u "$windows_path"`
18178    new_path="$unix_path"
18179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18181    new_path="$unix_path"
18182  fi
18183
18184    # remove trailing .exe if any
18185    new_path="${new_path/%.exe/}"
18186
18187    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18188    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18189  fi
18190
18191    else
18192      # We're on a unix platform. Hooray! :)
18193      # First separate the path from the arguments. This will split at the first
18194      # space.
18195      complete="$FOUND_MAKE"
18196      path="${complete%% *}"
18197      tmp="$complete EOL"
18198      arguments="${tmp#* }"
18199
18200      # Cannot rely on the command "which" here since it doesn't always work.
18201      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18202      if test -z "$is_absolute_path"; then
18203        # Path to executable is not absolute. Find it.
18204        IFS_save="$IFS"
18205        IFS=:
18206        for p in $PATH; do
18207          if test -f "$p/$path" && test -x "$p/$path"; then
18208            new_path="$p/$path"
18209            break
18210          fi
18211        done
18212        IFS="$IFS_save"
18213      else
18214        # This is an absolute path, we can use it without further modifications.
18215        new_path="$path"
18216      fi
18217
18218      if test "x$new_path" = x; then
18219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18220$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18221        has_space=`$ECHO "$complete" | $GREP " "`
18222        if test "x$has_space" != x; then
18223          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18225        fi
18226        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18227      fi
18228    fi
18229
18230    # Now join together the path and the arguments once again
18231    if test "x$arguments" != xEOL; then
18232      new_complete="$new_path ${arguments% *}"
18233    else
18234      new_complete="$new_path"
18235    fi
18236
18237    if test "x$complete" != "x$new_complete"; then
18238      FOUND_MAKE="$new_complete"
18239      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18240$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18241    fi
18242  fi
18243
18244        fi
18245      fi
18246    fi
18247  fi
18248
18249        if test "x$FOUND_MAKE" = x; then
18250          for ac_prog in make
18251do
18252  # Extract the first word of "$ac_prog", so it can be a program name with args.
18253set dummy $ac_prog; ac_word=$2
18254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18255$as_echo_n "checking for $ac_word... " >&6; }
18256if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18257  $as_echo_n "(cached) " >&6
18258else
18259  case $CHECK_TOOLSDIR_MAKE in
18260  [\\/]* | ?:[\\/]*)
18261  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18262  ;;
18263  *)
18264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18265for as_dir in $PATH
18266do
18267  IFS=$as_save_IFS
18268  test -z "$as_dir" && as_dir=.
18269    for ac_exec_ext in '' $ac_executable_extensions; do
18270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18271    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18273    break 2
18274  fi
18275done
18276  done
18277IFS=$as_save_IFS
18278
18279  ;;
18280esac
18281fi
18282CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18283if test -n "$CHECK_TOOLSDIR_MAKE"; then
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18285$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18286else
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18288$as_echo "no" >&6; }
18289fi
18290
18291
18292  test -n "$CHECK_TOOLSDIR_MAKE" && break
18293done
18294
18295
18296  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18297  DESCRIPTION="make in tools-dir"
18298
18299  # On Cygwin, we require a newer version of make than on other platforms
18300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18301    MAKE_VERSION_EXPR="-e 4\."
18302    MAKE_REQUIRED_VERSION="4.0"
18303   else
18304    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18305    MAKE_REQUIRED_VERSION="3.81"
18306  fi
18307
18308  if test "x$MAKE_CANDIDATE" != x; then
18309    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18310$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18311    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18312    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18313    if test "x$IS_GNU_MAKE" = x; then
18314      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18315$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18316    else
18317      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18318      if test "x$IS_MODERN_MAKE" = x; then
18319        { $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
18320$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;}
18321      else
18322        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18323          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18324            MAKE_EXPECTED_ENV='cygwin'
18325          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18326            MAKE_EXPECTED_ENV='msys'
18327          else
18328            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18329          fi
18330          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18331          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18332        else
18333          # Not relevant for non-Windows
18334          IS_MAKE_CORRECT_ENV=true
18335        fi
18336        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18337          { $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
18338$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;}
18339        else
18340          FOUND_MAKE=$MAKE_CANDIDATE
18341
18342  # Only process if variable expands to non-empty
18343
18344  if test "x$FOUND_MAKE" != x; then
18345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18346
18347  # First separate the path from the arguments. This will split at the first
18348  # space.
18349  complete="$FOUND_MAKE"
18350  path="${complete%% *}"
18351  tmp="$complete EOL"
18352  arguments="${tmp#* }"
18353
18354  # Input might be given as Windows format, start by converting to
18355  # unix format.
18356  new_path=`$CYGPATH -u "$path"`
18357
18358  # Now try to locate executable using which
18359  new_path=`$WHICH "$new_path" 2> /dev/null`
18360  # bat and cmd files are not always considered executable in cygwin causing which
18361  # to not find them
18362  if test "x$new_path" = x \
18363      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18364      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18365    new_path=`$CYGPATH -u "$path"`
18366  fi
18367  if test "x$new_path" = x; then
18368    # Oops. Which didn't find the executable.
18369    # The splitting of arguments from the executable at a space might have been incorrect,
18370    # since paths with space are more likely in Windows. Give it another try with the whole
18371    # argument.
18372    path="$complete"
18373    arguments="EOL"
18374    new_path=`$CYGPATH -u "$path"`
18375    new_path=`$WHICH "$new_path" 2> /dev/null`
18376    # bat and cmd files are not always considered executable in cygwin causing which
18377    # to not find them
18378    if test "x$new_path" = x \
18379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18381      new_path=`$CYGPATH -u "$path"`
18382    fi
18383    if test "x$new_path" = x; then
18384      # It's still not found. Now this is an unrecoverable error.
18385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18386$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18387      has_space=`$ECHO "$complete" | $GREP " "`
18388      if test "x$has_space" != x; then
18389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18391      fi
18392      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18393    fi
18394  fi
18395
18396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18399  # "foo.exe" is OK but "foo" is an error.
18400  #
18401  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18402  # It is also a way to make sure we got the proper file name for the real test later on.
18403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18404  if test "x$test_shortpath" = x; then
18405    # Short path failed, file does not exist as specified.
18406    # Try adding .exe or .cmd
18407    if test -f "${new_path}.exe"; then
18408      input_to_shortpath="${new_path}.exe"
18409    elif test -f "${new_path}.cmd"; then
18410      input_to_shortpath="${new_path}.cmd"
18411    else
18412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18413$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18414      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18415$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18417    fi
18418  else
18419    input_to_shortpath="$new_path"
18420  fi
18421
18422  # Call helper function which possibly converts this using DOS-style short mode.
18423  # If so, the updated path is stored in $new_path.
18424  new_path="$input_to_shortpath"
18425
18426  input_path="$input_to_shortpath"
18427  # Check if we need to convert this using DOS-style short mode. If the path
18428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18429  # take no chances and rewrite it.
18430  # Note: m4 eats our [], so we need to use [ and ] instead.
18431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18432  if test "x$has_forbidden_chars" != x; then
18433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18437      # Going to short mode and back again did indeed matter. Since short mode is
18438      # case insensitive, let's make it lowercase to improve readability.
18439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18440      # Now convert it back to Unix-style (cygpath)
18441      input_path=`$CYGPATH -u "$shortmode_path"`
18442      new_path="$input_path"
18443    fi
18444  fi
18445
18446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18447  if test "x$test_cygdrive_prefix" = x; then
18448    # As a simple fix, exclude /usr/bin since it's not a real path.
18449    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18451      # a path prefixed by /cygdrive for fixpath to work.
18452      new_path="$CYGWIN_ROOT_PATH$input_path"
18453    fi
18454  fi
18455
18456  # remove trailing .exe if any
18457  new_path="${new_path/%.exe/}"
18458
18459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18460
18461  # First separate the path from the arguments. This will split at the first
18462  # space.
18463  complete="$FOUND_MAKE"
18464  path="${complete%% *}"
18465  tmp="$complete EOL"
18466  arguments="${tmp#* }"
18467
18468  # Input might be given as Windows format, start by converting to
18469  # unix format.
18470  new_path="$path"
18471
18472  windows_path="$new_path"
18473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18474    unix_path=`$CYGPATH -u "$windows_path"`
18475    new_path="$unix_path"
18476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18478    new_path="$unix_path"
18479  fi
18480
18481
18482  # Now try to locate executable using which
18483  new_path=`$WHICH "$new_path" 2> /dev/null`
18484
18485  if test "x$new_path" = x; then
18486    # Oops. Which didn't find the executable.
18487    # The splitting of arguments from the executable at a space might have been incorrect,
18488    # since paths with space are more likely in Windows. Give it another try with the whole
18489    # argument.
18490    path="$complete"
18491    arguments="EOL"
18492    new_path="$path"
18493
18494  windows_path="$new_path"
18495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18496    unix_path=`$CYGPATH -u "$windows_path"`
18497    new_path="$unix_path"
18498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18500    new_path="$unix_path"
18501  fi
18502
18503
18504    new_path=`$WHICH "$new_path" 2> /dev/null`
18505    # bat and cmd files are not always considered executable in MSYS causing which
18506    # to not find them
18507    if test "x$new_path" = x \
18508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18510      new_path="$path"
18511
18512  windows_path="$new_path"
18513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18514    unix_path=`$CYGPATH -u "$windows_path"`
18515    new_path="$unix_path"
18516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18518    new_path="$unix_path"
18519  fi
18520
18521    fi
18522
18523    if test "x$new_path" = x; then
18524      # It's still not found. Now this is an unrecoverable error.
18525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18526$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18527      has_space=`$ECHO "$complete" | $GREP " "`
18528      if test "x$has_space" != x; then
18529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18531      fi
18532      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18533    fi
18534  fi
18535
18536  # Now new_path has a complete unix path to the binary
18537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18538    # Keep paths in /bin as-is, but remove trailing .exe if any
18539    new_path="${new_path/%.exe/}"
18540    # Do not save /bin paths to all_fixpath_prefixes!
18541  else
18542    # Not in mixed or Windows style, start by that.
18543    new_path=`cmd //c echo $new_path`
18544
18545  input_path="$new_path"
18546  # Check if we need to convert this using DOS-style short mode. If the path
18547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18548  # take no chances and rewrite it.
18549  # Note: m4 eats our [], so we need to use [ and ] instead.
18550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18551  if test "x$has_forbidden_chars" != x; then
18552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18554  fi
18555
18556    # Output is in $new_path
18557
18558  windows_path="$new_path"
18559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18560    unix_path=`$CYGPATH -u "$windows_path"`
18561    new_path="$unix_path"
18562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18564    new_path="$unix_path"
18565  fi
18566
18567    # remove trailing .exe if any
18568    new_path="${new_path/%.exe/}"
18569
18570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18572  fi
18573
18574    else
18575      # We're on a unix platform. Hooray! :)
18576      # First separate the path from the arguments. This will split at the first
18577      # space.
18578      complete="$FOUND_MAKE"
18579      path="${complete%% *}"
18580      tmp="$complete EOL"
18581      arguments="${tmp#* }"
18582
18583      # Cannot rely on the command "which" here since it doesn't always work.
18584      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18585      if test -z "$is_absolute_path"; then
18586        # Path to executable is not absolute. Find it.
18587        IFS_save="$IFS"
18588        IFS=:
18589        for p in $PATH; do
18590          if test -f "$p/$path" && test -x "$p/$path"; then
18591            new_path="$p/$path"
18592            break
18593          fi
18594        done
18595        IFS="$IFS_save"
18596      else
18597        # This is an absolute path, we can use it without further modifications.
18598        new_path="$path"
18599      fi
18600
18601      if test "x$new_path" = x; then
18602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18603$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18604        has_space=`$ECHO "$complete" | $GREP " "`
18605        if test "x$has_space" != x; then
18606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18608        fi
18609        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18610      fi
18611    fi
18612
18613    # Now join together the path and the arguments once again
18614    if test "x$arguments" != xEOL; then
18615      new_complete="$new_path ${arguments% *}"
18616    else
18617      new_complete="$new_path"
18618    fi
18619
18620    if test "x$complete" != "x$new_complete"; then
18621      FOUND_MAKE="$new_complete"
18622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18623$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18624    fi
18625  fi
18626
18627        fi
18628      fi
18629    fi
18630  fi
18631
18632        fi
18633        PATH=$OLD_PATH
18634      fi
18635    fi
18636
18637    if test "x$FOUND_MAKE" = x; then
18638      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
18639    fi
18640
18641  else
18642    # The variable is set, but is it from the command line or the environment?
18643
18644    # Try to remove the string !MAKE! from our list.
18645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18647      # If it failed, the variable was not from the command line. Ignore it,
18648      # but warn the user (except for BASH, which is always set by the calling BASH).
18649      if test "xMAKE" != xBASH; then
18650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18651$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18652      fi
18653      # Try to locate tool using the code snippet
18654
18655    # Try our hardest to locate a correct version of GNU make
18656    for ac_prog in gmake
18657do
18658  # Extract the first word of "$ac_prog", so it can be a program name with args.
18659set dummy $ac_prog; ac_word=$2
18660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18661$as_echo_n "checking for $ac_word... " >&6; }
18662if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18663  $as_echo_n "(cached) " >&6
18664else
18665  case $CHECK_GMAKE in
18666  [\\/]* | ?:[\\/]*)
18667  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18668  ;;
18669  *)
18670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18671for as_dir in $PATH
18672do
18673  IFS=$as_save_IFS
18674  test -z "$as_dir" && as_dir=.
18675    for ac_exec_ext in '' $ac_executable_extensions; do
18676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18677    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18679    break 2
18680  fi
18681done
18682  done
18683IFS=$as_save_IFS
18684
18685  ;;
18686esac
18687fi
18688CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18689if test -n "$CHECK_GMAKE"; then
18690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18691$as_echo "$CHECK_GMAKE" >&6; }
18692else
18693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18694$as_echo "no" >&6; }
18695fi
18696
18697
18698  test -n "$CHECK_GMAKE" && break
18699done
18700
18701
18702  MAKE_CANDIDATE=""$CHECK_GMAKE""
18703  DESCRIPTION="gmake in PATH"
18704
18705  # On Cygwin, we require a newer version of make than on other platforms
18706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18707    MAKE_VERSION_EXPR="-e 4\."
18708    MAKE_REQUIRED_VERSION="4.0"
18709   else
18710    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18711    MAKE_REQUIRED_VERSION="3.81"
18712  fi
18713
18714  if test "x$MAKE_CANDIDATE" != x; then
18715    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18716$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18717    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18718    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18719    if test "x$IS_GNU_MAKE" = x; then
18720      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18721$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18722    else
18723      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18724      if test "x$IS_MODERN_MAKE" = x; then
18725        { $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
18726$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;}
18727      else
18728        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18729          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18730            MAKE_EXPECTED_ENV='cygwin'
18731          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18732            MAKE_EXPECTED_ENV='msys'
18733          else
18734            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18735          fi
18736          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18737          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18738        else
18739          # Not relevant for non-Windows
18740          IS_MAKE_CORRECT_ENV=true
18741        fi
18742        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18743          { $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
18744$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;}
18745        else
18746          FOUND_MAKE=$MAKE_CANDIDATE
18747
18748  # Only process if variable expands to non-empty
18749
18750  if test "x$FOUND_MAKE" != x; then
18751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18752
18753  # First separate the path from the arguments. This will split at the first
18754  # space.
18755  complete="$FOUND_MAKE"
18756  path="${complete%% *}"
18757  tmp="$complete EOL"
18758  arguments="${tmp#* }"
18759
18760  # Input might be given as Windows format, start by converting to
18761  # unix format.
18762  new_path=`$CYGPATH -u "$path"`
18763
18764  # Now try to locate executable using which
18765  new_path=`$WHICH "$new_path" 2> /dev/null`
18766  # bat and cmd files are not always considered executable in cygwin causing which
18767  # to not find them
18768  if test "x$new_path" = x \
18769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18771    new_path=`$CYGPATH -u "$path"`
18772  fi
18773  if test "x$new_path" = x; then
18774    # Oops. Which didn't find the executable.
18775    # The splitting of arguments from the executable at a space might have been incorrect,
18776    # since paths with space are more likely in Windows. Give it another try with the whole
18777    # argument.
18778    path="$complete"
18779    arguments="EOL"
18780    new_path=`$CYGPATH -u "$path"`
18781    new_path=`$WHICH "$new_path" 2> /dev/null`
18782    # bat and cmd files are not always considered executable in cygwin causing which
18783    # to not find them
18784    if test "x$new_path" = x \
18785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18787      new_path=`$CYGPATH -u "$path"`
18788    fi
18789    if test "x$new_path" = x; then
18790      # It's still not found. Now this is an unrecoverable error.
18791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18793      has_space=`$ECHO "$complete" | $GREP " "`
18794      if test "x$has_space" != x; then
18795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18797      fi
18798      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18799    fi
18800  fi
18801
18802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18805  # "foo.exe" is OK but "foo" is an error.
18806  #
18807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18808  # It is also a way to make sure we got the proper file name for the real test later on.
18809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18810  if test "x$test_shortpath" = x; then
18811    # Short path failed, file does not exist as specified.
18812    # Try adding .exe or .cmd
18813    if test -f "${new_path}.exe"; then
18814      input_to_shortpath="${new_path}.exe"
18815    elif test -f "${new_path}.cmd"; then
18816      input_to_shortpath="${new_path}.cmd"
18817    else
18818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18823    fi
18824  else
18825    input_to_shortpath="$new_path"
18826  fi
18827
18828  # Call helper function which possibly converts this using DOS-style short mode.
18829  # If so, the updated path is stored in $new_path.
18830  new_path="$input_to_shortpath"
18831
18832  input_path="$input_to_shortpath"
18833  # Check if we need to convert this using DOS-style short mode. If the path
18834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18835  # take no chances and rewrite it.
18836  # Note: m4 eats our [], so we need to use [ and ] instead.
18837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18838  if test "x$has_forbidden_chars" != x; then
18839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18843      # Going to short mode and back again did indeed matter. Since short mode is
18844      # case insensitive, let's make it lowercase to improve readability.
18845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18846      # Now convert it back to Unix-style (cygpath)
18847      input_path=`$CYGPATH -u "$shortmode_path"`
18848      new_path="$input_path"
18849    fi
18850  fi
18851
18852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18853  if test "x$test_cygdrive_prefix" = x; then
18854    # As a simple fix, exclude /usr/bin since it's not a real path.
18855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18857      # a path prefixed by /cygdrive for fixpath to work.
18858      new_path="$CYGWIN_ROOT_PATH$input_path"
18859    fi
18860  fi
18861
18862  # remove trailing .exe if any
18863  new_path="${new_path/%.exe/}"
18864
18865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18866
18867  # First separate the path from the arguments. This will split at the first
18868  # space.
18869  complete="$FOUND_MAKE"
18870  path="${complete%% *}"
18871  tmp="$complete EOL"
18872  arguments="${tmp#* }"
18873
18874  # Input might be given as Windows format, start by converting to
18875  # unix format.
18876  new_path="$path"
18877
18878  windows_path="$new_path"
18879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18880    unix_path=`$CYGPATH -u "$windows_path"`
18881    new_path="$unix_path"
18882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18884    new_path="$unix_path"
18885  fi
18886
18887
18888  # Now try to locate executable using which
18889  new_path=`$WHICH "$new_path" 2> /dev/null`
18890
18891  if test "x$new_path" = x; then
18892    # Oops. Which didn't find the executable.
18893    # The splitting of arguments from the executable at a space might have been incorrect,
18894    # since paths with space are more likely in Windows. Give it another try with the whole
18895    # argument.
18896    path="$complete"
18897    arguments="EOL"
18898    new_path="$path"
18899
18900  windows_path="$new_path"
18901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18902    unix_path=`$CYGPATH -u "$windows_path"`
18903    new_path="$unix_path"
18904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18906    new_path="$unix_path"
18907  fi
18908
18909
18910    new_path=`$WHICH "$new_path" 2> /dev/null`
18911    # bat and cmd files are not always considered executable in MSYS causing which
18912    # to not find them
18913    if test "x$new_path" = x \
18914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18916      new_path="$path"
18917
18918  windows_path="$new_path"
18919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18920    unix_path=`$CYGPATH -u "$windows_path"`
18921    new_path="$unix_path"
18922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18924    new_path="$unix_path"
18925  fi
18926
18927    fi
18928
18929    if test "x$new_path" = x; then
18930      # It's still not found. Now this is an unrecoverable error.
18931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18932$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18933      has_space=`$ECHO "$complete" | $GREP " "`
18934      if test "x$has_space" != x; then
18935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18937      fi
18938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18939    fi
18940  fi
18941
18942  # Now new_path has a complete unix path to the binary
18943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18944    # Keep paths in /bin as-is, but remove trailing .exe if any
18945    new_path="${new_path/%.exe/}"
18946    # Do not save /bin paths to all_fixpath_prefixes!
18947  else
18948    # Not in mixed or Windows style, start by that.
18949    new_path=`cmd //c echo $new_path`
18950
18951  input_path="$new_path"
18952  # Check if we need to convert this using DOS-style short mode. If the path
18953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18954  # take no chances and rewrite it.
18955  # Note: m4 eats our [], so we need to use [ and ] instead.
18956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18957  if test "x$has_forbidden_chars" != x; then
18958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18960  fi
18961
18962    # Output is in $new_path
18963
18964  windows_path="$new_path"
18965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18966    unix_path=`$CYGPATH -u "$windows_path"`
18967    new_path="$unix_path"
18968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18970    new_path="$unix_path"
18971  fi
18972
18973    # remove trailing .exe if any
18974    new_path="${new_path/%.exe/}"
18975
18976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18978  fi
18979
18980    else
18981      # We're on a unix platform. Hooray! :)
18982      # First separate the path from the arguments. This will split at the first
18983      # space.
18984      complete="$FOUND_MAKE"
18985      path="${complete%% *}"
18986      tmp="$complete EOL"
18987      arguments="${tmp#* }"
18988
18989      # Cannot rely on the command "which" here since it doesn't always work.
18990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18991      if test -z "$is_absolute_path"; then
18992        # Path to executable is not absolute. Find it.
18993        IFS_save="$IFS"
18994        IFS=:
18995        for p in $PATH; do
18996          if test -f "$p/$path" && test -x "$p/$path"; then
18997            new_path="$p/$path"
18998            break
18999          fi
19000        done
19001        IFS="$IFS_save"
19002      else
19003        # This is an absolute path, we can use it without further modifications.
19004        new_path="$path"
19005      fi
19006
19007      if test "x$new_path" = x; then
19008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19009$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19010        has_space=`$ECHO "$complete" | $GREP " "`
19011        if test "x$has_space" != x; then
19012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19014        fi
19015        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19016      fi
19017    fi
19018
19019    # Now join together the path and the arguments once again
19020    if test "x$arguments" != xEOL; then
19021      new_complete="$new_path ${arguments% *}"
19022    else
19023      new_complete="$new_path"
19024    fi
19025
19026    if test "x$complete" != "x$new_complete"; then
19027      FOUND_MAKE="$new_complete"
19028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19029$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19030    fi
19031  fi
19032
19033        fi
19034      fi
19035    fi
19036  fi
19037
19038
19039    if test "x$FOUND_MAKE" = x; then
19040      for ac_prog in make
19041do
19042  # Extract the first word of "$ac_prog", so it can be a program name with args.
19043set dummy $ac_prog; ac_word=$2
19044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19045$as_echo_n "checking for $ac_word... " >&6; }
19046if ${ac_cv_path_CHECK_MAKE+:} false; then :
19047  $as_echo_n "(cached) " >&6
19048else
19049  case $CHECK_MAKE in
19050  [\\/]* | ?:[\\/]*)
19051  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19052  ;;
19053  *)
19054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19055for as_dir in $PATH
19056do
19057  IFS=$as_save_IFS
19058  test -z "$as_dir" && as_dir=.
19059    for ac_exec_ext in '' $ac_executable_extensions; do
19060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19061    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19063    break 2
19064  fi
19065done
19066  done
19067IFS=$as_save_IFS
19068
19069  ;;
19070esac
19071fi
19072CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19073if test -n "$CHECK_MAKE"; then
19074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19075$as_echo "$CHECK_MAKE" >&6; }
19076else
19077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19078$as_echo "no" >&6; }
19079fi
19080
19081
19082  test -n "$CHECK_MAKE" && break
19083done
19084
19085
19086  MAKE_CANDIDATE=""$CHECK_MAKE""
19087  DESCRIPTION="make in PATH"
19088
19089  # On Cygwin, we require a newer version of make than on other platforms
19090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19091    MAKE_VERSION_EXPR="-e 4\."
19092    MAKE_REQUIRED_VERSION="4.0"
19093   else
19094    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19095    MAKE_REQUIRED_VERSION="3.81"
19096  fi
19097
19098  if test "x$MAKE_CANDIDATE" != x; then
19099    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19100$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19101    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19102    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19103    if test "x$IS_GNU_MAKE" = x; then
19104      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19105$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19106    else
19107      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19108      if test "x$IS_MODERN_MAKE" = x; then
19109        { $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
19110$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;}
19111      else
19112        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19113          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19114            MAKE_EXPECTED_ENV='cygwin'
19115          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19116            MAKE_EXPECTED_ENV='msys'
19117          else
19118            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19119          fi
19120          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19121          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19122        else
19123          # Not relevant for non-Windows
19124          IS_MAKE_CORRECT_ENV=true
19125        fi
19126        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19127          { $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
19128$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;}
19129        else
19130          FOUND_MAKE=$MAKE_CANDIDATE
19131
19132  # Only process if variable expands to non-empty
19133
19134  if test "x$FOUND_MAKE" != x; then
19135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19136
19137  # First separate the path from the arguments. This will split at the first
19138  # space.
19139  complete="$FOUND_MAKE"
19140  path="${complete%% *}"
19141  tmp="$complete EOL"
19142  arguments="${tmp#* }"
19143
19144  # Input might be given as Windows format, start by converting to
19145  # unix format.
19146  new_path=`$CYGPATH -u "$path"`
19147
19148  # Now try to locate executable using which
19149  new_path=`$WHICH "$new_path" 2> /dev/null`
19150  # bat and cmd files are not always considered executable in cygwin causing which
19151  # to not find them
19152  if test "x$new_path" = x \
19153      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19154      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19155    new_path=`$CYGPATH -u "$path"`
19156  fi
19157  if test "x$new_path" = x; then
19158    # Oops. Which didn't find the executable.
19159    # The splitting of arguments from the executable at a space might have been incorrect,
19160    # since paths with space are more likely in Windows. Give it another try with the whole
19161    # argument.
19162    path="$complete"
19163    arguments="EOL"
19164    new_path=`$CYGPATH -u "$path"`
19165    new_path=`$WHICH "$new_path" 2> /dev/null`
19166    # bat and cmd files are not always considered executable in cygwin causing which
19167    # to not find them
19168    if test "x$new_path" = x \
19169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19171      new_path=`$CYGPATH -u "$path"`
19172    fi
19173    if test "x$new_path" = x; then
19174      # It's still not found. Now this is an unrecoverable error.
19175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19177      has_space=`$ECHO "$complete" | $GREP " "`
19178      if test "x$has_space" != x; then
19179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19181      fi
19182      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19183    fi
19184  fi
19185
19186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19189  # "foo.exe" is OK but "foo" is an error.
19190  #
19191  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19192  # It is also a way to make sure we got the proper file name for the real test later on.
19193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19194  if test "x$test_shortpath" = x; then
19195    # Short path failed, file does not exist as specified.
19196    # Try adding .exe or .cmd
19197    if test -f "${new_path}.exe"; then
19198      input_to_shortpath="${new_path}.exe"
19199    elif test -f "${new_path}.cmd"; then
19200      input_to_shortpath="${new_path}.cmd"
19201    else
19202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19207    fi
19208  else
19209    input_to_shortpath="$new_path"
19210  fi
19211
19212  # Call helper function which possibly converts this using DOS-style short mode.
19213  # If so, the updated path is stored in $new_path.
19214  new_path="$input_to_shortpath"
19215
19216  input_path="$input_to_shortpath"
19217  # Check if we need to convert this using DOS-style short mode. If the path
19218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19219  # take no chances and rewrite it.
19220  # Note: m4 eats our [], so we need to use [ and ] instead.
19221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19222  if test "x$has_forbidden_chars" != x; then
19223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19227      # Going to short mode and back again did indeed matter. Since short mode is
19228      # case insensitive, let's make it lowercase to improve readability.
19229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19230      # Now convert it back to Unix-style (cygpath)
19231      input_path=`$CYGPATH -u "$shortmode_path"`
19232      new_path="$input_path"
19233    fi
19234  fi
19235
19236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19237  if test "x$test_cygdrive_prefix" = x; then
19238    # As a simple fix, exclude /usr/bin since it's not a real path.
19239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19241      # a path prefixed by /cygdrive for fixpath to work.
19242      new_path="$CYGWIN_ROOT_PATH$input_path"
19243    fi
19244  fi
19245
19246  # remove trailing .exe if any
19247  new_path="${new_path/%.exe/}"
19248
19249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19250
19251  # First separate the path from the arguments. This will split at the first
19252  # space.
19253  complete="$FOUND_MAKE"
19254  path="${complete%% *}"
19255  tmp="$complete EOL"
19256  arguments="${tmp#* }"
19257
19258  # Input might be given as Windows format, start by converting to
19259  # unix format.
19260  new_path="$path"
19261
19262  windows_path="$new_path"
19263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19264    unix_path=`$CYGPATH -u "$windows_path"`
19265    new_path="$unix_path"
19266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19268    new_path="$unix_path"
19269  fi
19270
19271
19272  # Now try to locate executable using which
19273  new_path=`$WHICH "$new_path" 2> /dev/null`
19274
19275  if test "x$new_path" = x; then
19276    # Oops. Which didn't find the executable.
19277    # The splitting of arguments from the executable at a space might have been incorrect,
19278    # since paths with space are more likely in Windows. Give it another try with the whole
19279    # argument.
19280    path="$complete"
19281    arguments="EOL"
19282    new_path="$path"
19283
19284  windows_path="$new_path"
19285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19286    unix_path=`$CYGPATH -u "$windows_path"`
19287    new_path="$unix_path"
19288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19290    new_path="$unix_path"
19291  fi
19292
19293
19294    new_path=`$WHICH "$new_path" 2> /dev/null`
19295    # bat and cmd files are not always considered executable in MSYS causing which
19296    # to not find them
19297    if test "x$new_path" = x \
19298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19300      new_path="$path"
19301
19302  windows_path="$new_path"
19303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19304    unix_path=`$CYGPATH -u "$windows_path"`
19305    new_path="$unix_path"
19306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19308    new_path="$unix_path"
19309  fi
19310
19311    fi
19312
19313    if test "x$new_path" = x; then
19314      # It's still not found. Now this is an unrecoverable error.
19315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19317      has_space=`$ECHO "$complete" | $GREP " "`
19318      if test "x$has_space" != x; then
19319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19321      fi
19322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19323    fi
19324  fi
19325
19326  # Now new_path has a complete unix path to the binary
19327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19328    # Keep paths in /bin as-is, but remove trailing .exe if any
19329    new_path="${new_path/%.exe/}"
19330    # Do not save /bin paths to all_fixpath_prefixes!
19331  else
19332    # Not in mixed or Windows style, start by that.
19333    new_path=`cmd //c echo $new_path`
19334
19335  input_path="$new_path"
19336  # Check if we need to convert this using DOS-style short mode. If the path
19337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19338  # take no chances and rewrite it.
19339  # Note: m4 eats our [], so we need to use [ and ] instead.
19340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19341  if test "x$has_forbidden_chars" != x; then
19342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19344  fi
19345
19346    # Output is in $new_path
19347
19348  windows_path="$new_path"
19349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19350    unix_path=`$CYGPATH -u "$windows_path"`
19351    new_path="$unix_path"
19352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19354    new_path="$unix_path"
19355  fi
19356
19357    # remove trailing .exe if any
19358    new_path="${new_path/%.exe/}"
19359
19360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19362  fi
19363
19364    else
19365      # We're on a unix platform. Hooray! :)
19366      # First separate the path from the arguments. This will split at the first
19367      # space.
19368      complete="$FOUND_MAKE"
19369      path="${complete%% *}"
19370      tmp="$complete EOL"
19371      arguments="${tmp#* }"
19372
19373      # Cannot rely on the command "which" here since it doesn't always work.
19374      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19375      if test -z "$is_absolute_path"; then
19376        # Path to executable is not absolute. Find it.
19377        IFS_save="$IFS"
19378        IFS=:
19379        for p in $PATH; do
19380          if test -f "$p/$path" && test -x "$p/$path"; then
19381            new_path="$p/$path"
19382            break
19383          fi
19384        done
19385        IFS="$IFS_save"
19386      else
19387        # This is an absolute path, we can use it without further modifications.
19388        new_path="$path"
19389      fi
19390
19391      if test "x$new_path" = x; then
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19394        has_space=`$ECHO "$complete" | $GREP " "`
19395        if test "x$has_space" != x; then
19396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19398        fi
19399        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19400      fi
19401    fi
19402
19403    # Now join together the path and the arguments once again
19404    if test "x$arguments" != xEOL; then
19405      new_complete="$new_path ${arguments% *}"
19406    else
19407      new_complete="$new_path"
19408    fi
19409
19410    if test "x$complete" != "x$new_complete"; then
19411      FOUND_MAKE="$new_complete"
19412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19413$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19414    fi
19415  fi
19416
19417        fi
19418      fi
19419    fi
19420  fi
19421
19422    fi
19423
19424    if test "x$FOUND_MAKE" = x; then
19425      if test "x$TOOLCHAIN_PATH" != x; then
19426        # We have a toolchain path, check that as well before giving up.
19427        OLD_PATH=$PATH
19428        PATH=$TOOLCHAIN_PATH:$PATH
19429        for ac_prog in gmake
19430do
19431  # Extract the first word of "$ac_prog", so it can be a program name with args.
19432set dummy $ac_prog; ac_word=$2
19433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19434$as_echo_n "checking for $ac_word... " >&6; }
19435if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19436  $as_echo_n "(cached) " >&6
19437else
19438  case $CHECK_TOOLSDIR_GMAKE in
19439  [\\/]* | ?:[\\/]*)
19440  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19441  ;;
19442  *)
19443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19444for as_dir in $PATH
19445do
19446  IFS=$as_save_IFS
19447  test -z "$as_dir" && as_dir=.
19448    for ac_exec_ext in '' $ac_executable_extensions; do
19449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19450    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19452    break 2
19453  fi
19454done
19455  done
19456IFS=$as_save_IFS
19457
19458  ;;
19459esac
19460fi
19461CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19462if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19464$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19465else
19466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19467$as_echo "no" >&6; }
19468fi
19469
19470
19471  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19472done
19473
19474
19475  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19476  DESCRIPTION="gmake in tools-dir"
19477
19478  # On Cygwin, we require a newer version of make than on other platforms
19479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19480    MAKE_VERSION_EXPR="-e 4\."
19481    MAKE_REQUIRED_VERSION="4.0"
19482   else
19483    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19484    MAKE_REQUIRED_VERSION="3.81"
19485  fi
19486
19487  if test "x$MAKE_CANDIDATE" != x; then
19488    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19489$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19490    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19491    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19492    if test "x$IS_GNU_MAKE" = x; then
19493      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19494$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19495    else
19496      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19497      if test "x$IS_MODERN_MAKE" = x; then
19498        { $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
19499$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;}
19500      else
19501        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19502          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19503            MAKE_EXPECTED_ENV='cygwin'
19504          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19505            MAKE_EXPECTED_ENV='msys'
19506          else
19507            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19508          fi
19509          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19510          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19511        else
19512          # Not relevant for non-Windows
19513          IS_MAKE_CORRECT_ENV=true
19514        fi
19515        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19516          { $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
19517$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;}
19518        else
19519          FOUND_MAKE=$MAKE_CANDIDATE
19520
19521  # Only process if variable expands to non-empty
19522
19523  if test "x$FOUND_MAKE" != x; then
19524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19525
19526  # First separate the path from the arguments. This will split at the first
19527  # space.
19528  complete="$FOUND_MAKE"
19529  path="${complete%% *}"
19530  tmp="$complete EOL"
19531  arguments="${tmp#* }"
19532
19533  # Input might be given as Windows format, start by converting to
19534  # unix format.
19535  new_path=`$CYGPATH -u "$path"`
19536
19537  # Now try to locate executable using which
19538  new_path=`$WHICH "$new_path" 2> /dev/null`
19539  # bat and cmd files are not always considered executable in cygwin causing which
19540  # to not find them
19541  if test "x$new_path" = x \
19542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19544    new_path=`$CYGPATH -u "$path"`
19545  fi
19546  if test "x$new_path" = x; then
19547    # Oops. Which didn't find the executable.
19548    # The splitting of arguments from the executable at a space might have been incorrect,
19549    # since paths with space are more likely in Windows. Give it another try with the whole
19550    # argument.
19551    path="$complete"
19552    arguments="EOL"
19553    new_path=`$CYGPATH -u "$path"`
19554    new_path=`$WHICH "$new_path" 2> /dev/null`
19555    # bat and cmd files are not always considered executable in cygwin causing which
19556    # to not find them
19557    if test "x$new_path" = x \
19558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19560      new_path=`$CYGPATH -u "$path"`
19561    fi
19562    if test "x$new_path" = x; then
19563      # It's still not found. Now this is an unrecoverable error.
19564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19566      has_space=`$ECHO "$complete" | $GREP " "`
19567      if test "x$has_space" != x; then
19568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19570      fi
19571      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19572    fi
19573  fi
19574
19575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19578  # "foo.exe" is OK but "foo" is an error.
19579  #
19580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19581  # It is also a way to make sure we got the proper file name for the real test later on.
19582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19583  if test "x$test_shortpath" = x; then
19584    # Short path failed, file does not exist as specified.
19585    # Try adding .exe or .cmd
19586    if test -f "${new_path}.exe"; then
19587      input_to_shortpath="${new_path}.exe"
19588    elif test -f "${new_path}.cmd"; then
19589      input_to_shortpath="${new_path}.cmd"
19590    else
19591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19595      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19596    fi
19597  else
19598    input_to_shortpath="$new_path"
19599  fi
19600
19601  # Call helper function which possibly converts this using DOS-style short mode.
19602  # If so, the updated path is stored in $new_path.
19603  new_path="$input_to_shortpath"
19604
19605  input_path="$input_to_shortpath"
19606  # Check if we need to convert this using DOS-style short mode. If the path
19607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19608  # take no chances and rewrite it.
19609  # Note: m4 eats our [], so we need to use [ and ] instead.
19610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19611  if test "x$has_forbidden_chars" != x; then
19612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19616      # Going to short mode and back again did indeed matter. Since short mode is
19617      # case insensitive, let's make it lowercase to improve readability.
19618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19619      # Now convert it back to Unix-style (cygpath)
19620      input_path=`$CYGPATH -u "$shortmode_path"`
19621      new_path="$input_path"
19622    fi
19623  fi
19624
19625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19626  if test "x$test_cygdrive_prefix" = x; then
19627    # As a simple fix, exclude /usr/bin since it's not a real path.
19628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19630      # a path prefixed by /cygdrive for fixpath to work.
19631      new_path="$CYGWIN_ROOT_PATH$input_path"
19632    fi
19633  fi
19634
19635  # remove trailing .exe if any
19636  new_path="${new_path/%.exe/}"
19637
19638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19639
19640  # First separate the path from the arguments. This will split at the first
19641  # space.
19642  complete="$FOUND_MAKE"
19643  path="${complete%% *}"
19644  tmp="$complete EOL"
19645  arguments="${tmp#* }"
19646
19647  # Input might be given as Windows format, start by converting to
19648  # unix format.
19649  new_path="$path"
19650
19651  windows_path="$new_path"
19652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19653    unix_path=`$CYGPATH -u "$windows_path"`
19654    new_path="$unix_path"
19655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19657    new_path="$unix_path"
19658  fi
19659
19660
19661  # Now try to locate executable using which
19662  new_path=`$WHICH "$new_path" 2> /dev/null`
19663
19664  if test "x$new_path" = x; then
19665    # Oops. Which didn't find the executable.
19666    # The splitting of arguments from the executable at a space might have been incorrect,
19667    # since paths with space are more likely in Windows. Give it another try with the whole
19668    # argument.
19669    path="$complete"
19670    arguments="EOL"
19671    new_path="$path"
19672
19673  windows_path="$new_path"
19674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19675    unix_path=`$CYGPATH -u "$windows_path"`
19676    new_path="$unix_path"
19677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19679    new_path="$unix_path"
19680  fi
19681
19682
19683    new_path=`$WHICH "$new_path" 2> /dev/null`
19684    # bat and cmd files are not always considered executable in MSYS causing which
19685    # to not find them
19686    if test "x$new_path" = x \
19687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19689      new_path="$path"
19690
19691  windows_path="$new_path"
19692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19693    unix_path=`$CYGPATH -u "$windows_path"`
19694    new_path="$unix_path"
19695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19697    new_path="$unix_path"
19698  fi
19699
19700    fi
19701
19702    if test "x$new_path" = x; then
19703      # It's still not found. Now this is an unrecoverable error.
19704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19705$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19706      has_space=`$ECHO "$complete" | $GREP " "`
19707      if test "x$has_space" != x; then
19708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19710      fi
19711      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19712    fi
19713  fi
19714
19715  # Now new_path has a complete unix path to the binary
19716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19717    # Keep paths in /bin as-is, but remove trailing .exe if any
19718    new_path="${new_path/%.exe/}"
19719    # Do not save /bin paths to all_fixpath_prefixes!
19720  else
19721    # Not in mixed or Windows style, start by that.
19722    new_path=`cmd //c echo $new_path`
19723
19724  input_path="$new_path"
19725  # Check if we need to convert this using DOS-style short mode. If the path
19726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19727  # take no chances and rewrite it.
19728  # Note: m4 eats our [], so we need to use [ and ] instead.
19729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19730  if test "x$has_forbidden_chars" != x; then
19731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19733  fi
19734
19735    # Output is in $new_path
19736
19737  windows_path="$new_path"
19738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19739    unix_path=`$CYGPATH -u "$windows_path"`
19740    new_path="$unix_path"
19741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19743    new_path="$unix_path"
19744  fi
19745
19746    # remove trailing .exe if any
19747    new_path="${new_path/%.exe/}"
19748
19749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19751  fi
19752
19753    else
19754      # We're on a unix platform. Hooray! :)
19755      # First separate the path from the arguments. This will split at the first
19756      # space.
19757      complete="$FOUND_MAKE"
19758      path="${complete%% *}"
19759      tmp="$complete EOL"
19760      arguments="${tmp#* }"
19761
19762      # Cannot rely on the command "which" here since it doesn't always work.
19763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19764      if test -z "$is_absolute_path"; then
19765        # Path to executable is not absolute. Find it.
19766        IFS_save="$IFS"
19767        IFS=:
19768        for p in $PATH; do
19769          if test -f "$p/$path" && test -x "$p/$path"; then
19770            new_path="$p/$path"
19771            break
19772          fi
19773        done
19774        IFS="$IFS_save"
19775      else
19776        # This is an absolute path, we can use it without further modifications.
19777        new_path="$path"
19778      fi
19779
19780      if test "x$new_path" = x; then
19781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19783        has_space=`$ECHO "$complete" | $GREP " "`
19784        if test "x$has_space" != x; then
19785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19787        fi
19788        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19789      fi
19790    fi
19791
19792    # Now join together the path and the arguments once again
19793    if test "x$arguments" != xEOL; then
19794      new_complete="$new_path ${arguments% *}"
19795    else
19796      new_complete="$new_path"
19797    fi
19798
19799    if test "x$complete" != "x$new_complete"; then
19800      FOUND_MAKE="$new_complete"
19801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19802$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19803    fi
19804  fi
19805
19806        fi
19807      fi
19808    fi
19809  fi
19810
19811        if test "x$FOUND_MAKE" = x; then
19812          for ac_prog in make
19813do
19814  # Extract the first word of "$ac_prog", so it can be a program name with args.
19815set dummy $ac_prog; ac_word=$2
19816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19817$as_echo_n "checking for $ac_word... " >&6; }
19818if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19819  $as_echo_n "(cached) " >&6
19820else
19821  case $CHECK_TOOLSDIR_MAKE in
19822  [\\/]* | ?:[\\/]*)
19823  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19824  ;;
19825  *)
19826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19827for as_dir in $PATH
19828do
19829  IFS=$as_save_IFS
19830  test -z "$as_dir" && as_dir=.
19831    for ac_exec_ext in '' $ac_executable_extensions; do
19832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19833    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19835    break 2
19836  fi
19837done
19838  done
19839IFS=$as_save_IFS
19840
19841  ;;
19842esac
19843fi
19844CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19845if test -n "$CHECK_TOOLSDIR_MAKE"; then
19846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19847$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19848else
19849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19850$as_echo "no" >&6; }
19851fi
19852
19853
19854  test -n "$CHECK_TOOLSDIR_MAKE" && break
19855done
19856
19857
19858  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19859  DESCRIPTION="make in tools-dir"
19860
19861  # On Cygwin, we require a newer version of make than on other platforms
19862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19863    MAKE_VERSION_EXPR="-e 4\."
19864    MAKE_REQUIRED_VERSION="4.0"
19865   else
19866    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19867    MAKE_REQUIRED_VERSION="3.81"
19868  fi
19869
19870  if test "x$MAKE_CANDIDATE" != x; then
19871    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19872$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19873    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19874    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19875    if test "x$IS_GNU_MAKE" = x; then
19876      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19877$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19878    else
19879      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19880      if test "x$IS_MODERN_MAKE" = x; then
19881        { $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
19882$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;}
19883      else
19884        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19885          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19886            MAKE_EXPECTED_ENV='cygwin'
19887          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19888            MAKE_EXPECTED_ENV='msys'
19889          else
19890            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19891          fi
19892          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19893          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19894        else
19895          # Not relevant for non-Windows
19896          IS_MAKE_CORRECT_ENV=true
19897        fi
19898        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19899          { $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
19900$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;}
19901        else
19902          FOUND_MAKE=$MAKE_CANDIDATE
19903
19904  # Only process if variable expands to non-empty
19905
19906  if test "x$FOUND_MAKE" != x; then
19907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19908
19909  # First separate the path from the arguments. This will split at the first
19910  # space.
19911  complete="$FOUND_MAKE"
19912  path="${complete%% *}"
19913  tmp="$complete EOL"
19914  arguments="${tmp#* }"
19915
19916  # Input might be given as Windows format, start by converting to
19917  # unix format.
19918  new_path=`$CYGPATH -u "$path"`
19919
19920  # Now try to locate executable using which
19921  new_path=`$WHICH "$new_path" 2> /dev/null`
19922  # bat and cmd files are not always considered executable in cygwin causing which
19923  # to not find them
19924  if test "x$new_path" = x \
19925      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19926      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19927    new_path=`$CYGPATH -u "$path"`
19928  fi
19929  if test "x$new_path" = x; then
19930    # Oops. Which didn't find the executable.
19931    # The splitting of arguments from the executable at a space might have been incorrect,
19932    # since paths with space are more likely in Windows. Give it another try with the whole
19933    # argument.
19934    path="$complete"
19935    arguments="EOL"
19936    new_path=`$CYGPATH -u "$path"`
19937    new_path=`$WHICH "$new_path" 2> /dev/null`
19938    # bat and cmd files are not always considered executable in cygwin causing which
19939    # to not find them
19940    if test "x$new_path" = x \
19941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19943      new_path=`$CYGPATH -u "$path"`
19944    fi
19945    if test "x$new_path" = x; then
19946      # It's still not found. Now this is an unrecoverable error.
19947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19948$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19949      has_space=`$ECHO "$complete" | $GREP " "`
19950      if test "x$has_space" != x; then
19951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19953      fi
19954      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19955    fi
19956  fi
19957
19958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19961  # "foo.exe" is OK but "foo" is an error.
19962  #
19963  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19964  # It is also a way to make sure we got the proper file name for the real test later on.
19965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19966  if test "x$test_shortpath" = x; then
19967    # Short path failed, file does not exist as specified.
19968    # Try adding .exe or .cmd
19969    if test -f "${new_path}.exe"; then
19970      input_to_shortpath="${new_path}.exe"
19971    elif test -f "${new_path}.cmd"; then
19972      input_to_shortpath="${new_path}.cmd"
19973    else
19974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19975$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19976      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19977$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19978      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19979    fi
19980  else
19981    input_to_shortpath="$new_path"
19982  fi
19983
19984  # Call helper function which possibly converts this using DOS-style short mode.
19985  # If so, the updated path is stored in $new_path.
19986  new_path="$input_to_shortpath"
19987
19988  input_path="$input_to_shortpath"
19989  # Check if we need to convert this using DOS-style short mode. If the path
19990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19991  # take no chances and rewrite it.
19992  # Note: m4 eats our [], so we need to use [ and ] instead.
19993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19994  if test "x$has_forbidden_chars" != x; then
19995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19999      # Going to short mode and back again did indeed matter. Since short mode is
20000      # case insensitive, let's make it lowercase to improve readability.
20001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20002      # Now convert it back to Unix-style (cygpath)
20003      input_path=`$CYGPATH -u "$shortmode_path"`
20004      new_path="$input_path"
20005    fi
20006  fi
20007
20008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20009  if test "x$test_cygdrive_prefix" = x; then
20010    # As a simple fix, exclude /usr/bin since it's not a real path.
20011    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20013      # a path prefixed by /cygdrive for fixpath to work.
20014      new_path="$CYGWIN_ROOT_PATH$input_path"
20015    fi
20016  fi
20017
20018  # remove trailing .exe if any
20019  new_path="${new_path/%.exe/}"
20020
20021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20022
20023  # First separate the path from the arguments. This will split at the first
20024  # space.
20025  complete="$FOUND_MAKE"
20026  path="${complete%% *}"
20027  tmp="$complete EOL"
20028  arguments="${tmp#* }"
20029
20030  # Input might be given as Windows format, start by converting to
20031  # unix format.
20032  new_path="$path"
20033
20034  windows_path="$new_path"
20035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20036    unix_path=`$CYGPATH -u "$windows_path"`
20037    new_path="$unix_path"
20038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20040    new_path="$unix_path"
20041  fi
20042
20043
20044  # Now try to locate executable using which
20045  new_path=`$WHICH "$new_path" 2> /dev/null`
20046
20047  if test "x$new_path" = x; then
20048    # Oops. Which didn't find the executable.
20049    # The splitting of arguments from the executable at a space might have been incorrect,
20050    # since paths with space are more likely in Windows. Give it another try with the whole
20051    # argument.
20052    path="$complete"
20053    arguments="EOL"
20054    new_path="$path"
20055
20056  windows_path="$new_path"
20057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20058    unix_path=`$CYGPATH -u "$windows_path"`
20059    new_path="$unix_path"
20060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20062    new_path="$unix_path"
20063  fi
20064
20065
20066    new_path=`$WHICH "$new_path" 2> /dev/null`
20067    # bat and cmd files are not always considered executable in MSYS causing which
20068    # to not find them
20069    if test "x$new_path" = x \
20070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20072      new_path="$path"
20073
20074  windows_path="$new_path"
20075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20076    unix_path=`$CYGPATH -u "$windows_path"`
20077    new_path="$unix_path"
20078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20080    new_path="$unix_path"
20081  fi
20082
20083    fi
20084
20085    if test "x$new_path" = x; then
20086      # It's still not found. Now this is an unrecoverable error.
20087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20089      has_space=`$ECHO "$complete" | $GREP " "`
20090      if test "x$has_space" != x; then
20091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20093      fi
20094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20095    fi
20096  fi
20097
20098  # Now new_path has a complete unix path to the binary
20099  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20100    # Keep paths in /bin as-is, but remove trailing .exe if any
20101    new_path="${new_path/%.exe/}"
20102    # Do not save /bin paths to all_fixpath_prefixes!
20103  else
20104    # Not in mixed or Windows style, start by that.
20105    new_path=`cmd //c echo $new_path`
20106
20107  input_path="$new_path"
20108  # Check if we need to convert this using DOS-style short mode. If the path
20109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20110  # take no chances and rewrite it.
20111  # Note: m4 eats our [], so we need to use [ and ] instead.
20112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20113  if test "x$has_forbidden_chars" != x; then
20114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20116  fi
20117
20118    # Output is in $new_path
20119
20120  windows_path="$new_path"
20121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20122    unix_path=`$CYGPATH -u "$windows_path"`
20123    new_path="$unix_path"
20124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20126    new_path="$unix_path"
20127  fi
20128
20129    # remove trailing .exe if any
20130    new_path="${new_path/%.exe/}"
20131
20132    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20133    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20134  fi
20135
20136    else
20137      # We're on a unix platform. Hooray! :)
20138      # First separate the path from the arguments. This will split at the first
20139      # space.
20140      complete="$FOUND_MAKE"
20141      path="${complete%% *}"
20142      tmp="$complete EOL"
20143      arguments="${tmp#* }"
20144
20145      # Cannot rely on the command "which" here since it doesn't always work.
20146      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20147      if test -z "$is_absolute_path"; then
20148        # Path to executable is not absolute. Find it.
20149        IFS_save="$IFS"
20150        IFS=:
20151        for p in $PATH; do
20152          if test -f "$p/$path" && test -x "$p/$path"; then
20153            new_path="$p/$path"
20154            break
20155          fi
20156        done
20157        IFS="$IFS_save"
20158      else
20159        # This is an absolute path, we can use it without further modifications.
20160        new_path="$path"
20161      fi
20162
20163      if test "x$new_path" = x; then
20164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20165$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20166        has_space=`$ECHO "$complete" | $GREP " "`
20167        if test "x$has_space" != x; then
20168          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20169$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20170        fi
20171        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20172      fi
20173    fi
20174
20175    # Now join together the path and the arguments once again
20176    if test "x$arguments" != xEOL; then
20177      new_complete="$new_path ${arguments% *}"
20178    else
20179      new_complete="$new_path"
20180    fi
20181
20182    if test "x$complete" != "x$new_complete"; then
20183      FOUND_MAKE="$new_complete"
20184      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20185$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20186    fi
20187  fi
20188
20189        fi
20190      fi
20191    fi
20192  fi
20193
20194        fi
20195        PATH=$OLD_PATH
20196      fi
20197    fi
20198
20199    if test "x$FOUND_MAKE" = x; then
20200      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
20201    fi
20202
20203    else
20204      # If it succeeded, then it was overridden by the user. We will use it
20205      # for the tool.
20206
20207      # First remove it from the list of overridden variables, so we can test
20208      # for unknown variables in the end.
20209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20210
20211      # Check if we try to supply an empty value
20212      if test "x$MAKE" = x; then
20213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20214$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20216$as_echo_n "checking for MAKE... " >&6; }
20217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20218$as_echo "disabled" >&6; }
20219      else
20220        # Check if the provided tool contains a complete path.
20221        tool_specified="$MAKE"
20222        tool_basename="${tool_specified##*/}"
20223        if test "x$tool_basename" = "x$tool_specified"; then
20224          # A command without a complete path is provided, search $PATH.
20225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20226$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20227          # Extract the first word of "$tool_basename", so it can be a program name with args.
20228set dummy $tool_basename; ac_word=$2
20229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20230$as_echo_n "checking for $ac_word... " >&6; }
20231if ${ac_cv_path_MAKE+:} false; then :
20232  $as_echo_n "(cached) " >&6
20233else
20234  case $MAKE in
20235  [\\/]* | ?:[\\/]*)
20236  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20237  ;;
20238  *)
20239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20240for as_dir in $PATH
20241do
20242  IFS=$as_save_IFS
20243  test -z "$as_dir" && as_dir=.
20244    for ac_exec_ext in '' $ac_executable_extensions; do
20245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20246    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20248    break 2
20249  fi
20250done
20251  done
20252IFS=$as_save_IFS
20253
20254  ;;
20255esac
20256fi
20257MAKE=$ac_cv_path_MAKE
20258if test -n "$MAKE"; then
20259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20260$as_echo "$MAKE" >&6; }
20261else
20262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20263$as_echo "no" >&6; }
20264fi
20265
20266
20267          if test "x$MAKE" = x; then
20268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20269          fi
20270        else
20271          # Otherwise we believe it is a complete path. Use it as it is.
20272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20273$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20275$as_echo_n "checking for MAKE... " >&6; }
20276          if test ! -x "$tool_specified"; then
20277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20278$as_echo "not found" >&6; }
20279            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20280          fi
20281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20282$as_echo "$tool_specified" >&6; }
20283        fi
20284      fi
20285    fi
20286
20287    # If MAKE was set by user, verify the version
20288
20289  MAKE_CANDIDATE=""$MAKE""
20290  DESCRIPTION="user supplied MAKE=$MAKE"
20291
20292  # On Cygwin, we require a newer version of make than on other platforms
20293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20294    MAKE_VERSION_EXPR="-e 4\."
20295    MAKE_REQUIRED_VERSION="4.0"
20296   else
20297    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20298    MAKE_REQUIRED_VERSION="3.81"
20299  fi
20300
20301  if test "x$MAKE_CANDIDATE" != x; then
20302    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20303$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20304    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20305    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20306    if test "x$IS_GNU_MAKE" = x; then
20307      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20308$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20309    else
20310      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20311      if test "x$IS_MODERN_MAKE" = x; then
20312        { $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
20313$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;}
20314      else
20315        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20316          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20317            MAKE_EXPECTED_ENV='cygwin'
20318          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20319            MAKE_EXPECTED_ENV='msys'
20320          else
20321            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20322          fi
20323          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20324          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20325        else
20326          # Not relevant for non-Windows
20327          IS_MAKE_CORRECT_ENV=true
20328        fi
20329        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20330          { $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
20331$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;}
20332        else
20333          FOUND_MAKE=$MAKE_CANDIDATE
20334
20335  # Only process if variable expands to non-empty
20336
20337  if test "x$FOUND_MAKE" != x; then
20338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20339
20340  # First separate the path from the arguments. This will split at the first
20341  # space.
20342  complete="$FOUND_MAKE"
20343  path="${complete%% *}"
20344  tmp="$complete EOL"
20345  arguments="${tmp#* }"
20346
20347  # Input might be given as Windows format, start by converting to
20348  # unix format.
20349  new_path=`$CYGPATH -u "$path"`
20350
20351  # Now try to locate executable using which
20352  new_path=`$WHICH "$new_path" 2> /dev/null`
20353  # bat and cmd files are not always considered executable in cygwin causing which
20354  # to not find them
20355  if test "x$new_path" = x \
20356      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20357      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20358    new_path=`$CYGPATH -u "$path"`
20359  fi
20360  if test "x$new_path" = x; then
20361    # Oops. Which didn't find the executable.
20362    # The splitting of arguments from the executable at a space might have been incorrect,
20363    # since paths with space are more likely in Windows. Give it another try with the whole
20364    # argument.
20365    path="$complete"
20366    arguments="EOL"
20367    new_path=`$CYGPATH -u "$path"`
20368    new_path=`$WHICH "$new_path" 2> /dev/null`
20369    # bat and cmd files are not always considered executable in cygwin causing which
20370    # to not find them
20371    if test "x$new_path" = x \
20372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20374      new_path=`$CYGPATH -u "$path"`
20375    fi
20376    if test "x$new_path" = x; then
20377      # It's still not found. Now this is an unrecoverable error.
20378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20379$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20380      has_space=`$ECHO "$complete" | $GREP " "`
20381      if test "x$has_space" != x; then
20382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20384      fi
20385      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20386    fi
20387  fi
20388
20389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20392  # "foo.exe" is OK but "foo" is an error.
20393  #
20394  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20395  # It is also a way to make sure we got the proper file name for the real test later on.
20396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20397  if test "x$test_shortpath" = x; then
20398    # Short path failed, file does not exist as specified.
20399    # Try adding .exe or .cmd
20400    if test -f "${new_path}.exe"; then
20401      input_to_shortpath="${new_path}.exe"
20402    elif test -f "${new_path}.cmd"; then
20403      input_to_shortpath="${new_path}.cmd"
20404    else
20405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20406$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20409      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20410    fi
20411  else
20412    input_to_shortpath="$new_path"
20413  fi
20414
20415  # Call helper function which possibly converts this using DOS-style short mode.
20416  # If so, the updated path is stored in $new_path.
20417  new_path="$input_to_shortpath"
20418
20419  input_path="$input_to_shortpath"
20420  # Check if we need to convert this using DOS-style short mode. If the path
20421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20422  # take no chances and rewrite it.
20423  # Note: m4 eats our [], so we need to use [ and ] instead.
20424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20425  if test "x$has_forbidden_chars" != x; then
20426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20430      # Going to short mode and back again did indeed matter. Since short mode is
20431      # case insensitive, let's make it lowercase to improve readability.
20432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20433      # Now convert it back to Unix-style (cygpath)
20434      input_path=`$CYGPATH -u "$shortmode_path"`
20435      new_path="$input_path"
20436    fi
20437  fi
20438
20439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20440  if test "x$test_cygdrive_prefix" = x; then
20441    # As a simple fix, exclude /usr/bin since it's not a real path.
20442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20444      # a path prefixed by /cygdrive for fixpath to work.
20445      new_path="$CYGWIN_ROOT_PATH$input_path"
20446    fi
20447  fi
20448
20449  # remove trailing .exe if any
20450  new_path="${new_path/%.exe/}"
20451
20452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20453
20454  # First separate the path from the arguments. This will split at the first
20455  # space.
20456  complete="$FOUND_MAKE"
20457  path="${complete%% *}"
20458  tmp="$complete EOL"
20459  arguments="${tmp#* }"
20460
20461  # Input might be given as Windows format, start by converting to
20462  # unix format.
20463  new_path="$path"
20464
20465  windows_path="$new_path"
20466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20467    unix_path=`$CYGPATH -u "$windows_path"`
20468    new_path="$unix_path"
20469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20471    new_path="$unix_path"
20472  fi
20473
20474
20475  # Now try to locate executable using which
20476  new_path=`$WHICH "$new_path" 2> /dev/null`
20477
20478  if test "x$new_path" = x; then
20479    # Oops. Which didn't find the executable.
20480    # The splitting of arguments from the executable at a space might have been incorrect,
20481    # since paths with space are more likely in Windows. Give it another try with the whole
20482    # argument.
20483    path="$complete"
20484    arguments="EOL"
20485    new_path="$path"
20486
20487  windows_path="$new_path"
20488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20489    unix_path=`$CYGPATH -u "$windows_path"`
20490    new_path="$unix_path"
20491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20493    new_path="$unix_path"
20494  fi
20495
20496
20497    new_path=`$WHICH "$new_path" 2> /dev/null`
20498    # bat and cmd files are not always considered executable in MSYS causing which
20499    # to not find them
20500    if test "x$new_path" = x \
20501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20503      new_path="$path"
20504
20505  windows_path="$new_path"
20506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20507    unix_path=`$CYGPATH -u "$windows_path"`
20508    new_path="$unix_path"
20509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20511    new_path="$unix_path"
20512  fi
20513
20514    fi
20515
20516    if test "x$new_path" = x; then
20517      # It's still not found. Now this is an unrecoverable error.
20518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20519$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20520      has_space=`$ECHO "$complete" | $GREP " "`
20521      if test "x$has_space" != x; then
20522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20524      fi
20525      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20526    fi
20527  fi
20528
20529  # Now new_path has a complete unix path to the binary
20530  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20531    # Keep paths in /bin as-is, but remove trailing .exe if any
20532    new_path="${new_path/%.exe/}"
20533    # Do not save /bin paths to all_fixpath_prefixes!
20534  else
20535    # Not in mixed or Windows style, start by that.
20536    new_path=`cmd //c echo $new_path`
20537
20538  input_path="$new_path"
20539  # Check if we need to convert this using DOS-style short mode. If the path
20540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20541  # take no chances and rewrite it.
20542  # Note: m4 eats our [], so we need to use [ and ] instead.
20543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20544  if test "x$has_forbidden_chars" != x; then
20545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20547  fi
20548
20549    # Output is in $new_path
20550
20551  windows_path="$new_path"
20552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20553    unix_path=`$CYGPATH -u "$windows_path"`
20554    new_path="$unix_path"
20555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20557    new_path="$unix_path"
20558  fi
20559
20560    # remove trailing .exe if any
20561    new_path="${new_path/%.exe/}"
20562
20563    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20564    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20565  fi
20566
20567    else
20568      # We're on a unix platform. Hooray! :)
20569      # First separate the path from the arguments. This will split at the first
20570      # space.
20571      complete="$FOUND_MAKE"
20572      path="${complete%% *}"
20573      tmp="$complete EOL"
20574      arguments="${tmp#* }"
20575
20576      # Cannot rely on the command "which" here since it doesn't always work.
20577      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20578      if test -z "$is_absolute_path"; then
20579        # Path to executable is not absolute. Find it.
20580        IFS_save="$IFS"
20581        IFS=:
20582        for p in $PATH; do
20583          if test -f "$p/$path" && test -x "$p/$path"; then
20584            new_path="$p/$path"
20585            break
20586          fi
20587        done
20588        IFS="$IFS_save"
20589      else
20590        # This is an absolute path, we can use it without further modifications.
20591        new_path="$path"
20592      fi
20593
20594      if test "x$new_path" = x; then
20595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20596$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20597        has_space=`$ECHO "$complete" | $GREP " "`
20598        if test "x$has_space" != x; then
20599          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20601        fi
20602        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20603      fi
20604    fi
20605
20606    # Now join together the path and the arguments once again
20607    if test "x$arguments" != xEOL; then
20608      new_complete="$new_path ${arguments% *}"
20609    else
20610      new_complete="$new_path"
20611    fi
20612
20613    if test "x$complete" != "x$new_complete"; then
20614      FOUND_MAKE="$new_complete"
20615      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20616$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20617    fi
20618  fi
20619
20620        fi
20621      fi
20622    fi
20623  fi
20624
20625    if test "x$FOUND_MAKE" = x; then
20626      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20627    fi
20628
20629  fi
20630
20631
20632  MAKE=$FOUND_MAKE
20633
20634  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20635$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20636
20637
20638  # Check if make supports the output sync option and if so, setup using it.
20639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20640$as_echo_n "checking if make --output-sync is supported... " >&6; }
20641  if $MAKE --version -O > /dev/null 2>&1; then
20642    OUTPUT_SYNC_SUPPORTED=true
20643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20644$as_echo "yes" >&6; }
20645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20646$as_echo_n "checking for output-sync value... " >&6; }
20647
20648# Check whether --with-output-sync was given.
20649if test "${with_output_sync+set}" = set; then :
20650  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20651fi
20652
20653    if test "x$OUTPUT_SYNC" = "x"; then
20654      OUTPUT_SYNC=none
20655    fi
20656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20657$as_echo "$OUTPUT_SYNC" >&6; }
20658    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20659      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20660    fi
20661  else
20662    OUTPUT_SYNC_SUPPORTED=false
20663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20664$as_echo "no" >&6; }
20665  fi
20666
20667
20668
20669
20670
20671
20672  # Test if find supports -delete
20673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20674$as_echo_n "checking if find supports -delete... " >&6; }
20675  FIND_DELETE="-delete"
20676
20677  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20678
20679  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20680
20681  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20682  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20683    # No, it does not.
20684    rm $DELETEDIR/TestIfFindSupportsDelete
20685    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20686      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20687      FIND_DELETE="-print | xargs rm"
20688    else
20689      FIND_DELETE="-exec rm \{\} \+"
20690    fi
20691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20692$as_echo "no" >&6; }
20693  else
20694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20695$as_echo "yes" >&6; }
20696  fi
20697  rmdir $DELETEDIR
20698
20699
20700
20701  # These tools might not be installed by default,
20702  # need hint on how to install them.
20703
20704
20705
20706  # Publish this variable in the help.
20707
20708
20709  if [ -z "${UNZIP+x}" ]; then
20710    # The variable is not set by user, try to locate tool using the code snippet
20711    for ac_prog in unzip
20712do
20713  # Extract the first word of "$ac_prog", so it can be a program name with args.
20714set dummy $ac_prog; ac_word=$2
20715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20716$as_echo_n "checking for $ac_word... " >&6; }
20717if ${ac_cv_path_UNZIP+:} false; then :
20718  $as_echo_n "(cached) " >&6
20719else
20720  case $UNZIP in
20721  [\\/]* | ?:[\\/]*)
20722  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20723  ;;
20724  *)
20725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20726for as_dir in $PATH
20727do
20728  IFS=$as_save_IFS
20729  test -z "$as_dir" && as_dir=.
20730    for ac_exec_ext in '' $ac_executable_extensions; do
20731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20732    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20734    break 2
20735  fi
20736done
20737  done
20738IFS=$as_save_IFS
20739
20740  ;;
20741esac
20742fi
20743UNZIP=$ac_cv_path_UNZIP
20744if test -n "$UNZIP"; then
20745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20746$as_echo "$UNZIP" >&6; }
20747else
20748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20749$as_echo "no" >&6; }
20750fi
20751
20752
20753  test -n "$UNZIP" && break
20754done
20755
20756  else
20757    # The variable is set, but is it from the command line or the environment?
20758
20759    # Try to remove the string !UNZIP! from our list.
20760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20762      # If it failed, the variable was not from the command line. Ignore it,
20763      # but warn the user (except for BASH, which is always set by the calling BASH).
20764      if test "xUNZIP" != xBASH; then
20765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20766$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20767      fi
20768      # Try to locate tool using the code snippet
20769      for ac_prog in unzip
20770do
20771  # Extract the first word of "$ac_prog", so it can be a program name with args.
20772set dummy $ac_prog; ac_word=$2
20773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20774$as_echo_n "checking for $ac_word... " >&6; }
20775if ${ac_cv_path_UNZIP+:} false; then :
20776  $as_echo_n "(cached) " >&6
20777else
20778  case $UNZIP in
20779  [\\/]* | ?:[\\/]*)
20780  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20781  ;;
20782  *)
20783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20784for as_dir in $PATH
20785do
20786  IFS=$as_save_IFS
20787  test -z "$as_dir" && as_dir=.
20788    for ac_exec_ext in '' $ac_executable_extensions; do
20789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20790    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20792    break 2
20793  fi
20794done
20795  done
20796IFS=$as_save_IFS
20797
20798  ;;
20799esac
20800fi
20801UNZIP=$ac_cv_path_UNZIP
20802if test -n "$UNZIP"; then
20803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20804$as_echo "$UNZIP" >&6; }
20805else
20806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20807$as_echo "no" >&6; }
20808fi
20809
20810
20811  test -n "$UNZIP" && break
20812done
20813
20814    else
20815      # If it succeeded, then it was overridden by the user. We will use it
20816      # for the tool.
20817
20818      # First remove it from the list of overridden variables, so we can test
20819      # for unknown variables in the end.
20820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20821
20822      # Check if we try to supply an empty value
20823      if test "x$UNZIP" = x; then
20824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20825$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20827$as_echo_n "checking for UNZIP... " >&6; }
20828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20829$as_echo "disabled" >&6; }
20830      else
20831        # Check if the provided tool contains a complete path.
20832        tool_specified="$UNZIP"
20833        tool_basename="${tool_specified##*/}"
20834        if test "x$tool_basename" = "x$tool_specified"; then
20835          # A command without a complete path is provided, search $PATH.
20836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20837$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20838          # Extract the first word of "$tool_basename", so it can be a program name with args.
20839set dummy $tool_basename; ac_word=$2
20840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20841$as_echo_n "checking for $ac_word... " >&6; }
20842if ${ac_cv_path_UNZIP+:} false; then :
20843  $as_echo_n "(cached) " >&6
20844else
20845  case $UNZIP in
20846  [\\/]* | ?:[\\/]*)
20847  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20848  ;;
20849  *)
20850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20851for as_dir in $PATH
20852do
20853  IFS=$as_save_IFS
20854  test -z "$as_dir" && as_dir=.
20855    for ac_exec_ext in '' $ac_executable_extensions; do
20856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20857    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20859    break 2
20860  fi
20861done
20862  done
20863IFS=$as_save_IFS
20864
20865  ;;
20866esac
20867fi
20868UNZIP=$ac_cv_path_UNZIP
20869if test -n "$UNZIP"; then
20870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20871$as_echo "$UNZIP" >&6; }
20872else
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20874$as_echo "no" >&6; }
20875fi
20876
20877
20878          if test "x$UNZIP" = x; then
20879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20880          fi
20881        else
20882          # Otherwise we believe it is a complete path. Use it as it is.
20883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20884$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20886$as_echo_n "checking for UNZIP... " >&6; }
20887          if test ! -x "$tool_specified"; then
20888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20889$as_echo "not found" >&6; }
20890            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20891          fi
20892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20893$as_echo "$tool_specified" >&6; }
20894        fi
20895      fi
20896    fi
20897
20898  fi
20899
20900
20901
20902  if test "x$UNZIP" = x; then
20903    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20904  fi
20905
20906
20907
20908
20909
20910  # Publish this variable in the help.
20911
20912
20913  if [ -z "${ZIP+x}" ]; then
20914    # The variable is not set by user, try to locate tool using the code snippet
20915    for ac_prog in zip
20916do
20917  # Extract the first word of "$ac_prog", so it can be a program name with args.
20918set dummy $ac_prog; ac_word=$2
20919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20920$as_echo_n "checking for $ac_word... " >&6; }
20921if ${ac_cv_path_ZIP+:} false; then :
20922  $as_echo_n "(cached) " >&6
20923else
20924  case $ZIP in
20925  [\\/]* | ?:[\\/]*)
20926  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20927  ;;
20928  *)
20929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20930for as_dir in $PATH
20931do
20932  IFS=$as_save_IFS
20933  test -z "$as_dir" && as_dir=.
20934    for ac_exec_ext in '' $ac_executable_extensions; do
20935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20936    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20938    break 2
20939  fi
20940done
20941  done
20942IFS=$as_save_IFS
20943
20944  ;;
20945esac
20946fi
20947ZIP=$ac_cv_path_ZIP
20948if test -n "$ZIP"; then
20949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20950$as_echo "$ZIP" >&6; }
20951else
20952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20953$as_echo "no" >&6; }
20954fi
20955
20956
20957  test -n "$ZIP" && break
20958done
20959
20960  else
20961    # The variable is set, but is it from the command line or the environment?
20962
20963    # Try to remove the string !ZIP! from our list.
20964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20966      # If it failed, the variable was not from the command line. Ignore it,
20967      # but warn the user (except for BASH, which is always set by the calling BASH).
20968      if test "xZIP" != xBASH; then
20969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20970$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20971      fi
20972      # Try to locate tool using the code snippet
20973      for ac_prog in zip
20974do
20975  # Extract the first word of "$ac_prog", so it can be a program name with args.
20976set dummy $ac_prog; ac_word=$2
20977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20978$as_echo_n "checking for $ac_word... " >&6; }
20979if ${ac_cv_path_ZIP+:} false; then :
20980  $as_echo_n "(cached) " >&6
20981else
20982  case $ZIP in
20983  [\\/]* | ?:[\\/]*)
20984  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20985  ;;
20986  *)
20987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20988for as_dir in $PATH
20989do
20990  IFS=$as_save_IFS
20991  test -z "$as_dir" && as_dir=.
20992    for ac_exec_ext in '' $ac_executable_extensions; do
20993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20994    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20996    break 2
20997  fi
20998done
20999  done
21000IFS=$as_save_IFS
21001
21002  ;;
21003esac
21004fi
21005ZIP=$ac_cv_path_ZIP
21006if test -n "$ZIP"; then
21007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21008$as_echo "$ZIP" >&6; }
21009else
21010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21011$as_echo "no" >&6; }
21012fi
21013
21014
21015  test -n "$ZIP" && break
21016done
21017
21018    else
21019      # If it succeeded, then it was overridden by the user. We will use it
21020      # for the tool.
21021
21022      # First remove it from the list of overridden variables, so we can test
21023      # for unknown variables in the end.
21024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21025
21026      # Check if we try to supply an empty value
21027      if test "x$ZIP" = x; then
21028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21029$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21031$as_echo_n "checking for ZIP... " >&6; }
21032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21033$as_echo "disabled" >&6; }
21034      else
21035        # Check if the provided tool contains a complete path.
21036        tool_specified="$ZIP"
21037        tool_basename="${tool_specified##*/}"
21038        if test "x$tool_basename" = "x$tool_specified"; then
21039          # A command without a complete path is provided, search $PATH.
21040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21041$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21042          # Extract the first word of "$tool_basename", so it can be a program name with args.
21043set dummy $tool_basename; ac_word=$2
21044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21045$as_echo_n "checking for $ac_word... " >&6; }
21046if ${ac_cv_path_ZIP+:} false; then :
21047  $as_echo_n "(cached) " >&6
21048else
21049  case $ZIP in
21050  [\\/]* | ?:[\\/]*)
21051  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21052  ;;
21053  *)
21054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21055for as_dir in $PATH
21056do
21057  IFS=$as_save_IFS
21058  test -z "$as_dir" && as_dir=.
21059    for ac_exec_ext in '' $ac_executable_extensions; do
21060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21061    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21063    break 2
21064  fi
21065done
21066  done
21067IFS=$as_save_IFS
21068
21069  ;;
21070esac
21071fi
21072ZIP=$ac_cv_path_ZIP
21073if test -n "$ZIP"; then
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21075$as_echo "$ZIP" >&6; }
21076else
21077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21078$as_echo "no" >&6; }
21079fi
21080
21081
21082          if test "x$ZIP" = x; then
21083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21084          fi
21085        else
21086          # Otherwise we believe it is a complete path. Use it as it is.
21087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21088$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21090$as_echo_n "checking for ZIP... " >&6; }
21091          if test ! -x "$tool_specified"; then
21092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21093$as_echo "not found" >&6; }
21094            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21095          fi
21096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21097$as_echo "$tool_specified" >&6; }
21098        fi
21099      fi
21100    fi
21101
21102  fi
21103
21104
21105
21106  if test "x$ZIP" = x; then
21107    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21108  fi
21109
21110
21111
21112  # Non-required basic tools
21113
21114
21115
21116  # Publish this variable in the help.
21117
21118
21119  if [ -z "${LDD+x}" ]; then
21120    # The variable is not set by user, try to locate tool using the code snippet
21121    for ac_prog in ldd
21122do
21123  # Extract the first word of "$ac_prog", so it can be a program name with args.
21124set dummy $ac_prog; ac_word=$2
21125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21126$as_echo_n "checking for $ac_word... " >&6; }
21127if ${ac_cv_path_LDD+:} false; then :
21128  $as_echo_n "(cached) " >&6
21129else
21130  case $LDD in
21131  [\\/]* | ?:[\\/]*)
21132  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21133  ;;
21134  *)
21135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21136for as_dir in $PATH
21137do
21138  IFS=$as_save_IFS
21139  test -z "$as_dir" && as_dir=.
21140    for ac_exec_ext in '' $ac_executable_extensions; do
21141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21142    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21144    break 2
21145  fi
21146done
21147  done
21148IFS=$as_save_IFS
21149
21150  ;;
21151esac
21152fi
21153LDD=$ac_cv_path_LDD
21154if test -n "$LDD"; then
21155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21156$as_echo "$LDD" >&6; }
21157else
21158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21159$as_echo "no" >&6; }
21160fi
21161
21162
21163  test -n "$LDD" && break
21164done
21165
21166  else
21167    # The variable is set, but is it from the command line or the environment?
21168
21169    # Try to remove the string !LDD! from our list.
21170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21172      # If it failed, the variable was not from the command line. Ignore it,
21173      # but warn the user (except for BASH, which is always set by the calling BASH).
21174      if test "xLDD" != xBASH; then
21175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21176$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21177      fi
21178      # Try to locate tool using the code snippet
21179      for ac_prog in ldd
21180do
21181  # Extract the first word of "$ac_prog", so it can be a program name with args.
21182set dummy $ac_prog; ac_word=$2
21183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21184$as_echo_n "checking for $ac_word... " >&6; }
21185if ${ac_cv_path_LDD+:} false; then :
21186  $as_echo_n "(cached) " >&6
21187else
21188  case $LDD in
21189  [\\/]* | ?:[\\/]*)
21190  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21191  ;;
21192  *)
21193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21194for as_dir in $PATH
21195do
21196  IFS=$as_save_IFS
21197  test -z "$as_dir" && as_dir=.
21198    for ac_exec_ext in '' $ac_executable_extensions; do
21199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21200    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21202    break 2
21203  fi
21204done
21205  done
21206IFS=$as_save_IFS
21207
21208  ;;
21209esac
21210fi
21211LDD=$ac_cv_path_LDD
21212if test -n "$LDD"; then
21213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21214$as_echo "$LDD" >&6; }
21215else
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21217$as_echo "no" >&6; }
21218fi
21219
21220
21221  test -n "$LDD" && break
21222done
21223
21224    else
21225      # If it succeeded, then it was overridden by the user. We will use it
21226      # for the tool.
21227
21228      # First remove it from the list of overridden variables, so we can test
21229      # for unknown variables in the end.
21230      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21231
21232      # Check if we try to supply an empty value
21233      if test "x$LDD" = x; then
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21235$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21237$as_echo_n "checking for LDD... " >&6; }
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21239$as_echo "disabled" >&6; }
21240      else
21241        # Check if the provided tool contains a complete path.
21242        tool_specified="$LDD"
21243        tool_basename="${tool_specified##*/}"
21244        if test "x$tool_basename" = "x$tool_specified"; then
21245          # A command without a complete path is provided, search $PATH.
21246          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21247$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21248          # Extract the first word of "$tool_basename", so it can be a program name with args.
21249set dummy $tool_basename; ac_word=$2
21250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21251$as_echo_n "checking for $ac_word... " >&6; }
21252if ${ac_cv_path_LDD+:} false; then :
21253  $as_echo_n "(cached) " >&6
21254else
21255  case $LDD in
21256  [\\/]* | ?:[\\/]*)
21257  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21258  ;;
21259  *)
21260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21261for as_dir in $PATH
21262do
21263  IFS=$as_save_IFS
21264  test -z "$as_dir" && as_dir=.
21265    for ac_exec_ext in '' $ac_executable_extensions; do
21266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21267    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21269    break 2
21270  fi
21271done
21272  done
21273IFS=$as_save_IFS
21274
21275  ;;
21276esac
21277fi
21278LDD=$ac_cv_path_LDD
21279if test -n "$LDD"; then
21280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21281$as_echo "$LDD" >&6; }
21282else
21283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21284$as_echo "no" >&6; }
21285fi
21286
21287
21288          if test "x$LDD" = x; then
21289            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21290          fi
21291        else
21292          # Otherwise we believe it is a complete path. Use it as it is.
21293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21294$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21295          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21296$as_echo_n "checking for LDD... " >&6; }
21297          if test ! -x "$tool_specified"; then
21298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21299$as_echo "not found" >&6; }
21300            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21301          fi
21302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21303$as_echo "$tool_specified" >&6; }
21304        fi
21305      fi
21306    fi
21307
21308  fi
21309
21310
21311  if test "x$LDD" = "x"; then
21312    # List shared lib dependencies is used for
21313    # debug output and checking for forbidden dependencies.
21314    # We can build without it.
21315    LDD="true"
21316  fi
21317
21318
21319  # Publish this variable in the help.
21320
21321
21322  if [ -z "${OTOOL+x}" ]; then
21323    # The variable is not set by user, try to locate tool using the code snippet
21324    for ac_prog in otool
21325do
21326  # Extract the first word of "$ac_prog", so it can be a program name with args.
21327set dummy $ac_prog; ac_word=$2
21328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21329$as_echo_n "checking for $ac_word... " >&6; }
21330if ${ac_cv_path_OTOOL+:} false; then :
21331  $as_echo_n "(cached) " >&6
21332else
21333  case $OTOOL in
21334  [\\/]* | ?:[\\/]*)
21335  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21336  ;;
21337  *)
21338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21339for as_dir in $PATH
21340do
21341  IFS=$as_save_IFS
21342  test -z "$as_dir" && as_dir=.
21343    for ac_exec_ext in '' $ac_executable_extensions; do
21344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21345    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21347    break 2
21348  fi
21349done
21350  done
21351IFS=$as_save_IFS
21352
21353  ;;
21354esac
21355fi
21356OTOOL=$ac_cv_path_OTOOL
21357if test -n "$OTOOL"; then
21358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21359$as_echo "$OTOOL" >&6; }
21360else
21361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21362$as_echo "no" >&6; }
21363fi
21364
21365
21366  test -n "$OTOOL" && break
21367done
21368
21369  else
21370    # The variable is set, but is it from the command line or the environment?
21371
21372    # Try to remove the string !OTOOL! from our list.
21373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21375      # If it failed, the variable was not from the command line. Ignore it,
21376      # but warn the user (except for BASH, which is always set by the calling BASH).
21377      if test "xOTOOL" != xBASH; then
21378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21379$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21380      fi
21381      # Try to locate tool using the code snippet
21382      for ac_prog in otool
21383do
21384  # Extract the first word of "$ac_prog", so it can be a program name with args.
21385set dummy $ac_prog; ac_word=$2
21386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21387$as_echo_n "checking for $ac_word... " >&6; }
21388if ${ac_cv_path_OTOOL+:} false; then :
21389  $as_echo_n "(cached) " >&6
21390else
21391  case $OTOOL in
21392  [\\/]* | ?:[\\/]*)
21393  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21394  ;;
21395  *)
21396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21397for as_dir in $PATH
21398do
21399  IFS=$as_save_IFS
21400  test -z "$as_dir" && as_dir=.
21401    for ac_exec_ext in '' $ac_executable_extensions; do
21402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21403    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21405    break 2
21406  fi
21407done
21408  done
21409IFS=$as_save_IFS
21410
21411  ;;
21412esac
21413fi
21414OTOOL=$ac_cv_path_OTOOL
21415if test -n "$OTOOL"; then
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21417$as_echo "$OTOOL" >&6; }
21418else
21419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21420$as_echo "no" >&6; }
21421fi
21422
21423
21424  test -n "$OTOOL" && break
21425done
21426
21427    else
21428      # If it succeeded, then it was overridden by the user. We will use it
21429      # for the tool.
21430
21431      # First remove it from the list of overridden variables, so we can test
21432      # for unknown variables in the end.
21433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21434
21435      # Check if we try to supply an empty value
21436      if test "x$OTOOL" = x; then
21437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21438$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21440$as_echo_n "checking for OTOOL... " >&6; }
21441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21442$as_echo "disabled" >&6; }
21443      else
21444        # Check if the provided tool contains a complete path.
21445        tool_specified="$OTOOL"
21446        tool_basename="${tool_specified##*/}"
21447        if test "x$tool_basename" = "x$tool_specified"; then
21448          # A command without a complete path is provided, search $PATH.
21449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21450$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21451          # Extract the first word of "$tool_basename", so it can be a program name with args.
21452set dummy $tool_basename; 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_OTOOL+:} false; then :
21456  $as_echo_n "(cached) " >&6
21457else
21458  case $OTOOL in
21459  [\\/]* | ?:[\\/]*)
21460  ac_cv_path_OTOOL="$OTOOL" # 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_OTOOL="$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
21481OTOOL=$ac_cv_path_OTOOL
21482if test -n "$OTOOL"; then
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21484$as_echo "$OTOOL" >&6; }
21485else
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487$as_echo "no" >&6; }
21488fi
21489
21490
21491          if test "x$OTOOL" = x; then
21492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21493          fi
21494        else
21495          # Otherwise we believe it is a complete path. Use it as it is.
21496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21497$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21499$as_echo_n "checking for OTOOL... " >&6; }
21500          if test ! -x "$tool_specified"; then
21501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21502$as_echo "not found" >&6; }
21503            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21504          fi
21505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21506$as_echo "$tool_specified" >&6; }
21507        fi
21508      fi
21509    fi
21510
21511  fi
21512
21513
21514  if test "x$OTOOL" = "x"; then
21515    OTOOL="true"
21516  fi
21517
21518
21519  # Publish this variable in the help.
21520
21521
21522  if [ -z "${READELF+x}" ]; then
21523    # The variable is not set by user, try to locate tool using the code snippet
21524    for ac_prog in greadelf readelf
21525do
21526  # Extract the first word of "$ac_prog", so it can be a program name with args.
21527set dummy $ac_prog; ac_word=$2
21528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21529$as_echo_n "checking for $ac_word... " >&6; }
21530if ${ac_cv_path_READELF+:} false; then :
21531  $as_echo_n "(cached) " >&6
21532else
21533  case $READELF in
21534  [\\/]* | ?:[\\/]*)
21535  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21536  ;;
21537  *)
21538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21539for as_dir in $PATH
21540do
21541  IFS=$as_save_IFS
21542  test -z "$as_dir" && as_dir=.
21543    for ac_exec_ext in '' $ac_executable_extensions; do
21544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21545    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21547    break 2
21548  fi
21549done
21550  done
21551IFS=$as_save_IFS
21552
21553  ;;
21554esac
21555fi
21556READELF=$ac_cv_path_READELF
21557if test -n "$READELF"; then
21558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21559$as_echo "$READELF" >&6; }
21560else
21561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21562$as_echo "no" >&6; }
21563fi
21564
21565
21566  test -n "$READELF" && break
21567done
21568
21569  else
21570    # The variable is set, but is it from the command line or the environment?
21571
21572    # Try to remove the string !READELF! from our list.
21573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21575      # If it failed, the variable was not from the command line. Ignore it,
21576      # but warn the user (except for BASH, which is always set by the calling BASH).
21577      if test "xREADELF" != xBASH; then
21578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21579$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21580      fi
21581      # Try to locate tool using the code snippet
21582      for ac_prog in greadelf readelf
21583do
21584  # Extract the first word of "$ac_prog", so it can be a program name with args.
21585set dummy $ac_prog; ac_word=$2
21586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21587$as_echo_n "checking for $ac_word... " >&6; }
21588if ${ac_cv_path_READELF+:} false; then :
21589  $as_echo_n "(cached) " >&6
21590else
21591  case $READELF in
21592  [\\/]* | ?:[\\/]*)
21593  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21594  ;;
21595  *)
21596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21597for as_dir in $PATH
21598do
21599  IFS=$as_save_IFS
21600  test -z "$as_dir" && as_dir=.
21601    for ac_exec_ext in '' $ac_executable_extensions; do
21602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21603    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21605    break 2
21606  fi
21607done
21608  done
21609IFS=$as_save_IFS
21610
21611  ;;
21612esac
21613fi
21614READELF=$ac_cv_path_READELF
21615if test -n "$READELF"; then
21616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21617$as_echo "$READELF" >&6; }
21618else
21619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21620$as_echo "no" >&6; }
21621fi
21622
21623
21624  test -n "$READELF" && break
21625done
21626
21627    else
21628      # If it succeeded, then it was overridden by the user. We will use it
21629      # for the tool.
21630
21631      # First remove it from the list of overridden variables, so we can test
21632      # for unknown variables in the end.
21633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21634
21635      # Check if we try to supply an empty value
21636      if test "x$READELF" = x; then
21637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21638$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21640$as_echo_n "checking for READELF... " >&6; }
21641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21642$as_echo "disabled" >&6; }
21643      else
21644        # Check if the provided tool contains a complete path.
21645        tool_specified="$READELF"
21646        tool_basename="${tool_specified##*/}"
21647        if test "x$tool_basename" = "x$tool_specified"; then
21648          # A command without a complete path is provided, search $PATH.
21649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21650$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21651          # Extract the first word of "$tool_basename", so it can be a program name with args.
21652set dummy $tool_basename; ac_word=$2
21653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21654$as_echo_n "checking for $ac_word... " >&6; }
21655if ${ac_cv_path_READELF+:} false; then :
21656  $as_echo_n "(cached) " >&6
21657else
21658  case $READELF in
21659  [\\/]* | ?:[\\/]*)
21660  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21661  ;;
21662  *)
21663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21664for as_dir in $PATH
21665do
21666  IFS=$as_save_IFS
21667  test -z "$as_dir" && as_dir=.
21668    for ac_exec_ext in '' $ac_executable_extensions; do
21669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21670    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21672    break 2
21673  fi
21674done
21675  done
21676IFS=$as_save_IFS
21677
21678  ;;
21679esac
21680fi
21681READELF=$ac_cv_path_READELF
21682if test -n "$READELF"; then
21683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21684$as_echo "$READELF" >&6; }
21685else
21686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21687$as_echo "no" >&6; }
21688fi
21689
21690
21691          if test "x$READELF" = x; then
21692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21693          fi
21694        else
21695          # Otherwise we believe it is a complete path. Use it as it is.
21696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21697$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21699$as_echo_n "checking for READELF... " >&6; }
21700          if test ! -x "$tool_specified"; then
21701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21702$as_echo "not found" >&6; }
21703            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21704          fi
21705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21706$as_echo "$tool_specified" >&6; }
21707        fi
21708      fi
21709    fi
21710
21711  fi
21712
21713
21714
21715
21716  # Publish this variable in the help.
21717
21718
21719  if [ -z "${HG+x}" ]; then
21720    # The variable is not set by user, try to locate tool using the code snippet
21721    for ac_prog in hg
21722do
21723  # Extract the first word of "$ac_prog", so it can be a program name with args.
21724set dummy $ac_prog; ac_word=$2
21725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21726$as_echo_n "checking for $ac_word... " >&6; }
21727if ${ac_cv_path_HG+:} false; then :
21728  $as_echo_n "(cached) " >&6
21729else
21730  case $HG in
21731  [\\/]* | ?:[\\/]*)
21732  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21733  ;;
21734  *)
21735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21736for as_dir in $PATH
21737do
21738  IFS=$as_save_IFS
21739  test -z "$as_dir" && as_dir=.
21740    for ac_exec_ext in '' $ac_executable_extensions; do
21741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21742    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21744    break 2
21745  fi
21746done
21747  done
21748IFS=$as_save_IFS
21749
21750  ;;
21751esac
21752fi
21753HG=$ac_cv_path_HG
21754if test -n "$HG"; then
21755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21756$as_echo "$HG" >&6; }
21757else
21758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21759$as_echo "no" >&6; }
21760fi
21761
21762
21763  test -n "$HG" && break
21764done
21765
21766  else
21767    # The variable is set, but is it from the command line or the environment?
21768
21769    # Try to remove the string !HG! from our list.
21770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21772      # If it failed, the variable was not from the command line. Ignore it,
21773      # but warn the user (except for BASH, which is always set by the calling BASH).
21774      if test "xHG" != xBASH; then
21775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21776$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21777      fi
21778      # Try to locate tool using the code snippet
21779      for ac_prog in hg
21780do
21781  # Extract the first word of "$ac_prog", so it can be a program name with args.
21782set dummy $ac_prog; ac_word=$2
21783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21784$as_echo_n "checking for $ac_word... " >&6; }
21785if ${ac_cv_path_HG+:} false; then :
21786  $as_echo_n "(cached) " >&6
21787else
21788  case $HG in
21789  [\\/]* | ?:[\\/]*)
21790  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21791  ;;
21792  *)
21793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21794for as_dir in $PATH
21795do
21796  IFS=$as_save_IFS
21797  test -z "$as_dir" && as_dir=.
21798    for ac_exec_ext in '' $ac_executable_extensions; do
21799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21800    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21802    break 2
21803  fi
21804done
21805  done
21806IFS=$as_save_IFS
21807
21808  ;;
21809esac
21810fi
21811HG=$ac_cv_path_HG
21812if test -n "$HG"; then
21813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21814$as_echo "$HG" >&6; }
21815else
21816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21817$as_echo "no" >&6; }
21818fi
21819
21820
21821  test -n "$HG" && break
21822done
21823
21824    else
21825      # If it succeeded, then it was overridden by the user. We will use it
21826      # for the tool.
21827
21828      # First remove it from the list of overridden variables, so we can test
21829      # for unknown variables in the end.
21830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21831
21832      # Check if we try to supply an empty value
21833      if test "x$HG" = x; then
21834        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21835$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21837$as_echo_n "checking for HG... " >&6; }
21838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21839$as_echo "disabled" >&6; }
21840      else
21841        # Check if the provided tool contains a complete path.
21842        tool_specified="$HG"
21843        tool_basename="${tool_specified##*/}"
21844        if test "x$tool_basename" = "x$tool_specified"; then
21845          # A command without a complete path is provided, search $PATH.
21846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21847$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21848          # Extract the first word of "$tool_basename", so it can be a program name with args.
21849set dummy $tool_basename; ac_word=$2
21850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21851$as_echo_n "checking for $ac_word... " >&6; }
21852if ${ac_cv_path_HG+:} false; then :
21853  $as_echo_n "(cached) " >&6
21854else
21855  case $HG in
21856  [\\/]* | ?:[\\/]*)
21857  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21858  ;;
21859  *)
21860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21861for as_dir in $PATH
21862do
21863  IFS=$as_save_IFS
21864  test -z "$as_dir" && as_dir=.
21865    for ac_exec_ext in '' $ac_executable_extensions; do
21866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21867    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21869    break 2
21870  fi
21871done
21872  done
21873IFS=$as_save_IFS
21874
21875  ;;
21876esac
21877fi
21878HG=$ac_cv_path_HG
21879if test -n "$HG"; then
21880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21881$as_echo "$HG" >&6; }
21882else
21883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21884$as_echo "no" >&6; }
21885fi
21886
21887
21888          if test "x$HG" = x; then
21889            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21890          fi
21891        else
21892          # Otherwise we believe it is a complete path. Use it as it is.
21893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21894$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21895          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21896$as_echo_n "checking for HG... " >&6; }
21897          if test ! -x "$tool_specified"; then
21898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21899$as_echo "not found" >&6; }
21900            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21901          fi
21902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21903$as_echo "$tool_specified" >&6; }
21904        fi
21905      fi
21906    fi
21907
21908  fi
21909
21910
21911
21912
21913  # Publish this variable in the help.
21914
21915
21916  if [ -z "${STAT+x}" ]; then
21917    # The variable is not set by user, try to locate tool using the code snippet
21918    for ac_prog in stat
21919do
21920  # Extract the first word of "$ac_prog", so it can be a program name with args.
21921set dummy $ac_prog; ac_word=$2
21922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21923$as_echo_n "checking for $ac_word... " >&6; }
21924if ${ac_cv_path_STAT+:} false; then :
21925  $as_echo_n "(cached) " >&6
21926else
21927  case $STAT in
21928  [\\/]* | ?:[\\/]*)
21929  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21930  ;;
21931  *)
21932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21933for as_dir in $PATH
21934do
21935  IFS=$as_save_IFS
21936  test -z "$as_dir" && as_dir=.
21937    for ac_exec_ext in '' $ac_executable_extensions; do
21938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21939    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21941    break 2
21942  fi
21943done
21944  done
21945IFS=$as_save_IFS
21946
21947  ;;
21948esac
21949fi
21950STAT=$ac_cv_path_STAT
21951if test -n "$STAT"; then
21952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21953$as_echo "$STAT" >&6; }
21954else
21955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21956$as_echo "no" >&6; }
21957fi
21958
21959
21960  test -n "$STAT" && break
21961done
21962
21963  else
21964    # The variable is set, but is it from the command line or the environment?
21965
21966    # Try to remove the string !STAT! from our list.
21967    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21968    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21969      # If it failed, the variable was not from the command line. Ignore it,
21970      # but warn the user (except for BASH, which is always set by the calling BASH).
21971      if test "xSTAT" != xBASH; then
21972        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21973$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21974      fi
21975      # Try to locate tool using the code snippet
21976      for ac_prog in stat
21977do
21978  # Extract the first word of "$ac_prog", so it can be a program name with args.
21979set dummy $ac_prog; ac_word=$2
21980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21981$as_echo_n "checking for $ac_word... " >&6; }
21982if ${ac_cv_path_STAT+:} false; then :
21983  $as_echo_n "(cached) " >&6
21984else
21985  case $STAT in
21986  [\\/]* | ?:[\\/]*)
21987  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21988  ;;
21989  *)
21990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21991for as_dir in $PATH
21992do
21993  IFS=$as_save_IFS
21994  test -z "$as_dir" && as_dir=.
21995    for ac_exec_ext in '' $ac_executable_extensions; do
21996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21997    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21999    break 2
22000  fi
22001done
22002  done
22003IFS=$as_save_IFS
22004
22005  ;;
22006esac
22007fi
22008STAT=$ac_cv_path_STAT
22009if test -n "$STAT"; then
22010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22011$as_echo "$STAT" >&6; }
22012else
22013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22014$as_echo "no" >&6; }
22015fi
22016
22017
22018  test -n "$STAT" && break
22019done
22020
22021    else
22022      # If it succeeded, then it was overridden by the user. We will use it
22023      # for the tool.
22024
22025      # First remove it from the list of overridden variables, so we can test
22026      # for unknown variables in the end.
22027      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22028
22029      # Check if we try to supply an empty value
22030      if test "x$STAT" = x; then
22031        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22032$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22034$as_echo_n "checking for STAT... " >&6; }
22035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22036$as_echo "disabled" >&6; }
22037      else
22038        # Check if the provided tool contains a complete path.
22039        tool_specified="$STAT"
22040        tool_basename="${tool_specified##*/}"
22041        if test "x$tool_basename" = "x$tool_specified"; then
22042          # A command without a complete path is provided, search $PATH.
22043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22044$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22045          # Extract the first word of "$tool_basename", so it can be a program name with args.
22046set dummy $tool_basename; ac_word=$2
22047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22048$as_echo_n "checking for $ac_word... " >&6; }
22049if ${ac_cv_path_STAT+:} false; then :
22050  $as_echo_n "(cached) " >&6
22051else
22052  case $STAT in
22053  [\\/]* | ?:[\\/]*)
22054  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22055  ;;
22056  *)
22057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22058for as_dir in $PATH
22059do
22060  IFS=$as_save_IFS
22061  test -z "$as_dir" && as_dir=.
22062    for ac_exec_ext in '' $ac_executable_extensions; do
22063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22064    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22066    break 2
22067  fi
22068done
22069  done
22070IFS=$as_save_IFS
22071
22072  ;;
22073esac
22074fi
22075STAT=$ac_cv_path_STAT
22076if test -n "$STAT"; then
22077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22078$as_echo "$STAT" >&6; }
22079else
22080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22081$as_echo "no" >&6; }
22082fi
22083
22084
22085          if test "x$STAT" = x; then
22086            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22087          fi
22088        else
22089          # Otherwise we believe it is a complete path. Use it as it is.
22090          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22091$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22092          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22093$as_echo_n "checking for STAT... " >&6; }
22094          if test ! -x "$tool_specified"; then
22095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22096$as_echo "not found" >&6; }
22097            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22098          fi
22099          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22100$as_echo "$tool_specified" >&6; }
22101        fi
22102      fi
22103    fi
22104
22105  fi
22106
22107
22108
22109
22110  # Publish this variable in the help.
22111
22112
22113  if [ -z "${TIME+x}" ]; then
22114    # The variable is not set by user, try to locate tool using the code snippet
22115    for ac_prog in time
22116do
22117  # Extract the first word of "$ac_prog", so it can be a program name with args.
22118set dummy $ac_prog; ac_word=$2
22119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22120$as_echo_n "checking for $ac_word... " >&6; }
22121if ${ac_cv_path_TIME+:} false; then :
22122  $as_echo_n "(cached) " >&6
22123else
22124  case $TIME in
22125  [\\/]* | ?:[\\/]*)
22126  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22127  ;;
22128  *)
22129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22130for as_dir in $PATH
22131do
22132  IFS=$as_save_IFS
22133  test -z "$as_dir" && as_dir=.
22134    for ac_exec_ext in '' $ac_executable_extensions; do
22135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22136    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22138    break 2
22139  fi
22140done
22141  done
22142IFS=$as_save_IFS
22143
22144  ;;
22145esac
22146fi
22147TIME=$ac_cv_path_TIME
22148if test -n "$TIME"; then
22149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22150$as_echo "$TIME" >&6; }
22151else
22152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22153$as_echo "no" >&6; }
22154fi
22155
22156
22157  test -n "$TIME" && break
22158done
22159
22160  else
22161    # The variable is set, but is it from the command line or the environment?
22162
22163    # Try to remove the string !TIME! from our list.
22164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22166      # If it failed, the variable was not from the command line. Ignore it,
22167      # but warn the user (except for BASH, which is always set by the calling BASH).
22168      if test "xTIME" != xBASH; then
22169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22170$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22171      fi
22172      # Try to locate tool using the code snippet
22173      for ac_prog in time
22174do
22175  # Extract the first word of "$ac_prog", so it can be a program name with args.
22176set dummy $ac_prog; ac_word=$2
22177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22178$as_echo_n "checking for $ac_word... " >&6; }
22179if ${ac_cv_path_TIME+:} false; then :
22180  $as_echo_n "(cached) " >&6
22181else
22182  case $TIME in
22183  [\\/]* | ?:[\\/]*)
22184  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22185  ;;
22186  *)
22187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22188for as_dir in $PATH
22189do
22190  IFS=$as_save_IFS
22191  test -z "$as_dir" && as_dir=.
22192    for ac_exec_ext in '' $ac_executable_extensions; do
22193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22194    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22196    break 2
22197  fi
22198done
22199  done
22200IFS=$as_save_IFS
22201
22202  ;;
22203esac
22204fi
22205TIME=$ac_cv_path_TIME
22206if test -n "$TIME"; then
22207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22208$as_echo "$TIME" >&6; }
22209else
22210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22211$as_echo "no" >&6; }
22212fi
22213
22214
22215  test -n "$TIME" && break
22216done
22217
22218    else
22219      # If it succeeded, then it was overridden by the user. We will use it
22220      # for the tool.
22221
22222      # First remove it from the list of overridden variables, so we can test
22223      # for unknown variables in the end.
22224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22225
22226      # Check if we try to supply an empty value
22227      if test "x$TIME" = x; then
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22229$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22231$as_echo_n "checking for TIME... " >&6; }
22232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22233$as_echo "disabled" >&6; }
22234      else
22235        # Check if the provided tool contains a complete path.
22236        tool_specified="$TIME"
22237        tool_basename="${tool_specified##*/}"
22238        if test "x$tool_basename" = "x$tool_specified"; then
22239          # A command without a complete path is provided, search $PATH.
22240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22241$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22242          # Extract the first word of "$tool_basename", so it can be a program name with args.
22243set dummy $tool_basename; ac_word=$2
22244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22245$as_echo_n "checking for $ac_word... " >&6; }
22246if ${ac_cv_path_TIME+:} false; then :
22247  $as_echo_n "(cached) " >&6
22248else
22249  case $TIME in
22250  [\\/]* | ?:[\\/]*)
22251  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22252  ;;
22253  *)
22254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22255for as_dir in $PATH
22256do
22257  IFS=$as_save_IFS
22258  test -z "$as_dir" && as_dir=.
22259    for ac_exec_ext in '' $ac_executable_extensions; do
22260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22261    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22263    break 2
22264  fi
22265done
22266  done
22267IFS=$as_save_IFS
22268
22269  ;;
22270esac
22271fi
22272TIME=$ac_cv_path_TIME
22273if test -n "$TIME"; then
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22275$as_echo "$TIME" >&6; }
22276else
22277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22278$as_echo "no" >&6; }
22279fi
22280
22281
22282          if test "x$TIME" = x; then
22283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22284          fi
22285        else
22286          # Otherwise we believe it is a complete path. Use it as it is.
22287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22288$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22290$as_echo_n "checking for TIME... " >&6; }
22291          if test ! -x "$tool_specified"; then
22292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22293$as_echo "not found" >&6; }
22294            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22295          fi
22296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22297$as_echo "$tool_specified" >&6; }
22298        fi
22299      fi
22300    fi
22301
22302  fi
22303
22304
22305
22306
22307  # Publish this variable in the help.
22308
22309
22310  if [ -z "${DTRACE+x}" ]; then
22311    # The variable is not set by user, try to locate tool using the code snippet
22312    for ac_prog in dtrace
22313do
22314  # Extract the first word of "$ac_prog", so it can be a program name with args.
22315set dummy $ac_prog; ac_word=$2
22316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22317$as_echo_n "checking for $ac_word... " >&6; }
22318if ${ac_cv_path_DTRACE+:} false; then :
22319  $as_echo_n "(cached) " >&6
22320else
22321  case $DTRACE in
22322  [\\/]* | ?:[\\/]*)
22323  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22324  ;;
22325  *)
22326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22327for as_dir in $PATH
22328do
22329  IFS=$as_save_IFS
22330  test -z "$as_dir" && as_dir=.
22331    for ac_exec_ext in '' $ac_executable_extensions; do
22332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22333    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22335    break 2
22336  fi
22337done
22338  done
22339IFS=$as_save_IFS
22340
22341  ;;
22342esac
22343fi
22344DTRACE=$ac_cv_path_DTRACE
22345if test -n "$DTRACE"; then
22346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22347$as_echo "$DTRACE" >&6; }
22348else
22349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22350$as_echo "no" >&6; }
22351fi
22352
22353
22354  test -n "$DTRACE" && break
22355done
22356
22357  else
22358    # The variable is set, but is it from the command line or the environment?
22359
22360    # Try to remove the string !DTRACE! from our list.
22361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22363      # If it failed, the variable was not from the command line. Ignore it,
22364      # but warn the user (except for BASH, which is always set by the calling BASH).
22365      if test "xDTRACE" != xBASH; then
22366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22367$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22368      fi
22369      # Try to locate tool using the code snippet
22370      for ac_prog in dtrace
22371do
22372  # Extract the first word of "$ac_prog", so it can be a program name with args.
22373set dummy $ac_prog; ac_word=$2
22374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22375$as_echo_n "checking for $ac_word... " >&6; }
22376if ${ac_cv_path_DTRACE+:} false; then :
22377  $as_echo_n "(cached) " >&6
22378else
22379  case $DTRACE in
22380  [\\/]* | ?:[\\/]*)
22381  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22382  ;;
22383  *)
22384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22385for as_dir in $PATH
22386do
22387  IFS=$as_save_IFS
22388  test -z "$as_dir" && as_dir=.
22389    for ac_exec_ext in '' $ac_executable_extensions; do
22390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22391    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22393    break 2
22394  fi
22395done
22396  done
22397IFS=$as_save_IFS
22398
22399  ;;
22400esac
22401fi
22402DTRACE=$ac_cv_path_DTRACE
22403if test -n "$DTRACE"; then
22404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22405$as_echo "$DTRACE" >&6; }
22406else
22407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22408$as_echo "no" >&6; }
22409fi
22410
22411
22412  test -n "$DTRACE" && break
22413done
22414
22415    else
22416      # If it succeeded, then it was overridden by the user. We will use it
22417      # for the tool.
22418
22419      # First remove it from the list of overridden variables, so we can test
22420      # for unknown variables in the end.
22421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22422
22423      # Check if we try to supply an empty value
22424      if test "x$DTRACE" = x; then
22425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22426$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22428$as_echo_n "checking for DTRACE... " >&6; }
22429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22430$as_echo "disabled" >&6; }
22431      else
22432        # Check if the provided tool contains a complete path.
22433        tool_specified="$DTRACE"
22434        tool_basename="${tool_specified##*/}"
22435        if test "x$tool_basename" = "x$tool_specified"; then
22436          # A command without a complete path is provided, search $PATH.
22437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22438$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22439          # Extract the first word of "$tool_basename", so it can be a program name with args.
22440set dummy $tool_basename; ac_word=$2
22441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22442$as_echo_n "checking for $ac_word... " >&6; }
22443if ${ac_cv_path_DTRACE+:} false; then :
22444  $as_echo_n "(cached) " >&6
22445else
22446  case $DTRACE in
22447  [\\/]* | ?:[\\/]*)
22448  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22449  ;;
22450  *)
22451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22452for as_dir in $PATH
22453do
22454  IFS=$as_save_IFS
22455  test -z "$as_dir" && as_dir=.
22456    for ac_exec_ext in '' $ac_executable_extensions; do
22457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22458    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22460    break 2
22461  fi
22462done
22463  done
22464IFS=$as_save_IFS
22465
22466  ;;
22467esac
22468fi
22469DTRACE=$ac_cv_path_DTRACE
22470if test -n "$DTRACE"; then
22471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22472$as_echo "$DTRACE" >&6; }
22473else
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22475$as_echo "no" >&6; }
22476fi
22477
22478
22479          if test "x$DTRACE" = x; then
22480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22481          fi
22482        else
22483          # Otherwise we believe it is a complete path. Use it as it is.
22484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22485$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22487$as_echo_n "checking for DTRACE... " >&6; }
22488          if test ! -x "$tool_specified"; then
22489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22490$as_echo "not found" >&6; }
22491            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22492          fi
22493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22494$as_echo "$tool_specified" >&6; }
22495        fi
22496      fi
22497    fi
22498
22499  fi
22500
22501
22502
22503
22504  # Publish this variable in the help.
22505
22506
22507  if [ -z "${PATCH+x}" ]; then
22508    # The variable is not set by user, try to locate tool using the code snippet
22509    for ac_prog in gpatch patch
22510do
22511  # Extract the first word of "$ac_prog", so it can be a program name with args.
22512set dummy $ac_prog; ac_word=$2
22513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22514$as_echo_n "checking for $ac_word... " >&6; }
22515if ${ac_cv_path_PATCH+:} false; then :
22516  $as_echo_n "(cached) " >&6
22517else
22518  case $PATCH in
22519  [\\/]* | ?:[\\/]*)
22520  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22521  ;;
22522  *)
22523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22524for as_dir in $PATH
22525do
22526  IFS=$as_save_IFS
22527  test -z "$as_dir" && as_dir=.
22528    for ac_exec_ext in '' $ac_executable_extensions; do
22529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22530    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22532    break 2
22533  fi
22534done
22535  done
22536IFS=$as_save_IFS
22537
22538  ;;
22539esac
22540fi
22541PATCH=$ac_cv_path_PATCH
22542if test -n "$PATCH"; then
22543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22544$as_echo "$PATCH" >&6; }
22545else
22546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22547$as_echo "no" >&6; }
22548fi
22549
22550
22551  test -n "$PATCH" && break
22552done
22553
22554  else
22555    # The variable is set, but is it from the command line or the environment?
22556
22557    # Try to remove the string !PATCH! from our list.
22558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22560      # If it failed, the variable was not from the command line. Ignore it,
22561      # but warn the user (except for BASH, which is always set by the calling BASH).
22562      if test "xPATCH" != xBASH; then
22563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22564$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22565      fi
22566      # Try to locate tool using the code snippet
22567      for ac_prog in gpatch patch
22568do
22569  # Extract the first word of "$ac_prog", so it can be a program name with args.
22570set dummy $ac_prog; ac_word=$2
22571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22572$as_echo_n "checking for $ac_word... " >&6; }
22573if ${ac_cv_path_PATCH+:} false; then :
22574  $as_echo_n "(cached) " >&6
22575else
22576  case $PATCH in
22577  [\\/]* | ?:[\\/]*)
22578  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22579  ;;
22580  *)
22581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22582for as_dir in $PATH
22583do
22584  IFS=$as_save_IFS
22585  test -z "$as_dir" && as_dir=.
22586    for ac_exec_ext in '' $ac_executable_extensions; do
22587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22588    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22590    break 2
22591  fi
22592done
22593  done
22594IFS=$as_save_IFS
22595
22596  ;;
22597esac
22598fi
22599PATCH=$ac_cv_path_PATCH
22600if test -n "$PATCH"; then
22601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22602$as_echo "$PATCH" >&6; }
22603else
22604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22605$as_echo "no" >&6; }
22606fi
22607
22608
22609  test -n "$PATCH" && break
22610done
22611
22612    else
22613      # If it succeeded, then it was overridden by the user. We will use it
22614      # for the tool.
22615
22616      # First remove it from the list of overridden variables, so we can test
22617      # for unknown variables in the end.
22618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22619
22620      # Check if we try to supply an empty value
22621      if test "x$PATCH" = x; then
22622        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22623$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22625$as_echo_n "checking for PATCH... " >&6; }
22626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22627$as_echo "disabled" >&6; }
22628      else
22629        # Check if the provided tool contains a complete path.
22630        tool_specified="$PATCH"
22631        tool_basename="${tool_specified##*/}"
22632        if test "x$tool_basename" = "x$tool_specified"; then
22633          # A command without a complete path is provided, search $PATH.
22634          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22635$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22636          # Extract the first word of "$tool_basename", so it can be a program name with args.
22637set dummy $tool_basename; ac_word=$2
22638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22639$as_echo_n "checking for $ac_word... " >&6; }
22640if ${ac_cv_path_PATCH+:} false; then :
22641  $as_echo_n "(cached) " >&6
22642else
22643  case $PATCH in
22644  [\\/]* | ?:[\\/]*)
22645  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22646  ;;
22647  *)
22648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22649for as_dir in $PATH
22650do
22651  IFS=$as_save_IFS
22652  test -z "$as_dir" && as_dir=.
22653    for ac_exec_ext in '' $ac_executable_extensions; do
22654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22655    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22657    break 2
22658  fi
22659done
22660  done
22661IFS=$as_save_IFS
22662
22663  ;;
22664esac
22665fi
22666PATCH=$ac_cv_path_PATCH
22667if test -n "$PATCH"; then
22668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22669$as_echo "$PATCH" >&6; }
22670else
22671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22672$as_echo "no" >&6; }
22673fi
22674
22675
22676          if test "x$PATCH" = x; then
22677            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22678          fi
22679        else
22680          # Otherwise we believe it is a complete path. Use it as it is.
22681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22682$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22683          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22684$as_echo_n "checking for PATCH... " >&6; }
22685          if test ! -x "$tool_specified"; then
22686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22687$as_echo "not found" >&6; }
22688            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22689          fi
22690          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22691$as_echo "$tool_specified" >&6; }
22692        fi
22693      fi
22694    fi
22695
22696  fi
22697
22698
22699  # Check if it's GNU time
22700  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22701  if test "x$IS_GNU_TIME" != x; then
22702    IS_GNU_TIME=yes
22703  else
22704    IS_GNU_TIME=no
22705  fi
22706
22707
22708  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22709
22710
22711
22712  # Publish this variable in the help.
22713
22714
22715  if [ -z "${DSYMUTIL+x}" ]; then
22716    # The variable is not set by user, try to locate tool using the code snippet
22717    for ac_prog in dsymutil
22718do
22719  # Extract the first word of "$ac_prog", so it can be a program name with args.
22720set dummy $ac_prog; ac_word=$2
22721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22722$as_echo_n "checking for $ac_word... " >&6; }
22723if ${ac_cv_path_DSYMUTIL+:} false; then :
22724  $as_echo_n "(cached) " >&6
22725else
22726  case $DSYMUTIL in
22727  [\\/]* | ?:[\\/]*)
22728  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22729  ;;
22730  *)
22731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22732for as_dir in $PATH
22733do
22734  IFS=$as_save_IFS
22735  test -z "$as_dir" && as_dir=.
22736    for ac_exec_ext in '' $ac_executable_extensions; do
22737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22738    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22740    break 2
22741  fi
22742done
22743  done
22744IFS=$as_save_IFS
22745
22746  ;;
22747esac
22748fi
22749DSYMUTIL=$ac_cv_path_DSYMUTIL
22750if test -n "$DSYMUTIL"; then
22751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22752$as_echo "$DSYMUTIL" >&6; }
22753else
22754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22755$as_echo "no" >&6; }
22756fi
22757
22758
22759  test -n "$DSYMUTIL" && break
22760done
22761
22762  else
22763    # The variable is set, but is it from the command line or the environment?
22764
22765    # Try to remove the string !DSYMUTIL! from our list.
22766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22768      # If it failed, the variable was not from the command line. Ignore it,
22769      # but warn the user (except for BASH, which is always set by the calling BASH).
22770      if test "xDSYMUTIL" != xBASH; then
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22772$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22773      fi
22774      # Try to locate tool using the code snippet
22775      for ac_prog in dsymutil
22776do
22777  # Extract the first word of "$ac_prog", so it can be a program name with args.
22778set dummy $ac_prog; ac_word=$2
22779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22780$as_echo_n "checking for $ac_word... " >&6; }
22781if ${ac_cv_path_DSYMUTIL+:} false; then :
22782  $as_echo_n "(cached) " >&6
22783else
22784  case $DSYMUTIL in
22785  [\\/]* | ?:[\\/]*)
22786  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22787  ;;
22788  *)
22789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22790for as_dir in $PATH
22791do
22792  IFS=$as_save_IFS
22793  test -z "$as_dir" && as_dir=.
22794    for ac_exec_ext in '' $ac_executable_extensions; do
22795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22796    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22798    break 2
22799  fi
22800done
22801  done
22802IFS=$as_save_IFS
22803
22804  ;;
22805esac
22806fi
22807DSYMUTIL=$ac_cv_path_DSYMUTIL
22808if test -n "$DSYMUTIL"; then
22809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22810$as_echo "$DSYMUTIL" >&6; }
22811else
22812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22813$as_echo "no" >&6; }
22814fi
22815
22816
22817  test -n "$DSYMUTIL" && break
22818done
22819
22820    else
22821      # If it succeeded, then it was overridden by the user. We will use it
22822      # for the tool.
22823
22824      # First remove it from the list of overridden variables, so we can test
22825      # for unknown variables in the end.
22826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22827
22828      # Check if we try to supply an empty value
22829      if test "x$DSYMUTIL" = x; then
22830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22831$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22833$as_echo_n "checking for DSYMUTIL... " >&6; }
22834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22835$as_echo "disabled" >&6; }
22836      else
22837        # Check if the provided tool contains a complete path.
22838        tool_specified="$DSYMUTIL"
22839        tool_basename="${tool_specified##*/}"
22840        if test "x$tool_basename" = "x$tool_specified"; then
22841          # A command without a complete path is provided, search $PATH.
22842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22843$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22844          # Extract the first word of "$tool_basename", so it can be a program name with args.
22845set dummy $tool_basename; ac_word=$2
22846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22847$as_echo_n "checking for $ac_word... " >&6; }
22848if ${ac_cv_path_DSYMUTIL+:} false; then :
22849  $as_echo_n "(cached) " >&6
22850else
22851  case $DSYMUTIL in
22852  [\\/]* | ?:[\\/]*)
22853  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22854  ;;
22855  *)
22856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22857for as_dir in $PATH
22858do
22859  IFS=$as_save_IFS
22860  test -z "$as_dir" && as_dir=.
22861    for ac_exec_ext in '' $ac_executable_extensions; do
22862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22863    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22865    break 2
22866  fi
22867done
22868  done
22869IFS=$as_save_IFS
22870
22871  ;;
22872esac
22873fi
22874DSYMUTIL=$ac_cv_path_DSYMUTIL
22875if test -n "$DSYMUTIL"; then
22876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22877$as_echo "$DSYMUTIL" >&6; }
22878else
22879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22880$as_echo "no" >&6; }
22881fi
22882
22883
22884          if test "x$DSYMUTIL" = x; then
22885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22886          fi
22887        else
22888          # Otherwise we believe it is a complete path. Use it as it is.
22889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22890$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22892$as_echo_n "checking for DSYMUTIL... " >&6; }
22893          if test ! -x "$tool_specified"; then
22894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22895$as_echo "not found" >&6; }
22896            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22897          fi
22898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22899$as_echo "$tool_specified" >&6; }
22900        fi
22901      fi
22902    fi
22903
22904  fi
22905
22906
22907
22908  if test "x$DSYMUTIL" = x; then
22909    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22910  fi
22911
22912
22913
22914
22915
22916  # Publish this variable in the help.
22917
22918
22919  if [ -z "${XATTR+x}" ]; then
22920    # The variable is not set by user, try to locate tool using the code snippet
22921    for ac_prog in xattr
22922do
22923  # Extract the first word of "$ac_prog", so it can be a program name with args.
22924set dummy $ac_prog; ac_word=$2
22925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22926$as_echo_n "checking for $ac_word... " >&6; }
22927if ${ac_cv_path_XATTR+:} false; then :
22928  $as_echo_n "(cached) " >&6
22929else
22930  case $XATTR in
22931  [\\/]* | ?:[\\/]*)
22932  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22933  ;;
22934  *)
22935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22936for as_dir in $PATH
22937do
22938  IFS=$as_save_IFS
22939  test -z "$as_dir" && as_dir=.
22940    for ac_exec_ext in '' $ac_executable_extensions; do
22941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22942    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22944    break 2
22945  fi
22946done
22947  done
22948IFS=$as_save_IFS
22949
22950  ;;
22951esac
22952fi
22953XATTR=$ac_cv_path_XATTR
22954if test -n "$XATTR"; then
22955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22956$as_echo "$XATTR" >&6; }
22957else
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22959$as_echo "no" >&6; }
22960fi
22961
22962
22963  test -n "$XATTR" && break
22964done
22965
22966  else
22967    # The variable is set, but is it from the command line or the environment?
22968
22969    # Try to remove the string !XATTR! from our list.
22970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22972      # If it failed, the variable was not from the command line. Ignore it,
22973      # but warn the user (except for BASH, which is always set by the calling BASH).
22974      if test "xXATTR" != xBASH; then
22975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22976$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22977      fi
22978      # Try to locate tool using the code snippet
22979      for ac_prog in xattr
22980do
22981  # Extract the first word of "$ac_prog", so it can be a program name with args.
22982set dummy $ac_prog; ac_word=$2
22983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22984$as_echo_n "checking for $ac_word... " >&6; }
22985if ${ac_cv_path_XATTR+:} false; then :
22986  $as_echo_n "(cached) " >&6
22987else
22988  case $XATTR in
22989  [\\/]* | ?:[\\/]*)
22990  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22991  ;;
22992  *)
22993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22994for as_dir in $PATH
22995do
22996  IFS=$as_save_IFS
22997  test -z "$as_dir" && as_dir=.
22998    for ac_exec_ext in '' $ac_executable_extensions; do
22999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23000    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23002    break 2
23003  fi
23004done
23005  done
23006IFS=$as_save_IFS
23007
23008  ;;
23009esac
23010fi
23011XATTR=$ac_cv_path_XATTR
23012if test -n "$XATTR"; then
23013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23014$as_echo "$XATTR" >&6; }
23015else
23016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23017$as_echo "no" >&6; }
23018fi
23019
23020
23021  test -n "$XATTR" && break
23022done
23023
23024    else
23025      # If it succeeded, then it was overridden by the user. We will use it
23026      # for the tool.
23027
23028      # First remove it from the list of overridden variables, so we can test
23029      # for unknown variables in the end.
23030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23031
23032      # Check if we try to supply an empty value
23033      if test "x$XATTR" = x; then
23034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23035$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23037$as_echo_n "checking for XATTR... " >&6; }
23038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23039$as_echo "disabled" >&6; }
23040      else
23041        # Check if the provided tool contains a complete path.
23042        tool_specified="$XATTR"
23043        tool_basename="${tool_specified##*/}"
23044        if test "x$tool_basename" = "x$tool_specified"; then
23045          # A command without a complete path is provided, search $PATH.
23046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23047$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23048          # Extract the first word of "$tool_basename", so it can be a program name with args.
23049set dummy $tool_basename; ac_word=$2
23050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23051$as_echo_n "checking for $ac_word... " >&6; }
23052if ${ac_cv_path_XATTR+:} false; then :
23053  $as_echo_n "(cached) " >&6
23054else
23055  case $XATTR in
23056  [\\/]* | ?:[\\/]*)
23057  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23058  ;;
23059  *)
23060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23061for as_dir in $PATH
23062do
23063  IFS=$as_save_IFS
23064  test -z "$as_dir" && as_dir=.
23065    for ac_exec_ext in '' $ac_executable_extensions; do
23066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23067    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23069    break 2
23070  fi
23071done
23072  done
23073IFS=$as_save_IFS
23074
23075  ;;
23076esac
23077fi
23078XATTR=$ac_cv_path_XATTR
23079if test -n "$XATTR"; then
23080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23081$as_echo "$XATTR" >&6; }
23082else
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23084$as_echo "no" >&6; }
23085fi
23086
23087
23088          if test "x$XATTR" = x; then
23089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23090          fi
23091        else
23092          # Otherwise we believe it is a complete path. Use it as it is.
23093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23094$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23096$as_echo_n "checking for XATTR... " >&6; }
23097          if test ! -x "$tool_specified"; then
23098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23099$as_echo "not found" >&6; }
23100            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23101          fi
23102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23103$as_echo "$tool_specified" >&6; }
23104        fi
23105      fi
23106    fi
23107
23108  fi
23109
23110
23111
23112  if test "x$XATTR" = x; then
23113    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23114  fi
23115
23116
23117
23118
23119  # Publish this variable in the help.
23120
23121
23122  if [ -z "${CODESIGN+x}" ]; then
23123    # The variable is not set by user, try to locate tool using the code snippet
23124    for ac_prog in codesign
23125do
23126  # Extract the first word of "$ac_prog", so it can be a program name with args.
23127set dummy $ac_prog; ac_word=$2
23128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23129$as_echo_n "checking for $ac_word... " >&6; }
23130if ${ac_cv_path_CODESIGN+:} false; then :
23131  $as_echo_n "(cached) " >&6
23132else
23133  case $CODESIGN in
23134  [\\/]* | ?:[\\/]*)
23135  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23136  ;;
23137  *)
23138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23139for as_dir in $PATH
23140do
23141  IFS=$as_save_IFS
23142  test -z "$as_dir" && as_dir=.
23143    for ac_exec_ext in '' $ac_executable_extensions; do
23144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23145    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23147    break 2
23148  fi
23149done
23150  done
23151IFS=$as_save_IFS
23152
23153  ;;
23154esac
23155fi
23156CODESIGN=$ac_cv_path_CODESIGN
23157if test -n "$CODESIGN"; then
23158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23159$as_echo "$CODESIGN" >&6; }
23160else
23161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23162$as_echo "no" >&6; }
23163fi
23164
23165
23166  test -n "$CODESIGN" && break
23167done
23168
23169  else
23170    # The variable is set, but is it from the command line or the environment?
23171
23172    # Try to remove the string !CODESIGN! from our list.
23173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23175      # If it failed, the variable was not from the command line. Ignore it,
23176      # but warn the user (except for BASH, which is always set by the calling BASH).
23177      if test "xCODESIGN" != xBASH; then
23178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23179$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23180      fi
23181      # Try to locate tool using the code snippet
23182      for ac_prog in codesign
23183do
23184  # Extract the first word of "$ac_prog", so it can be a program name with args.
23185set dummy $ac_prog; ac_word=$2
23186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23187$as_echo_n "checking for $ac_word... " >&6; }
23188if ${ac_cv_path_CODESIGN+:} false; then :
23189  $as_echo_n "(cached) " >&6
23190else
23191  case $CODESIGN in
23192  [\\/]* | ?:[\\/]*)
23193  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23194  ;;
23195  *)
23196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23197for as_dir in $PATH
23198do
23199  IFS=$as_save_IFS
23200  test -z "$as_dir" && as_dir=.
23201    for ac_exec_ext in '' $ac_executable_extensions; do
23202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23203    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23205    break 2
23206  fi
23207done
23208  done
23209IFS=$as_save_IFS
23210
23211  ;;
23212esac
23213fi
23214CODESIGN=$ac_cv_path_CODESIGN
23215if test -n "$CODESIGN"; then
23216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23217$as_echo "$CODESIGN" >&6; }
23218else
23219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23220$as_echo "no" >&6; }
23221fi
23222
23223
23224  test -n "$CODESIGN" && break
23225done
23226
23227    else
23228      # If it succeeded, then it was overridden by the user. We will use it
23229      # for the tool.
23230
23231      # First remove it from the list of overridden variables, so we can test
23232      # for unknown variables in the end.
23233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23234
23235      # Check if we try to supply an empty value
23236      if test "x$CODESIGN" = x; then
23237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23238$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23240$as_echo_n "checking for CODESIGN... " >&6; }
23241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23242$as_echo "disabled" >&6; }
23243      else
23244        # Check if the provided tool contains a complete path.
23245        tool_specified="$CODESIGN"
23246        tool_basename="${tool_specified##*/}"
23247        if test "x$tool_basename" = "x$tool_specified"; then
23248          # A command without a complete path is provided, search $PATH.
23249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23250$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23251          # Extract the first word of "$tool_basename", so it can be a program name with args.
23252set dummy $tool_basename; 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_CODESIGN+:} false; then :
23256  $as_echo_n "(cached) " >&6
23257else
23258  case $CODESIGN in
23259  [\\/]* | ?:[\\/]*)
23260  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
23281CODESIGN=$ac_cv_path_CODESIGN
23282if test -n "$CODESIGN"; then
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23284$as_echo "$CODESIGN" >&6; }
23285else
23286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23287$as_echo "no" >&6; }
23288fi
23289
23290
23291          if test "x$CODESIGN" = x; then
23292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23293          fi
23294        else
23295          # Otherwise we believe it is a complete path. Use it as it is.
23296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23297$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23299$as_echo_n "checking for CODESIGN... " >&6; }
23300          if test ! -x "$tool_specified"; then
23301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23302$as_echo "not found" >&6; }
23303            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23304          fi
23305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23306$as_echo "$tool_specified" >&6; }
23307        fi
23308      fi
23309    fi
23310
23311  fi
23312
23313
23314    if test "x$CODESIGN" != "x"; then
23315      # Verify that the openjdk_codesign certificate is present
23316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23317$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23318      rm -f codesign-testfile
23319      touch codesign-testfile
23320      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23321      rm -f codesign-testfile
23322      if test "x$CODESIGN" = x; then
23323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23324$as_echo "no" >&6; }
23325      else
23326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23327$as_echo "yes" >&6; }
23328      fi
23329    fi
23330
23331
23332
23333  # Publish this variable in the help.
23334
23335
23336  if [ -z "${SETFILE+x}" ]; then
23337    # The variable is not set by user, try to locate tool using the code snippet
23338    for ac_prog in SetFile
23339do
23340  # Extract the first word of "$ac_prog", so it can be a program name with args.
23341set dummy $ac_prog; ac_word=$2
23342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23343$as_echo_n "checking for $ac_word... " >&6; }
23344if ${ac_cv_path_SETFILE+:} false; then :
23345  $as_echo_n "(cached) " >&6
23346else
23347  case $SETFILE in
23348  [\\/]* | ?:[\\/]*)
23349  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23350  ;;
23351  *)
23352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23353for as_dir in $PATH
23354do
23355  IFS=$as_save_IFS
23356  test -z "$as_dir" && as_dir=.
23357    for ac_exec_ext in '' $ac_executable_extensions; do
23358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23359    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23361    break 2
23362  fi
23363done
23364  done
23365IFS=$as_save_IFS
23366
23367  ;;
23368esac
23369fi
23370SETFILE=$ac_cv_path_SETFILE
23371if test -n "$SETFILE"; then
23372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23373$as_echo "$SETFILE" >&6; }
23374else
23375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23376$as_echo "no" >&6; }
23377fi
23378
23379
23380  test -n "$SETFILE" && break
23381done
23382
23383  else
23384    # The variable is set, but is it from the command line or the environment?
23385
23386    # Try to remove the string !SETFILE! from our list.
23387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23389      # If it failed, the variable was not from the command line. Ignore it,
23390      # but warn the user (except for BASH, which is always set by the calling BASH).
23391      if test "xSETFILE" != xBASH; then
23392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23393$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23394      fi
23395      # Try to locate tool using the code snippet
23396      for ac_prog in SetFile
23397do
23398  # Extract the first word of "$ac_prog", so it can be a program name with args.
23399set dummy $ac_prog; ac_word=$2
23400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23401$as_echo_n "checking for $ac_word... " >&6; }
23402if ${ac_cv_path_SETFILE+:} false; then :
23403  $as_echo_n "(cached) " >&6
23404else
23405  case $SETFILE in
23406  [\\/]* | ?:[\\/]*)
23407  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23408  ;;
23409  *)
23410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23411for as_dir in $PATH
23412do
23413  IFS=$as_save_IFS
23414  test -z "$as_dir" && as_dir=.
23415    for ac_exec_ext in '' $ac_executable_extensions; do
23416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23417    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23419    break 2
23420  fi
23421done
23422  done
23423IFS=$as_save_IFS
23424
23425  ;;
23426esac
23427fi
23428SETFILE=$ac_cv_path_SETFILE
23429if test -n "$SETFILE"; then
23430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23431$as_echo "$SETFILE" >&6; }
23432else
23433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23434$as_echo "no" >&6; }
23435fi
23436
23437
23438  test -n "$SETFILE" && break
23439done
23440
23441    else
23442      # If it succeeded, then it was overridden by the user. We will use it
23443      # for the tool.
23444
23445      # First remove it from the list of overridden variables, so we can test
23446      # for unknown variables in the end.
23447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23448
23449      # Check if we try to supply an empty value
23450      if test "x$SETFILE" = x; then
23451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23452$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23454$as_echo_n "checking for SETFILE... " >&6; }
23455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23456$as_echo "disabled" >&6; }
23457      else
23458        # Check if the provided tool contains a complete path.
23459        tool_specified="$SETFILE"
23460        tool_basename="${tool_specified##*/}"
23461        if test "x$tool_basename" = "x$tool_specified"; then
23462          # A command without a complete path is provided, search $PATH.
23463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23464$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23465          # Extract the first word of "$tool_basename", so it can be a program name with args.
23466set dummy $tool_basename; ac_word=$2
23467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23468$as_echo_n "checking for $ac_word... " >&6; }
23469if ${ac_cv_path_SETFILE+:} false; then :
23470  $as_echo_n "(cached) " >&6
23471else
23472  case $SETFILE in
23473  [\\/]* | ?:[\\/]*)
23474  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23475  ;;
23476  *)
23477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23478for as_dir in $PATH
23479do
23480  IFS=$as_save_IFS
23481  test -z "$as_dir" && as_dir=.
23482    for ac_exec_ext in '' $ac_executable_extensions; do
23483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23484    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23486    break 2
23487  fi
23488done
23489  done
23490IFS=$as_save_IFS
23491
23492  ;;
23493esac
23494fi
23495SETFILE=$ac_cv_path_SETFILE
23496if test -n "$SETFILE"; then
23497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23498$as_echo "$SETFILE" >&6; }
23499else
23500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23501$as_echo "no" >&6; }
23502fi
23503
23504
23505          if test "x$SETFILE" = x; then
23506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23507          fi
23508        else
23509          # Otherwise we believe it is a complete path. Use it as it is.
23510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23511$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23513$as_echo_n "checking for SETFILE... " >&6; }
23514          if test ! -x "$tool_specified"; then
23515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23516$as_echo "not found" >&6; }
23517            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23518          fi
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23520$as_echo "$tool_specified" >&6; }
23521        fi
23522      fi
23523    fi
23524
23525  fi
23526
23527
23528
23529  if test "x$SETFILE" = x; then
23530    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23531  fi
23532
23533
23534  fi
23535
23536
23537  # Test if bash supports pipefail.
23538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23539$as_echo_n "checking if bash supports pipefail... " >&6; }
23540  if ${BASH} -c 'set -o pipefail'; then
23541    BASH_ARGS="$BASH_ARGS -o pipefail"
23542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23543$as_echo "yes" >&6; }
23544  else
23545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23546$as_echo "no" >&6; }
23547  fi
23548
23549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23550$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23551  if ${BASH} -e -c 'true'; then
23552    BASH_ARGS="$BASH_ARGS -e"
23553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23554$as_echo "yes" >&6; }
23555  else
23556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23557$as_echo "no" >&6; }
23558  fi
23559
23560
23561
23562
23563# Check if pkg-config is available.
23564
23565
23566if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23567	if test -n "$ac_tool_prefix"; then
23568  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23569set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23571$as_echo_n "checking for $ac_word... " >&6; }
23572if ${ac_cv_path_PKG_CONFIG+:} false; then :
23573  $as_echo_n "(cached) " >&6
23574else
23575  case $PKG_CONFIG in
23576  [\\/]* | ?:[\\/]*)
23577  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23578  ;;
23579  *)
23580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23581for as_dir in $PATH
23582do
23583  IFS=$as_save_IFS
23584  test -z "$as_dir" && as_dir=.
23585    for ac_exec_ext in '' $ac_executable_extensions; do
23586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23587    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23589    break 2
23590  fi
23591done
23592  done
23593IFS=$as_save_IFS
23594
23595  ;;
23596esac
23597fi
23598PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23599if test -n "$PKG_CONFIG"; then
23600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23601$as_echo "$PKG_CONFIG" >&6; }
23602else
23603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23604$as_echo "no" >&6; }
23605fi
23606
23607
23608fi
23609if test -z "$ac_cv_path_PKG_CONFIG"; then
23610  ac_pt_PKG_CONFIG=$PKG_CONFIG
23611  # Extract the first word of "pkg-config", so it can be a program name with args.
23612set dummy pkg-config; ac_word=$2
23613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23614$as_echo_n "checking for $ac_word... " >&6; }
23615if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23616  $as_echo_n "(cached) " >&6
23617else
23618  case $ac_pt_PKG_CONFIG in
23619  [\\/]* | ?:[\\/]*)
23620  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23621  ;;
23622  *)
23623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23624for as_dir in $PATH
23625do
23626  IFS=$as_save_IFS
23627  test -z "$as_dir" && as_dir=.
23628    for ac_exec_ext in '' $ac_executable_extensions; do
23629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23630    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23632    break 2
23633  fi
23634done
23635  done
23636IFS=$as_save_IFS
23637
23638  ;;
23639esac
23640fi
23641ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23642if test -n "$ac_pt_PKG_CONFIG"; then
23643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23644$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23645else
23646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23647$as_echo "no" >&6; }
23648fi
23649
23650  if test "x$ac_pt_PKG_CONFIG" = x; then
23651    PKG_CONFIG=""
23652  else
23653    case $cross_compiling:$ac_tool_warned in
23654yes:)
23655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23657ac_tool_warned=yes ;;
23658esac
23659    PKG_CONFIG=$ac_pt_PKG_CONFIG
23660  fi
23661else
23662  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23663fi
23664
23665fi
23666if test -n "$PKG_CONFIG"; then
23667	_pkg_min_version=0.9.0
23668	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23669$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23670	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23671		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23672$as_echo "yes" >&6; }
23673	else
23674		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23675$as_echo "no" >&6; }
23676		PKG_CONFIG=""
23677	fi
23678
23679fi
23680
23681# After basic tools have been setup, we can check build os specific details.
23682
23683  ###############################################################################
23684
23685  # Note that this is the build platform OS version!
23686
23687  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23688  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23689  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23690  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23691
23692
23693
23694
23695
23696# Misc basic settings
23697
23698
23699# Check whether --with-default-make-target was given.
23700if test "${with_default_make_target+set}" = set; then :
23701  withval=$with_default_make_target;
23702fi
23703
23704  if test "x$with_default_make_target" = "x" \
23705      || test "x$with_default_make_target" = "xyes"; then
23706    DEFAULT_MAKE_TARGET="exploded-image"
23707  elif test "x$with_default_make_target" = "xno"; then
23708    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23709  else
23710    DEFAULT_MAKE_TARGET="$with_default_make_target"
23711  fi
23712
23713
23714
23715
23716###############################################################################
23717#
23718# Determine OpenJDK variants, options and version numbers.
23719#
23720###############################################################################
23721
23722# We need build & target for this.
23723
23724  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23725  # We always build headless support.
23726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23727$as_echo_n "checking headful support... " >&6; }
23728  # Check whether --enable-headful was given.
23729if test "${enable_headful+set}" = set; then :
23730  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23731else
23732  SUPPORT_HEADFUL=yes
23733fi
23734
23735
23736  SUPPORT_HEADLESS=yes
23737  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23738
23739  if test "x$SUPPORT_HEADFUL" = xyes; then
23740    # We are building both headful and headless.
23741    headful_msg="include support for both headful and headless"
23742  fi
23743
23744  if test "x$SUPPORT_HEADFUL" = xno; then
23745    # Thus we are building headless only.
23746    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23747    headful_msg="headless only"
23748  fi
23749
23750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23751$as_echo "$headful_msg" >&6; }
23752
23753
23754
23755
23756
23757  # Choose cacerts source file
23758
23759# Check whether --with-cacerts-file was given.
23760if test "${with_cacerts_file+set}" = set; then :
23761  withval=$with_cacerts_file;
23762fi
23763
23764  if test "x$with_cacerts_file" != x; then
23765    CACERTS_FILE=$with_cacerts_file
23766  fi
23767
23768
23769  # Enable or disable unlimited crypto
23770  # Check whether --enable-unlimited-crypto was given.
23771if test "${enable_unlimited_crypto+set}" = set; then :
23772  enableval=$enable_unlimited_crypto;
23773else
23774  enable_unlimited_crypto=no
23775fi
23776
23777  if test "x$enable_unlimited_crypto" = "xyes"; then
23778    UNLIMITED_CRYPTO=true
23779  else
23780    UNLIMITED_CRYPTO=false
23781  fi
23782
23783
23784  # Should we build the serviceability agent (SA)?
23785  INCLUDE_SA=true
23786  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23787    INCLUDE_SA=false
23788  fi
23789  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23790    INCLUDE_SA=false
23791  fi
23792  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23793    INCLUDE_SA=false
23794  fi
23795
23796
23797  # Compress jars
23798  COMPRESS_JARS=false
23799
23800
23801
23802  # Setup default copyright year. Mostly overridden when building close to a new year.
23803
23804# Check whether --with-copyright-year was given.
23805if test "${with_copyright_year+set}" = set; then :
23806  withval=$with_copyright_year;
23807fi
23808
23809  if test "x$with_copyright_year" = xyes; then
23810    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23811  elif test "x$with_copyright_year" != x; then
23812    COPYRIGHT_YEAR="$with_copyright_year"
23813  else
23814    COPYRIGHT_YEAR=`date +'%Y'`
23815  fi
23816
23817
23818
23819  # Check whether --enable-keep-packaged-modules was given.
23820if test "${enable_keep_packaged_modules+set}" = set; then :
23821  enableval=$enable_keep_packaged_modules;
23822fi
23823
23824
23825  if test "x$enable_keep_packaged_modules" = "xyes"; then
23826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23827$as_echo_n "checking if packaged modules are kept... " >&6; }
23828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23829$as_echo "yes" >&6; }
23830    JLINK_KEEP_PACKAGED_MODULES=true
23831  elif test "x$enable_keep_packaged_modules" = "xno"; then
23832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23833$as_echo_n "checking if packaged modules are kept... " >&6; }
23834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23835$as_echo "no" >&6; }
23836    JLINK_KEEP_PACKAGED_MODULES=false
23837  elif test "x$enable_keep_packaged_modules" = "x"; then
23838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23839$as_echo "yes (default)" >&6; }
23840    JLINK_KEEP_PACKAGED_MODULES=true
23841  else
23842    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23843  fi
23844
23845
23846
23847
23848  # Warn user that old version arguments are deprecated.
23849
23850
23851# Check whether --with-milestone was given.
23852if test "${with_milestone+set}" = set; then :
23853  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23854$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23855fi
23856
23857
23858
23859
23860# Check whether --with-update-version was given.
23861if test "${with_update_version+set}" = set; then :
23862  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23863$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23864fi
23865
23866
23867
23868
23869# Check whether --with-user-release-suffix was given.
23870if test "${with_user_release_suffix+set}" = set; then :
23871  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
23872$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23873fi
23874
23875
23876
23877
23878# Check whether --with-build-number was given.
23879if test "${with_build_number+set}" = set; then :
23880  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23881$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23882fi
23883
23884
23885
23886  # Source the version numbers file
23887  . $AUTOCONF_DIR/version-numbers
23888
23889  # Some non-version number information is set in that file
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899  # Override version from arguments
23900
23901  # If --with-version-string is set, process it first. It is possible to
23902  # override parts with more specific flags, since these are processed later.
23903
23904# Check whether --with-version-string was given.
23905if test "${with_version_string+set}" = set; then :
23906  withval=$with_version_string;
23907fi
23908
23909  if test "x$with_version_string" = xyes; then
23910    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23911  elif test "x$with_version_string" != x; then
23912    # Additional [] needed to keep m4 from mangling shell constructs.
23913    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23914      VERSION_MAJOR=${BASH_REMATCH[1]}
23915      VERSION_MINOR=${BASH_REMATCH[3]}
23916      VERSION_SECURITY=${BASH_REMATCH[5]}
23917      VERSION_PATCH=${BASH_REMATCH[7]}
23918      VERSION_PRE=${BASH_REMATCH[9]}
23919      version_plus_separator=${BASH_REMATCH[11]}
23920      VERSION_BUILD=${BASH_REMATCH[12]}
23921      VERSION_OPT=${BASH_REMATCH[14]}
23922      # Unspecified numerical fields are interpreted as 0.
23923      if test "x$VERSION_MINOR" = x; then
23924        VERSION_MINOR=0
23925      fi
23926      if test "x$VERSION_SECURITY" = x; then
23927        VERSION_SECURITY=0
23928      fi
23929      if test "x$VERSION_PATCH" = x; then
23930        VERSION_PATCH=0
23931      fi
23932      if test "x$version_plus_separator" != x \
23933          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23934        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23935      fi
23936      # Stop the version part process from setting default values.
23937      # We still allow them to explicitely override though.
23938      NO_DEFAULT_VERSION_PARTS=true
23939    else
23940      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23941    fi
23942  fi
23943
23944
23945# Check whether --with-version-pre was given.
23946if test "${with_version_pre+set}" = set; then :
23947  withval=$with_version_pre; with_version_pre_present=true
23948else
23949  with_version_pre_present=false
23950fi
23951
23952
23953  if test "x$with_version_pre_present" = xtrue; then
23954    if test "x$with_version_pre" = xyes; then
23955      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23956    elif test "x$with_version_pre" = xno; then
23957      # Interpret --without-* as empty string instead of the literal "no"
23958      VERSION_PRE=
23959    else
23960      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23961       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23962      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23964$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23965      fi
23966    fi
23967  else
23968    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23969      # Default is to use "internal" as pre
23970      VERSION_PRE="internal"
23971    fi
23972  fi
23973
23974
23975# Check whether --with-version-opt was given.
23976if test "${with_version_opt+set}" = set; then :
23977  withval=$with_version_opt; with_version_opt_present=true
23978else
23979  with_version_opt_present=false
23980fi
23981
23982
23983  if test "x$with_version_opt_present" = xtrue; then
23984    if test "x$with_version_opt" = xyes; then
23985      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23986    elif test "x$with_version_opt" = xno; then
23987      # Interpret --without-* as empty string instead of the literal "no"
23988      VERSION_OPT=
23989    else
23990      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23991       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23992      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23994$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23995      fi
23996    fi
23997  else
23998    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23999      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24000      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24001      # Outer [ ] to quote m4.
24002       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24003      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24004    fi
24005  fi
24006
24007
24008# Check whether --with-version-build was given.
24009if test "${with_version_build+set}" = set; then :
24010  withval=$with_version_build; with_version_build_present=true
24011else
24012  with_version_build_present=false
24013fi
24014
24015
24016  if test "x$with_version_build_present" = xtrue; then
24017    if test "x$with_version_build" = xyes; then
24018      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24019    elif test "x$with_version_build" = xno; then
24020      # Interpret --without-* as empty string instead of the literal "no"
24021      VERSION_BUILD=
24022    elif test "x$with_version_build" = x; then
24023      VERSION_BUILD=
24024    else
24025
24026  # Additional [] needed to keep m4 from mangling shell constructs.
24027  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24028    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24029  fi
24030  # Extract the version number without leading zeros.
24031  cleaned_value=${BASH_REMATCH[1]}
24032  if test "x$cleaned_value" = x; then
24033    # Special case for zero
24034    cleaned_value=${BASH_REMATCH[2]}
24035  fi
24036
24037  if test $cleaned_value -gt 255; then
24038    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24039  fi
24040  if test "x$cleaned_value" != "x$with_version_build"; then
24041    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24042$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24043  fi
24044  VERSION_BUILD=$cleaned_value
24045
24046    fi
24047  else
24048    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24049      # Default is to not have a build number.
24050      VERSION_BUILD=""
24051      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24052      VERSION_BUILD=0
24053    fi
24054  fi
24055
24056
24057# Check whether --with-version-major was given.
24058if test "${with_version_major+set}" = set; then :
24059  withval=$with_version_major; with_version_major_present=true
24060else
24061  with_version_major_present=false
24062fi
24063
24064
24065  if test "x$with_version_major_present" = xtrue; then
24066    if test "x$with_version_major" = xyes; then
24067      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24068    else
24069
24070  # Additional [] needed to keep m4 from mangling shell constructs.
24071  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24072    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24073  fi
24074  # Extract the version number without leading zeros.
24075  cleaned_value=${BASH_REMATCH[1]}
24076  if test "x$cleaned_value" = x; then
24077    # Special case for zero
24078    cleaned_value=${BASH_REMATCH[2]}
24079  fi
24080
24081  if test $cleaned_value -gt 255; then
24082    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24083  fi
24084  if test "x$cleaned_value" != "x$with_version_major"; then
24085    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24086$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24087  fi
24088  VERSION_MAJOR=$cleaned_value
24089
24090    fi
24091  else
24092    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24093      # Default is to get value from version-numbers
24094      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24095    fi
24096  fi
24097
24098
24099# Check whether --with-version-minor was given.
24100if test "${with_version_minor+set}" = set; then :
24101  withval=$with_version_minor; with_version_minor_present=true
24102else
24103  with_version_minor_present=false
24104fi
24105
24106
24107  if test "x$with_version_minor_present" = xtrue; then
24108    if test "x$with_version_minor" = xyes; then
24109      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24110    elif test "x$with_version_minor" = xno; then
24111      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24112      VERSION_MINOR=0
24113    elif test "x$with_version_minor" = x; then
24114      VERSION_MINOR=0
24115    else
24116
24117  # Additional [] needed to keep m4 from mangling shell constructs.
24118  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24119    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24120  fi
24121  # Extract the version number without leading zeros.
24122  cleaned_value=${BASH_REMATCH[1]}
24123  if test "x$cleaned_value" = x; then
24124    # Special case for zero
24125    cleaned_value=${BASH_REMATCH[2]}
24126  fi
24127
24128  if test $cleaned_value -gt 255; then
24129    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24130  fi
24131  if test "x$cleaned_value" != "x$with_version_minor"; then
24132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24133$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24134  fi
24135  VERSION_MINOR=$cleaned_value
24136
24137    fi
24138  else
24139    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24140      # Default is 0, if unspecified
24141      VERSION_MINOR=0
24142    fi
24143  fi
24144
24145
24146# Check whether --with-version-security was given.
24147if test "${with_version_security+set}" = set; then :
24148  withval=$with_version_security; with_version_security_present=true
24149else
24150  with_version_security_present=false
24151fi
24152
24153
24154  if test "x$with_version_security_present" = xtrue; then
24155    if test "x$with_version_security" = xyes; then
24156      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24157    elif test "x$with_version_security" = xno; then
24158      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24159      VERSION_SECURITY=0
24160    elif test "x$with_version_security" = x; then
24161      VERSION_SECURITY=0
24162    else
24163
24164  # Additional [] needed to keep m4 from mangling shell constructs.
24165  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24166    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24167  fi
24168  # Extract the version number without leading zeros.
24169  cleaned_value=${BASH_REMATCH[1]}
24170  if test "x$cleaned_value" = x; then
24171    # Special case for zero
24172    cleaned_value=${BASH_REMATCH[2]}
24173  fi
24174
24175  if test $cleaned_value -gt 255; then
24176    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24177  fi
24178  if test "x$cleaned_value" != "x$with_version_security"; then
24179    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24180$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24181  fi
24182  VERSION_SECURITY=$cleaned_value
24183
24184    fi
24185  else
24186    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24187      # Default is 0, if unspecified
24188      VERSION_SECURITY=0
24189    fi
24190  fi
24191
24192
24193# Check whether --with-version-patch was given.
24194if test "${with_version_patch+set}" = set; then :
24195  withval=$with_version_patch; with_version_patch_present=true
24196else
24197  with_version_patch_present=false
24198fi
24199
24200
24201  if test "x$with_version_patch_present" = xtrue; then
24202    if test "x$with_version_patch" = xyes; then
24203      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24204    elif test "x$with_version_patch" = xno; then
24205      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24206      VERSION_PATCH=0
24207    elif test "x$with_version_patch" = x; then
24208      VERSION_PATCH=0
24209    else
24210
24211  # Additional [] needed to keep m4 from mangling shell constructs.
24212  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24213    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24214  fi
24215  # Extract the version number without leading zeros.
24216  cleaned_value=${BASH_REMATCH[1]}
24217  if test "x$cleaned_value" = x; then
24218    # Special case for zero
24219    cleaned_value=${BASH_REMATCH[2]}
24220  fi
24221
24222  if test $cleaned_value -gt 255; then
24223    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24224  fi
24225  if test "x$cleaned_value" != "x$with_version_patch"; then
24226    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24227$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24228  fi
24229  VERSION_PATCH=$cleaned_value
24230
24231    fi
24232  else
24233    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24234      # Default is 0, if unspecified
24235      VERSION_PATCH=0
24236    fi
24237  fi
24238
24239  # Calculate derived version properties
24240
24241  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24242  if test "x$VERSION_PRE" = x; then
24243    VERSION_IS_GA=true
24244  else
24245    VERSION_IS_GA=false
24246  fi
24247
24248  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24249  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24250
24251  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24252  # Strip trailing zeroes from stripped_version_number
24253  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24254  VERSION_NUMBER=$stripped_version_number
24255
24256  # The complete version string, with additional build information
24257  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24258    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24259  else
24260    # If either build or opt is set, we need a + separator
24261    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24262  fi
24263
24264  # The short version string, just VERSION_NUMBER and PRE, if present.
24265  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24266
24267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24268$as_echo_n "checking for version string... " >&6; }
24269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24270$as_echo "$VERSION_STRING" >&6; }
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286###############################################################################
24287#
24288# Setup BootJDK, used to bootstrap the build.
24289#
24290###############################################################################
24291
24292
24293  BOOT_JDK_FOUND=no
24294
24295# Check whether --with-boot-jdk was given.
24296if test "${with_boot_jdk+set}" = set; then :
24297  withval=$with_boot_jdk;
24298fi
24299
24300
24301  # We look for the Boot JDK through various means, going from more certain to
24302  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24303  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24304  # must check if this is indeed valid; otherwise we'll continue looking.
24305
24306  # Test: Is bootjdk explicitely set by command line arguments?
24307
24308  if test "x$BOOT_JDK_FOUND" = xno; then
24309    # Now execute the test
24310
24311  if test "x$with_boot_jdk" != x; then
24312    BOOT_JDK=$with_boot_jdk
24313    BOOT_JDK_FOUND=maybe
24314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24315$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24316  fi
24317
24318
24319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24321      # Do we have a bin/java?
24322      if test ! -x "$BOOT_JDK/bin/java"; then
24323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24325        BOOT_JDK_FOUND=no
24326      else
24327        # Do we have a bin/javac?
24328        if test ! -x "$BOOT_JDK/bin/javac"; then
24329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24333          BOOT_JDK_FOUND=no
24334        else
24335          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24336          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24337
24338          # Extra M4 quote needed to protect [] in grep expression.
24339          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24340          if test "x$FOUND_CORRECT_VERSION" = x; then
24341            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24343            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24344$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24345            BOOT_JDK_FOUND=no
24346          else
24347            # We're done! :-)
24348            BOOT_JDK_FOUND=yes
24349
24350  # Only process if variable expands to non-empty
24351
24352  if test "x$BOOT_JDK" != x; then
24353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24354
24355  # Input might be given as Windows format, start by converting to
24356  # unix format.
24357  path="$BOOT_JDK"
24358  new_path=`$CYGPATH -u "$path"`
24359
24360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24363  # "foo.exe" is OK but "foo" is an error.
24364  #
24365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24366  # It is also a way to make sure we got the proper file name for the real test later on.
24367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24368  if test "x$test_shortpath" = x; then
24369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24372  fi
24373
24374  # Call helper function which possibly converts this using DOS-style short mode.
24375  # If so, the updated path is stored in $new_path.
24376
24377  input_path="$new_path"
24378  # Check if we need to convert this using DOS-style short mode. If the path
24379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24380  # take no chances and rewrite it.
24381  # Note: m4 eats our [], so we need to use [ and ] instead.
24382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24383  if test "x$has_forbidden_chars" != x; then
24384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24388      # Going to short mode and back again did indeed matter. Since short mode is
24389      # case insensitive, let's make it lowercase to improve readability.
24390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24391      # Now convert it back to Unix-style (cygpath)
24392      input_path=`$CYGPATH -u "$shortmode_path"`
24393      new_path="$input_path"
24394    fi
24395  fi
24396
24397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24398  if test "x$test_cygdrive_prefix" = x; then
24399    # As a simple fix, exclude /usr/bin since it's not a real path.
24400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24402      # a path prefixed by /cygdrive for fixpath to work.
24403      new_path="$CYGWIN_ROOT_PATH$input_path"
24404    fi
24405  fi
24406
24407
24408  if test "x$path" != "x$new_path"; then
24409    BOOT_JDK="$new_path"
24410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24412  fi
24413
24414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24415
24416  path="$BOOT_JDK"
24417  has_colon=`$ECHO $path | $GREP ^.:`
24418  new_path="$path"
24419  if test "x$has_colon" = x; then
24420    # Not in mixed or Windows style, start by that.
24421    new_path=`cmd //c echo $path`
24422  fi
24423
24424
24425  input_path="$new_path"
24426  # Check if we need to convert this using DOS-style short mode. If the path
24427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24428  # take no chances and rewrite it.
24429  # Note: m4 eats our [], so we need to use [ and ] instead.
24430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24431  if test "x$has_forbidden_chars" != x; then
24432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24434  fi
24435
24436
24437  windows_path="$new_path"
24438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24439    unix_path=`$CYGPATH -u "$windows_path"`
24440    new_path="$unix_path"
24441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24443    new_path="$unix_path"
24444  fi
24445
24446  if test "x$path" != "x$new_path"; then
24447    BOOT_JDK="$new_path"
24448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24450  fi
24451
24452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24454
24455    else
24456      # We're on a unix platform. Hooray! :)
24457      path="$BOOT_JDK"
24458      has_space=`$ECHO "$path" | $GREP " "`
24459      if test "x$has_space" != x; then
24460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24463      fi
24464
24465      # Use eval to expand a potential ~
24466      eval path="$path"
24467      if test ! -f "$path" && test ! -d "$path"; then
24468        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24469      fi
24470
24471      if test -d "$path"; then
24472        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24473      else
24474        dir="`$DIRNAME "$path"`"
24475        base="`$BASENAME "$path"`"
24476        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24477      fi
24478    fi
24479  fi
24480
24481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24482$as_echo_n "checking for Boot JDK... " >&6; }
24483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24484$as_echo "$BOOT_JDK" >&6; }
24485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24486$as_echo_n "checking Boot JDK version... " >&6; }
24487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24489$as_echo "$BOOT_JDK_VERSION" >&6; }
24490          fi # end check jdk version
24491        fi # end check javac
24492      fi # end check java
24493    fi # end check boot jdk found
24494  fi
24495
24496  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24497    # Having specified an argument which is incorrect will produce an instant failure;
24498    # we should not go on looking
24499    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24500  fi
24501
24502  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24503
24504  if test "x$BOOT_JDK_FOUND" = xno; then
24505    # Now execute the test
24506
24507  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24508    # First check at user selected default
24509
24510  if test "x$BOOT_JDK_FOUND" = xno; then
24511    # Now execute the test
24512
24513  if test -x /usr/libexec/java_home; then
24514    BOOT_JDK=`/usr/libexec/java_home `
24515    BOOT_JDK_FOUND=maybe
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24517$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24518  fi
24519
24520
24521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24523      # Do we have a bin/java?
24524      if test ! -x "$BOOT_JDK/bin/java"; then
24525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24527        BOOT_JDK_FOUND=no
24528      else
24529        # Do we have a bin/javac?
24530        if test ! -x "$BOOT_JDK/bin/javac"; then
24531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24535          BOOT_JDK_FOUND=no
24536        else
24537          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24538          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24539
24540          # Extra M4 quote needed to protect [] in grep expression.
24541          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24542          if test "x$FOUND_CORRECT_VERSION" = x; then
24543            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24545            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24546$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24547            BOOT_JDK_FOUND=no
24548          else
24549            # We're done! :-)
24550            BOOT_JDK_FOUND=yes
24551
24552  # Only process if variable expands to non-empty
24553
24554  if test "x$BOOT_JDK" != x; then
24555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24556
24557  # Input might be given as Windows format, start by converting to
24558  # unix format.
24559  path="$BOOT_JDK"
24560  new_path=`$CYGPATH -u "$path"`
24561
24562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24565  # "foo.exe" is OK but "foo" is an error.
24566  #
24567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24568  # It is also a way to make sure we got the proper file name for the real test later on.
24569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24570  if test "x$test_shortpath" = x; then
24571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24573    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24574  fi
24575
24576  # Call helper function which possibly converts this using DOS-style short mode.
24577  # If so, the updated path is stored in $new_path.
24578
24579  input_path="$new_path"
24580  # Check if we need to convert this using DOS-style short mode. If the path
24581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24582  # take no chances and rewrite it.
24583  # Note: m4 eats our [], so we need to use [ and ] instead.
24584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24585  if test "x$has_forbidden_chars" != x; then
24586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24590      # Going to short mode and back again did indeed matter. Since short mode is
24591      # case insensitive, let's make it lowercase to improve readability.
24592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24593      # Now convert it back to Unix-style (cygpath)
24594      input_path=`$CYGPATH -u "$shortmode_path"`
24595      new_path="$input_path"
24596    fi
24597  fi
24598
24599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24600  if test "x$test_cygdrive_prefix" = x; then
24601    # As a simple fix, exclude /usr/bin since it's not a real path.
24602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24604      # a path prefixed by /cygdrive for fixpath to work.
24605      new_path="$CYGWIN_ROOT_PATH$input_path"
24606    fi
24607  fi
24608
24609
24610  if test "x$path" != "x$new_path"; then
24611    BOOT_JDK="$new_path"
24612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24614  fi
24615
24616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24617
24618  path="$BOOT_JDK"
24619  has_colon=`$ECHO $path | $GREP ^.:`
24620  new_path="$path"
24621  if test "x$has_colon" = x; then
24622    # Not in mixed or Windows style, start by that.
24623    new_path=`cmd //c echo $path`
24624  fi
24625
24626
24627  input_path="$new_path"
24628  # Check if we need to convert this using DOS-style short mode. If the path
24629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24630  # take no chances and rewrite it.
24631  # Note: m4 eats our [], so we need to use [ and ] instead.
24632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24633  if test "x$has_forbidden_chars" != x; then
24634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24636  fi
24637
24638
24639  windows_path="$new_path"
24640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24641    unix_path=`$CYGPATH -u "$windows_path"`
24642    new_path="$unix_path"
24643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24645    new_path="$unix_path"
24646  fi
24647
24648  if test "x$path" != "x$new_path"; then
24649    BOOT_JDK="$new_path"
24650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24652  fi
24653
24654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24656
24657    else
24658      # We're on a unix platform. Hooray! :)
24659      path="$BOOT_JDK"
24660      has_space=`$ECHO "$path" | $GREP " "`
24661      if test "x$has_space" != x; then
24662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24665      fi
24666
24667      # Use eval to expand a potential ~
24668      eval path="$path"
24669      if test ! -f "$path" && test ! -d "$path"; then
24670        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24671      fi
24672
24673      if test -d "$path"; then
24674        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24675      else
24676        dir="`$DIRNAME "$path"`"
24677        base="`$BASENAME "$path"`"
24678        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24679      fi
24680    fi
24681  fi
24682
24683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24684$as_echo_n "checking for Boot JDK... " >&6; }
24685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24686$as_echo "$BOOT_JDK" >&6; }
24687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24688$as_echo_n "checking Boot JDK version... " >&6; }
24689            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24691$as_echo "$BOOT_JDK_VERSION" >&6; }
24692          fi # end check jdk version
24693        fi # end check javac
24694      fi # end check java
24695    fi # end check boot jdk found
24696  fi
24697
24698    # If that did not work out (e.g. too old), try explicit versions instead
24699
24700  if test "x$BOOT_JDK_FOUND" = xno; then
24701    # Now execute the test
24702
24703  if test -x /usr/libexec/java_home; then
24704    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24705    BOOT_JDK_FOUND=maybe
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24707$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24708  fi
24709
24710
24711    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24712    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24713      # Do we have a bin/java?
24714      if test ! -x "$BOOT_JDK/bin/java"; then
24715        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24717        BOOT_JDK_FOUND=no
24718      else
24719        # Do we have a bin/javac?
24720        if test ! -x "$BOOT_JDK/bin/javac"; then
24721          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24723          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24724$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24725          BOOT_JDK_FOUND=no
24726        else
24727          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24728          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24729
24730          # Extra M4 quote needed to protect [] in grep expression.
24731          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24732          if test "x$FOUND_CORRECT_VERSION" = x; then
24733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24735            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24736$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24737            BOOT_JDK_FOUND=no
24738          else
24739            # We're done! :-)
24740            BOOT_JDK_FOUND=yes
24741
24742  # Only process if variable expands to non-empty
24743
24744  if test "x$BOOT_JDK" != x; then
24745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24746
24747  # Input might be given as Windows format, start by converting to
24748  # unix format.
24749  path="$BOOT_JDK"
24750  new_path=`$CYGPATH -u "$path"`
24751
24752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24755  # "foo.exe" is OK but "foo" is an error.
24756  #
24757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24758  # It is also a way to make sure we got the proper file name for the real test later on.
24759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24760  if test "x$test_shortpath" = x; then
24761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24764  fi
24765
24766  # Call helper function which possibly converts this using DOS-style short mode.
24767  # If so, the updated path is stored in $new_path.
24768
24769  input_path="$new_path"
24770  # Check if we need to convert this using DOS-style short mode. If the path
24771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24772  # take no chances and rewrite it.
24773  # Note: m4 eats our [], so we need to use [ and ] instead.
24774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24775  if test "x$has_forbidden_chars" != x; then
24776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24780      # Going to short mode and back again did indeed matter. Since short mode is
24781      # case insensitive, let's make it lowercase to improve readability.
24782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24783      # Now convert it back to Unix-style (cygpath)
24784      input_path=`$CYGPATH -u "$shortmode_path"`
24785      new_path="$input_path"
24786    fi
24787  fi
24788
24789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24790  if test "x$test_cygdrive_prefix" = x; then
24791    # As a simple fix, exclude /usr/bin since it's not a real path.
24792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24794      # a path prefixed by /cygdrive for fixpath to work.
24795      new_path="$CYGWIN_ROOT_PATH$input_path"
24796    fi
24797  fi
24798
24799
24800  if test "x$path" != "x$new_path"; then
24801    BOOT_JDK="$new_path"
24802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24804  fi
24805
24806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24807
24808  path="$BOOT_JDK"
24809  has_colon=`$ECHO $path | $GREP ^.:`
24810  new_path="$path"
24811  if test "x$has_colon" = x; then
24812    # Not in mixed or Windows style, start by that.
24813    new_path=`cmd //c echo $path`
24814  fi
24815
24816
24817  input_path="$new_path"
24818  # Check if we need to convert this using DOS-style short mode. If the path
24819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24820  # take no chances and rewrite it.
24821  # Note: m4 eats our [], so we need to use [ and ] instead.
24822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24823  if test "x$has_forbidden_chars" != x; then
24824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24826  fi
24827
24828
24829  windows_path="$new_path"
24830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24831    unix_path=`$CYGPATH -u "$windows_path"`
24832    new_path="$unix_path"
24833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24835    new_path="$unix_path"
24836  fi
24837
24838  if test "x$path" != "x$new_path"; then
24839    BOOT_JDK="$new_path"
24840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24842  fi
24843
24844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24846
24847    else
24848      # We're on a unix platform. Hooray! :)
24849      path="$BOOT_JDK"
24850      has_space=`$ECHO "$path" | $GREP " "`
24851      if test "x$has_space" != x; then
24852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24854        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24855      fi
24856
24857      # Use eval to expand a potential ~
24858      eval path="$path"
24859      if test ! -f "$path" && test ! -d "$path"; then
24860        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24861      fi
24862
24863      if test -d "$path"; then
24864        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24865      else
24866        dir="`$DIRNAME "$path"`"
24867        base="`$BASENAME "$path"`"
24868        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24869      fi
24870    fi
24871  fi
24872
24873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24874$as_echo_n "checking for Boot JDK... " >&6; }
24875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24876$as_echo "$BOOT_JDK" >&6; }
24877            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24878$as_echo_n "checking Boot JDK version... " >&6; }
24879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24881$as_echo "$BOOT_JDK_VERSION" >&6; }
24882          fi # end check jdk version
24883        fi # end check javac
24884      fi # end check java
24885    fi # end check boot jdk found
24886  fi
24887
24888
24889  if test "x$BOOT_JDK_FOUND" = xno; then
24890    # Now execute the test
24891
24892  if test -x /usr/libexec/java_home; then
24893    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24894    BOOT_JDK_FOUND=maybe
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24896$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24897  fi
24898
24899
24900    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24901    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24902      # Do we have a bin/java?
24903      if test ! -x "$BOOT_JDK/bin/java"; then
24904        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24906        BOOT_JDK_FOUND=no
24907      else
24908        # Do we have a bin/javac?
24909        if test ! -x "$BOOT_JDK/bin/javac"; then
24910          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24912          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24913$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24914          BOOT_JDK_FOUND=no
24915        else
24916          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24917          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24918
24919          # Extra M4 quote needed to protect [] in grep expression.
24920          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24921          if test "x$FOUND_CORRECT_VERSION" = x; then
24922            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24924            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24925$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24926            BOOT_JDK_FOUND=no
24927          else
24928            # We're done! :-)
24929            BOOT_JDK_FOUND=yes
24930
24931  # Only process if variable expands to non-empty
24932
24933  if test "x$BOOT_JDK" != x; then
24934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24935
24936  # Input might be given as Windows format, start by converting to
24937  # unix format.
24938  path="$BOOT_JDK"
24939  new_path=`$CYGPATH -u "$path"`
24940
24941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24944  # "foo.exe" is OK but "foo" is an error.
24945  #
24946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24947  # It is also a way to make sure we got the proper file name for the real test later on.
24948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24949  if test "x$test_shortpath" = x; then
24950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24953  fi
24954
24955  # Call helper function which possibly converts this using DOS-style short mode.
24956  # If so, the updated path is stored in $new_path.
24957
24958  input_path="$new_path"
24959  # Check if we need to convert this using DOS-style short mode. If the path
24960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24961  # take no chances and rewrite it.
24962  # Note: m4 eats our [], so we need to use [ and ] instead.
24963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24964  if test "x$has_forbidden_chars" != x; then
24965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24969      # Going to short mode and back again did indeed matter. Since short mode is
24970      # case insensitive, let's make it lowercase to improve readability.
24971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24972      # Now convert it back to Unix-style (cygpath)
24973      input_path=`$CYGPATH -u "$shortmode_path"`
24974      new_path="$input_path"
24975    fi
24976  fi
24977
24978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24979  if test "x$test_cygdrive_prefix" = x; then
24980    # As a simple fix, exclude /usr/bin since it's not a real path.
24981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24983      # a path prefixed by /cygdrive for fixpath to work.
24984      new_path="$CYGWIN_ROOT_PATH$input_path"
24985    fi
24986  fi
24987
24988
24989  if test "x$path" != "x$new_path"; then
24990    BOOT_JDK="$new_path"
24991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24993  fi
24994
24995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24996
24997  path="$BOOT_JDK"
24998  has_colon=`$ECHO $path | $GREP ^.:`
24999  new_path="$path"
25000  if test "x$has_colon" = x; then
25001    # Not in mixed or Windows style, start by that.
25002    new_path=`cmd //c echo $path`
25003  fi
25004
25005
25006  input_path="$new_path"
25007  # Check if we need to convert this using DOS-style short mode. If the path
25008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25009  # take no chances and rewrite it.
25010  # Note: m4 eats our [], so we need to use [ and ] instead.
25011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25012  if test "x$has_forbidden_chars" != x; then
25013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25015  fi
25016
25017
25018  windows_path="$new_path"
25019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020    unix_path=`$CYGPATH -u "$windows_path"`
25021    new_path="$unix_path"
25022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25024    new_path="$unix_path"
25025  fi
25026
25027  if test "x$path" != "x$new_path"; then
25028    BOOT_JDK="$new_path"
25029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25031  fi
25032
25033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25035
25036    else
25037      # We're on a unix platform. Hooray! :)
25038      path="$BOOT_JDK"
25039      has_space=`$ECHO "$path" | $GREP " "`
25040      if test "x$has_space" != x; then
25041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25043        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25044      fi
25045
25046      # Use eval to expand a potential ~
25047      eval path="$path"
25048      if test ! -f "$path" && test ! -d "$path"; then
25049        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25050      fi
25051
25052      if test -d "$path"; then
25053        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25054      else
25055        dir="`$DIRNAME "$path"`"
25056        base="`$BASENAME "$path"`"
25057        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25058      fi
25059    fi
25060  fi
25061
25062            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25063$as_echo_n "checking for Boot JDK... " >&6; }
25064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25065$as_echo "$BOOT_JDK" >&6; }
25066            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25067$as_echo_n "checking Boot JDK version... " >&6; }
25068            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25070$as_echo "$BOOT_JDK_VERSION" >&6; }
25071          fi # end check jdk version
25072        fi # end check javac
25073      fi # end check java
25074    fi # end check boot jdk found
25075  fi
25076
25077
25078  if test "x$BOOT_JDK_FOUND" = xno; then
25079    # Now execute the test
25080
25081  if test -x /usr/libexec/java_home; then
25082    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25083    BOOT_JDK_FOUND=maybe
25084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25085$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25086  fi
25087
25088
25089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25091      # Do we have a bin/java?
25092      if test ! -x "$BOOT_JDK/bin/java"; then
25093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25095        BOOT_JDK_FOUND=no
25096      else
25097        # Do we have a bin/javac?
25098        if test ! -x "$BOOT_JDK/bin/javac"; then
25099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25103          BOOT_JDK_FOUND=no
25104        else
25105          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25106          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25107
25108          # Extra M4 quote needed to protect [] in grep expression.
25109          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25110          if test "x$FOUND_CORRECT_VERSION" = x; then
25111            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25113            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25114$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25115            BOOT_JDK_FOUND=no
25116          else
25117            # We're done! :-)
25118            BOOT_JDK_FOUND=yes
25119
25120  # Only process if variable expands to non-empty
25121
25122  if test "x$BOOT_JDK" != x; then
25123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25124
25125  # Input might be given as Windows format, start by converting to
25126  # unix format.
25127  path="$BOOT_JDK"
25128  new_path=`$CYGPATH -u "$path"`
25129
25130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25133  # "foo.exe" is OK but "foo" is an error.
25134  #
25135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25136  # It is also a way to make sure we got the proper file name for the real test later on.
25137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25138  if test "x$test_shortpath" = x; then
25139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25141    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25142  fi
25143
25144  # Call helper function which possibly converts this using DOS-style short mode.
25145  # If so, the updated path is stored in $new_path.
25146
25147  input_path="$new_path"
25148  # Check if we need to convert this using DOS-style short mode. If the path
25149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25150  # take no chances and rewrite it.
25151  # Note: m4 eats our [], so we need to use [ and ] instead.
25152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25153  if test "x$has_forbidden_chars" != x; then
25154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25158      # Going to short mode and back again did indeed matter. Since short mode is
25159      # case insensitive, let's make it lowercase to improve readability.
25160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25161      # Now convert it back to Unix-style (cygpath)
25162      input_path=`$CYGPATH -u "$shortmode_path"`
25163      new_path="$input_path"
25164    fi
25165  fi
25166
25167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25168  if test "x$test_cygdrive_prefix" = x; then
25169    # As a simple fix, exclude /usr/bin since it's not a real path.
25170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25172      # a path prefixed by /cygdrive for fixpath to work.
25173      new_path="$CYGWIN_ROOT_PATH$input_path"
25174    fi
25175  fi
25176
25177
25178  if test "x$path" != "x$new_path"; then
25179    BOOT_JDK="$new_path"
25180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25182  fi
25183
25184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25185
25186  path="$BOOT_JDK"
25187  has_colon=`$ECHO $path | $GREP ^.:`
25188  new_path="$path"
25189  if test "x$has_colon" = x; then
25190    # Not in mixed or Windows style, start by that.
25191    new_path=`cmd //c echo $path`
25192  fi
25193
25194
25195  input_path="$new_path"
25196  # Check if we need to convert this using DOS-style short mode. If the path
25197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25198  # take no chances and rewrite it.
25199  # Note: m4 eats our [], so we need to use [ and ] instead.
25200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25201  if test "x$has_forbidden_chars" != x; then
25202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25204  fi
25205
25206
25207  windows_path="$new_path"
25208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25209    unix_path=`$CYGPATH -u "$windows_path"`
25210    new_path="$unix_path"
25211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25213    new_path="$unix_path"
25214  fi
25215
25216  if test "x$path" != "x$new_path"; then
25217    BOOT_JDK="$new_path"
25218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25220  fi
25221
25222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25224
25225    else
25226      # We're on a unix platform. Hooray! :)
25227      path="$BOOT_JDK"
25228      has_space=`$ECHO "$path" | $GREP " "`
25229      if test "x$has_space" != x; then
25230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25233      fi
25234
25235      # Use eval to expand a potential ~
25236      eval path="$path"
25237      if test ! -f "$path" && test ! -d "$path"; then
25238        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25239      fi
25240
25241      if test -d "$path"; then
25242        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25243      else
25244        dir="`$DIRNAME "$path"`"
25245        base="`$BASENAME "$path"`"
25246        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25247      fi
25248    fi
25249  fi
25250
25251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25252$as_echo_n "checking for Boot JDK... " >&6; }
25253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25254$as_echo "$BOOT_JDK" >&6; }
25255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25256$as_echo_n "checking Boot JDK version... " >&6; }
25257            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25259$as_echo "$BOOT_JDK_VERSION" >&6; }
25260          fi # end check jdk version
25261        fi # end check javac
25262      fi # end check java
25263    fi # end check boot jdk found
25264  fi
25265
25266  fi
25267
25268
25269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25271      # Do we have a bin/java?
25272      if test ! -x "$BOOT_JDK/bin/java"; then
25273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25275        BOOT_JDK_FOUND=no
25276      else
25277        # Do we have a bin/javac?
25278        if test ! -x "$BOOT_JDK/bin/javac"; then
25279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25283          BOOT_JDK_FOUND=no
25284        else
25285          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25286          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25287
25288          # Extra M4 quote needed to protect [] in grep expression.
25289          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25290          if test "x$FOUND_CORRECT_VERSION" = x; then
25291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25293            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25295            BOOT_JDK_FOUND=no
25296          else
25297            # We're done! :-)
25298            BOOT_JDK_FOUND=yes
25299
25300  # Only process if variable expands to non-empty
25301
25302  if test "x$BOOT_JDK" != x; then
25303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25304
25305  # Input might be given as Windows format, start by converting to
25306  # unix format.
25307  path="$BOOT_JDK"
25308  new_path=`$CYGPATH -u "$path"`
25309
25310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25313  # "foo.exe" is OK but "foo" is an error.
25314  #
25315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25316  # It is also a way to make sure we got the proper file name for the real test later on.
25317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25318  if test "x$test_shortpath" = x; then
25319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25322  fi
25323
25324  # Call helper function which possibly converts this using DOS-style short mode.
25325  # If so, the updated path is stored in $new_path.
25326
25327  input_path="$new_path"
25328  # Check if we need to convert this using DOS-style short mode. If the path
25329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25330  # take no chances and rewrite it.
25331  # Note: m4 eats our [], so we need to use [ and ] instead.
25332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25333  if test "x$has_forbidden_chars" != x; then
25334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25338      # Going to short mode and back again did indeed matter. Since short mode is
25339      # case insensitive, let's make it lowercase to improve readability.
25340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25341      # Now convert it back to Unix-style (cygpath)
25342      input_path=`$CYGPATH -u "$shortmode_path"`
25343      new_path="$input_path"
25344    fi
25345  fi
25346
25347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25348  if test "x$test_cygdrive_prefix" = x; then
25349    # As a simple fix, exclude /usr/bin since it's not a real path.
25350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25352      # a path prefixed by /cygdrive for fixpath to work.
25353      new_path="$CYGWIN_ROOT_PATH$input_path"
25354    fi
25355  fi
25356
25357
25358  if test "x$path" != "x$new_path"; then
25359    BOOT_JDK="$new_path"
25360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25362  fi
25363
25364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25365
25366  path="$BOOT_JDK"
25367  has_colon=`$ECHO $path | $GREP ^.:`
25368  new_path="$path"
25369  if test "x$has_colon" = x; then
25370    # Not in mixed or Windows style, start by that.
25371    new_path=`cmd //c echo $path`
25372  fi
25373
25374
25375  input_path="$new_path"
25376  # Check if we need to convert this using DOS-style short mode. If the path
25377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25378  # take no chances and rewrite it.
25379  # Note: m4 eats our [], so we need to use [ and ] instead.
25380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25381  if test "x$has_forbidden_chars" != x; then
25382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25384  fi
25385
25386
25387  windows_path="$new_path"
25388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25389    unix_path=`$CYGPATH -u "$windows_path"`
25390    new_path="$unix_path"
25391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25393    new_path="$unix_path"
25394  fi
25395
25396  if test "x$path" != "x$new_path"; then
25397    BOOT_JDK="$new_path"
25398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25400  fi
25401
25402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25404
25405    else
25406      # We're on a unix platform. Hooray! :)
25407      path="$BOOT_JDK"
25408      has_space=`$ECHO "$path" | $GREP " "`
25409      if test "x$has_space" != x; then
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25413      fi
25414
25415      # Use eval to expand a potential ~
25416      eval path="$path"
25417      if test ! -f "$path" && test ! -d "$path"; then
25418        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25419      fi
25420
25421      if test -d "$path"; then
25422        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25423      else
25424        dir="`$DIRNAME "$path"`"
25425        base="`$BASENAME "$path"`"
25426        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25427      fi
25428    fi
25429  fi
25430
25431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25432$as_echo_n "checking for Boot JDK... " >&6; }
25433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25434$as_echo "$BOOT_JDK" >&6; }
25435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25436$as_echo_n "checking Boot JDK version... " >&6; }
25437            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25439$as_echo "$BOOT_JDK_VERSION" >&6; }
25440          fi # end check jdk version
25441        fi # end check javac
25442      fi # end check java
25443    fi # end check boot jdk found
25444  fi
25445
25446
25447  # Test: Is $JAVA_HOME set?
25448
25449  if test "x$BOOT_JDK_FOUND" = xno; then
25450    # Now execute the test
25451
25452  if test "x$JAVA_HOME" != x; then
25453    JAVA_HOME_PROCESSED="$JAVA_HOME"
25454
25455  # Only process if variable expands to non-empty
25456
25457  if test "x$JAVA_HOME_PROCESSED" != x; then
25458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459
25460  # Input might be given as Windows format, start by converting to
25461  # unix format.
25462  path="$JAVA_HOME_PROCESSED"
25463  new_path=`$CYGPATH -u "$path"`
25464
25465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25468  # "foo.exe" is OK but "foo" is an error.
25469  #
25470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25471  # It is also a way to make sure we got the proper file name for the real test later on.
25472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25473  if test "x$test_shortpath" = x; then
25474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25475$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25476    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25477  fi
25478
25479  # Call helper function which possibly converts this using DOS-style short mode.
25480  # If so, the updated path is stored in $new_path.
25481
25482  input_path="$new_path"
25483  # Check if we need to convert this using DOS-style short mode. If the path
25484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485  # take no chances and rewrite it.
25486  # Note: m4 eats our [], so we need to use [ and ] instead.
25487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25488  if test "x$has_forbidden_chars" != x; then
25489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25493      # Going to short mode and back again did indeed matter. Since short mode is
25494      # case insensitive, let's make it lowercase to improve readability.
25495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25496      # Now convert it back to Unix-style (cygpath)
25497      input_path=`$CYGPATH -u "$shortmode_path"`
25498      new_path="$input_path"
25499    fi
25500  fi
25501
25502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25503  if test "x$test_cygdrive_prefix" = x; then
25504    # As a simple fix, exclude /usr/bin since it's not a real path.
25505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25507      # a path prefixed by /cygdrive for fixpath to work.
25508      new_path="$CYGWIN_ROOT_PATH$input_path"
25509    fi
25510  fi
25511
25512
25513  if test "x$path" != "x$new_path"; then
25514    JAVA_HOME_PROCESSED="$new_path"
25515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25516$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25517  fi
25518
25519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520
25521  path="$JAVA_HOME_PROCESSED"
25522  has_colon=`$ECHO $path | $GREP ^.:`
25523  new_path="$path"
25524  if test "x$has_colon" = x; then
25525    # Not in mixed or Windows style, start by that.
25526    new_path=`cmd //c echo $path`
25527  fi
25528
25529
25530  input_path="$new_path"
25531  # Check if we need to convert this using DOS-style short mode. If the path
25532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25533  # take no chances and rewrite it.
25534  # Note: m4 eats our [], so we need to use [ and ] instead.
25535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25536  if test "x$has_forbidden_chars" != x; then
25537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539  fi
25540
25541
25542  windows_path="$new_path"
25543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544    unix_path=`$CYGPATH -u "$windows_path"`
25545    new_path="$unix_path"
25546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548    new_path="$unix_path"
25549  fi
25550
25551  if test "x$path" != "x$new_path"; then
25552    JAVA_HOME_PROCESSED="$new_path"
25553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25554$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25555  fi
25556
25557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25559
25560    else
25561      # We're on a unix platform. Hooray! :)
25562      path="$JAVA_HOME_PROCESSED"
25563      has_space=`$ECHO "$path" | $GREP " "`
25564      if test "x$has_space" != x; then
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25566$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25568      fi
25569
25570      # Use eval to expand a potential ~
25571      eval path="$path"
25572      if test ! -f "$path" && test ! -d "$path"; then
25573        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25574      fi
25575
25576      if test -d "$path"; then
25577        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25578      else
25579        dir="`$DIRNAME "$path"`"
25580        base="`$BASENAME "$path"`"
25581        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25582      fi
25583    fi
25584  fi
25585
25586    if test ! -d "$JAVA_HOME_PROCESSED"; then
25587      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25588$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25589    else
25590      # Aha, the user has set a JAVA_HOME
25591      # let us use that as the Boot JDK.
25592      BOOT_JDK="$JAVA_HOME_PROCESSED"
25593      BOOT_JDK_FOUND=maybe
25594      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25595$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25596    fi
25597  fi
25598
25599
25600    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25601    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25602      # Do we have a bin/java?
25603      if test ! -x "$BOOT_JDK/bin/java"; then
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25606        BOOT_JDK_FOUND=no
25607      else
25608        # Do we have a bin/javac?
25609        if test ! -x "$BOOT_JDK/bin/javac"; then
25610          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25612          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25613$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25614          BOOT_JDK_FOUND=no
25615        else
25616          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25617          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25618
25619          # Extra M4 quote needed to protect [] in grep expression.
25620          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25621          if test "x$FOUND_CORRECT_VERSION" = x; then
25622            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25624            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25625$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25626            BOOT_JDK_FOUND=no
25627          else
25628            # We're done! :-)
25629            BOOT_JDK_FOUND=yes
25630
25631  # Only process if variable expands to non-empty
25632
25633  if test "x$BOOT_JDK" != x; then
25634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25635
25636  # Input might be given as Windows format, start by converting to
25637  # unix format.
25638  path="$BOOT_JDK"
25639  new_path=`$CYGPATH -u "$path"`
25640
25641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25644  # "foo.exe" is OK but "foo" is an error.
25645  #
25646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25647  # It is also a way to make sure we got the proper file name for the real test later on.
25648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25649  if test "x$test_shortpath" = x; then
25650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25652    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25653  fi
25654
25655  # Call helper function which possibly converts this using DOS-style short mode.
25656  # If so, the updated path is stored in $new_path.
25657
25658  input_path="$new_path"
25659  # Check if we need to convert this using DOS-style short mode. If the path
25660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25661  # take no chances and rewrite it.
25662  # Note: m4 eats our [], so we need to use [ and ] instead.
25663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25664  if test "x$has_forbidden_chars" != x; then
25665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25669      # Going to short mode and back again did indeed matter. Since short mode is
25670      # case insensitive, let's make it lowercase to improve readability.
25671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25672      # Now convert it back to Unix-style (cygpath)
25673      input_path=`$CYGPATH -u "$shortmode_path"`
25674      new_path="$input_path"
25675    fi
25676  fi
25677
25678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25679  if test "x$test_cygdrive_prefix" = x; then
25680    # As a simple fix, exclude /usr/bin since it's not a real path.
25681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25683      # a path prefixed by /cygdrive for fixpath to work.
25684      new_path="$CYGWIN_ROOT_PATH$input_path"
25685    fi
25686  fi
25687
25688
25689  if test "x$path" != "x$new_path"; then
25690    BOOT_JDK="$new_path"
25691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25693  fi
25694
25695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25696
25697  path="$BOOT_JDK"
25698  has_colon=`$ECHO $path | $GREP ^.:`
25699  new_path="$path"
25700  if test "x$has_colon" = x; then
25701    # Not in mixed or Windows style, start by that.
25702    new_path=`cmd //c echo $path`
25703  fi
25704
25705
25706  input_path="$new_path"
25707  # Check if we need to convert this using DOS-style short mode. If the path
25708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25709  # take no chances and rewrite it.
25710  # Note: m4 eats our [], so we need to use [ and ] instead.
25711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25712  if test "x$has_forbidden_chars" != x; then
25713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25715  fi
25716
25717
25718  windows_path="$new_path"
25719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25720    unix_path=`$CYGPATH -u "$windows_path"`
25721    new_path="$unix_path"
25722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25724    new_path="$unix_path"
25725  fi
25726
25727  if test "x$path" != "x$new_path"; then
25728    BOOT_JDK="$new_path"
25729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25731  fi
25732
25733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25735
25736    else
25737      # We're on a unix platform. Hooray! :)
25738      path="$BOOT_JDK"
25739      has_space=`$ECHO "$path" | $GREP " "`
25740      if test "x$has_space" != x; then
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25742$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25743        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25744      fi
25745
25746      # Use eval to expand a potential ~
25747      eval path="$path"
25748      if test ! -f "$path" && test ! -d "$path"; then
25749        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25750      fi
25751
25752      if test -d "$path"; then
25753        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25754      else
25755        dir="`$DIRNAME "$path"`"
25756        base="`$BASENAME "$path"`"
25757        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25758      fi
25759    fi
25760  fi
25761
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25763$as_echo_n "checking for Boot JDK... " >&6; }
25764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25765$as_echo "$BOOT_JDK" >&6; }
25766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25767$as_echo_n "checking Boot JDK version... " >&6; }
25768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25770$as_echo "$BOOT_JDK_VERSION" >&6; }
25771          fi # end check jdk version
25772        fi # end check javac
25773      fi # end check java
25774    fi # end check boot jdk found
25775  fi
25776
25777
25778  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25779
25780  if test "x$BOOT_JDK_FOUND" = xno; then
25781    # Now execute the test
25782
25783  # Extract the first word of "javac", so it can be a program name with args.
25784set dummy javac; ac_word=$2
25785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25786$as_echo_n "checking for $ac_word... " >&6; }
25787if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25788  $as_echo_n "(cached) " >&6
25789else
25790  case $JAVAC_CHECK in
25791  [\\/]* | ?:[\\/]*)
25792  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25793  ;;
25794  *)
25795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25796for as_dir in $PATH
25797do
25798  IFS=$as_save_IFS
25799  test -z "$as_dir" && as_dir=.
25800    for ac_exec_ext in '' $ac_executable_extensions; do
25801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25802    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25804    break 2
25805  fi
25806done
25807  done
25808IFS=$as_save_IFS
25809
25810  ;;
25811esac
25812fi
25813JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25814if test -n "$JAVAC_CHECK"; then
25815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25816$as_echo "$JAVAC_CHECK" >&6; }
25817else
25818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25819$as_echo "no" >&6; }
25820fi
25821
25822
25823  # Extract the first word of "java", so it can be a program name with args.
25824set dummy java; ac_word=$2
25825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25826$as_echo_n "checking for $ac_word... " >&6; }
25827if ${ac_cv_path_JAVA_CHECK+:} false; then :
25828  $as_echo_n "(cached) " >&6
25829else
25830  case $JAVA_CHECK in
25831  [\\/]* | ?:[\\/]*)
25832  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25833  ;;
25834  *)
25835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25836for as_dir in $PATH
25837do
25838  IFS=$as_save_IFS
25839  test -z "$as_dir" && as_dir=.
25840    for ac_exec_ext in '' $ac_executable_extensions; do
25841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25842    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25844    break 2
25845  fi
25846done
25847  done
25848IFS=$as_save_IFS
25849
25850  ;;
25851esac
25852fi
25853JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25854if test -n "$JAVA_CHECK"; then
25855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25856$as_echo "$JAVA_CHECK" >&6; }
25857else
25858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25859$as_echo "no" >&6; }
25860fi
25861
25862
25863  BINARY="$JAVAC_CHECK"
25864  if test "x$JAVAC_CHECK" = x; then
25865    BINARY="$JAVA_CHECK"
25866  fi
25867  if test "x$BINARY" != x; then
25868    # So there is a java(c) binary, it might be part of a JDK.
25869    # Lets find the JDK/JRE directory by following symbolic links.
25870    # Linux/GNU systems often have links from /usr/bin/java to
25871    # /etc/alternatives/java to the real JDK binary.
25872
25873  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25874    # Follow a chain of symbolic links. Use readlink
25875    # where it exists, else fall back to horribly
25876    # complicated shell code.
25877    if test "x$READLINK_TESTED" != yes; then
25878      # On MacOSX there is a readlink tool with a different
25879      # purpose than the GNU readlink tool. Check the found readlink.
25880      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25881      if test "x$ISGNU" = x; then
25882        # A readlink that we do not know how to use.
25883        # Are there other non-GNU readlinks out there?
25884        READLINK_TESTED=yes
25885        READLINK=
25886      fi
25887    fi
25888
25889    if test "x$READLINK" != x; then
25890      BINARY=`$READLINK -f $BINARY`
25891    else
25892      # Save the current directory for restoring afterwards
25893      STARTDIR=$PWD
25894      COUNTER=0
25895      sym_link_dir=`$DIRNAME $BINARY`
25896      sym_link_file=`$BASENAME $BINARY`
25897      cd $sym_link_dir
25898      # Use -P flag to resolve symlinks in directories.
25899      cd `$THEPWDCMD -P`
25900      sym_link_dir=`$THEPWDCMD -P`
25901      # Resolve file symlinks
25902      while test $COUNTER -lt 20; do
25903        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25904        if test "x$ISLINK" == x; then
25905          # This is not a symbolic link! We are done!
25906          break
25907        fi
25908        # Again resolve directory symlinks since the target of the just found
25909        # link could be in a different directory
25910        cd `$DIRNAME $ISLINK`
25911        sym_link_dir=`$THEPWDCMD -P`
25912        sym_link_file=`$BASENAME $ISLINK`
25913        let COUNTER=COUNTER+1
25914      done
25915      cd $STARTDIR
25916      BINARY=$sym_link_dir/$sym_link_file
25917    fi
25918  fi
25919
25920    BOOT_JDK=`dirname "$BINARY"`
25921    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25922    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25923      # Looks like we found ourselves an JDK
25924      BOOT_JDK_FOUND=maybe
25925      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25926$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25927    fi
25928  fi
25929
25930
25931    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25932    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25933      # Do we have a bin/java?
25934      if test ! -x "$BOOT_JDK/bin/java"; then
25935        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25937        BOOT_JDK_FOUND=no
25938      else
25939        # Do we have a bin/javac?
25940        if test ! -x "$BOOT_JDK/bin/javac"; then
25941          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25943          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25944$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25945          BOOT_JDK_FOUND=no
25946        else
25947          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25948          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25949
25950          # Extra M4 quote needed to protect [] in grep expression.
25951          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25952          if test "x$FOUND_CORRECT_VERSION" = x; then
25953            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25955            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25956$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25957            BOOT_JDK_FOUND=no
25958          else
25959            # We're done! :-)
25960            BOOT_JDK_FOUND=yes
25961
25962  # Only process if variable expands to non-empty
25963
25964  if test "x$BOOT_JDK" != x; then
25965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25966
25967  # Input might be given as Windows format, start by converting to
25968  # unix format.
25969  path="$BOOT_JDK"
25970  new_path=`$CYGPATH -u "$path"`
25971
25972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25975  # "foo.exe" is OK but "foo" is an error.
25976  #
25977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25978  # It is also a way to make sure we got the proper file name for the real test later on.
25979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25980  if test "x$test_shortpath" = x; then
25981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25983    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25984  fi
25985
25986  # Call helper function which possibly converts this using DOS-style short mode.
25987  # If so, the updated path is stored in $new_path.
25988
25989  input_path="$new_path"
25990  # Check if we need to convert this using DOS-style short mode. If the path
25991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25992  # take no chances and rewrite it.
25993  # Note: m4 eats our [], so we need to use [ and ] instead.
25994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25995  if test "x$has_forbidden_chars" != x; then
25996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26000      # Going to short mode and back again did indeed matter. Since short mode is
26001      # case insensitive, let's make it lowercase to improve readability.
26002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26003      # Now convert it back to Unix-style (cygpath)
26004      input_path=`$CYGPATH -u "$shortmode_path"`
26005      new_path="$input_path"
26006    fi
26007  fi
26008
26009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26010  if test "x$test_cygdrive_prefix" = x; then
26011    # As a simple fix, exclude /usr/bin since it's not a real path.
26012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26014      # a path prefixed by /cygdrive for fixpath to work.
26015      new_path="$CYGWIN_ROOT_PATH$input_path"
26016    fi
26017  fi
26018
26019
26020  if test "x$path" != "x$new_path"; then
26021    BOOT_JDK="$new_path"
26022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26024  fi
26025
26026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26027
26028  path="$BOOT_JDK"
26029  has_colon=`$ECHO $path | $GREP ^.:`
26030  new_path="$path"
26031  if test "x$has_colon" = x; then
26032    # Not in mixed or Windows style, start by that.
26033    new_path=`cmd //c echo $path`
26034  fi
26035
26036
26037  input_path="$new_path"
26038  # Check if we need to convert this using DOS-style short mode. If the path
26039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26040  # take no chances and rewrite it.
26041  # Note: m4 eats our [], so we need to use [ and ] instead.
26042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26043  if test "x$has_forbidden_chars" != x; then
26044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26046  fi
26047
26048
26049  windows_path="$new_path"
26050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26051    unix_path=`$CYGPATH -u "$windows_path"`
26052    new_path="$unix_path"
26053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26055    new_path="$unix_path"
26056  fi
26057
26058  if test "x$path" != "x$new_path"; then
26059    BOOT_JDK="$new_path"
26060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26062  fi
26063
26064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26066
26067    else
26068      # We're on a unix platform. Hooray! :)
26069      path="$BOOT_JDK"
26070      has_space=`$ECHO "$path" | $GREP " "`
26071      if test "x$has_space" != x; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26075      fi
26076
26077      # Use eval to expand a potential ~
26078      eval path="$path"
26079      if test ! -f "$path" && test ! -d "$path"; then
26080        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26081      fi
26082
26083      if test -d "$path"; then
26084        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26085      else
26086        dir="`$DIRNAME "$path"`"
26087        base="`$BASENAME "$path"`"
26088        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26089      fi
26090    fi
26091  fi
26092
26093            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26094$as_echo_n "checking for Boot JDK... " >&6; }
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26096$as_echo "$BOOT_JDK" >&6; }
26097            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26098$as_echo_n "checking Boot JDK version... " >&6; }
26099            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26101$as_echo "$BOOT_JDK_VERSION" >&6; }
26102          fi # end check jdk version
26103        fi # end check javac
26104      fi # end check java
26105    fi # end check boot jdk found
26106  fi
26107
26108
26109  # Test: Is there a JDK installed in default, well-known locations?
26110
26111  if test "x$BOOT_JDK_FOUND" = xno; then
26112    # Now execute the test
26113
26114  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26115
26116  if test "x$BOOT_JDK_FOUND" = xno; then
26117    # Now execute the test
26118
26119  if test "x$ProgramW6432" != x; then
26120    VIRTUAL_DIR="$ProgramW6432/Java"
26121
26122  windows_path="$VIRTUAL_DIR"
26123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26124    unix_path=`$CYGPATH -u "$windows_path"`
26125    VIRTUAL_DIR="$unix_path"
26126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26128    VIRTUAL_DIR="$unix_path"
26129  fi
26130
26131
26132  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26133  BOOT_JDK_SUFFIX=""
26134  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26135  if test "x$ALL_JDKS_FOUND" != x; then
26136    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26137
26138  if test "x$BOOT_JDK_FOUND" = xno; then
26139    # Now execute the test
26140
26141        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26142        if test -d "$BOOT_JDK"; then
26143          BOOT_JDK_FOUND=maybe
26144          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26145$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26146        fi
26147
26148
26149    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26150    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26151      # Do we have a bin/java?
26152      if test ! -x "$BOOT_JDK/bin/java"; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26155        BOOT_JDK_FOUND=no
26156      else
26157        # Do we have a bin/javac?
26158        if test ! -x "$BOOT_JDK/bin/javac"; then
26159          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26161          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26162$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26163          BOOT_JDK_FOUND=no
26164        else
26165          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26166          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26167
26168          # Extra M4 quote needed to protect [] in grep expression.
26169          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26170          if test "x$FOUND_CORRECT_VERSION" = x; then
26171            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26173            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26174$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26175            BOOT_JDK_FOUND=no
26176          else
26177            # We're done! :-)
26178            BOOT_JDK_FOUND=yes
26179
26180  # Only process if variable expands to non-empty
26181
26182  if test "x$BOOT_JDK" != x; then
26183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26184
26185  # Input might be given as Windows format, start by converting to
26186  # unix format.
26187  path="$BOOT_JDK"
26188  new_path=`$CYGPATH -u "$path"`
26189
26190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26193  # "foo.exe" is OK but "foo" is an error.
26194  #
26195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26196  # It is also a way to make sure we got the proper file name for the real test later on.
26197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26198  if test "x$test_shortpath" = x; then
26199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26201    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26202  fi
26203
26204  # Call helper function which possibly converts this using DOS-style short mode.
26205  # If so, the updated path is stored in $new_path.
26206
26207  input_path="$new_path"
26208  # Check if we need to convert this using DOS-style short mode. If the path
26209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26210  # take no chances and rewrite it.
26211  # Note: m4 eats our [], so we need to use [ and ] instead.
26212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26213  if test "x$has_forbidden_chars" != x; then
26214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26218      # Going to short mode and back again did indeed matter. Since short mode is
26219      # case insensitive, let's make it lowercase to improve readability.
26220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26221      # Now convert it back to Unix-style (cygpath)
26222      input_path=`$CYGPATH -u "$shortmode_path"`
26223      new_path="$input_path"
26224    fi
26225  fi
26226
26227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26228  if test "x$test_cygdrive_prefix" = x; then
26229    # As a simple fix, exclude /usr/bin since it's not a real path.
26230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26232      # a path prefixed by /cygdrive for fixpath to work.
26233      new_path="$CYGWIN_ROOT_PATH$input_path"
26234    fi
26235  fi
26236
26237
26238  if test "x$path" != "x$new_path"; then
26239    BOOT_JDK="$new_path"
26240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26242  fi
26243
26244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26245
26246  path="$BOOT_JDK"
26247  has_colon=`$ECHO $path | $GREP ^.:`
26248  new_path="$path"
26249  if test "x$has_colon" = x; then
26250    # Not in mixed or Windows style, start by that.
26251    new_path=`cmd //c echo $path`
26252  fi
26253
26254
26255  input_path="$new_path"
26256  # Check if we need to convert this using DOS-style short mode. If the path
26257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26258  # take no chances and rewrite it.
26259  # Note: m4 eats our [], so we need to use [ and ] instead.
26260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26261  if test "x$has_forbidden_chars" != x; then
26262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26264  fi
26265
26266
26267  windows_path="$new_path"
26268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26269    unix_path=`$CYGPATH -u "$windows_path"`
26270    new_path="$unix_path"
26271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26273    new_path="$unix_path"
26274  fi
26275
26276  if test "x$path" != "x$new_path"; then
26277    BOOT_JDK="$new_path"
26278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26280  fi
26281
26282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26284
26285    else
26286      # We're on a unix platform. Hooray! :)
26287      path="$BOOT_JDK"
26288      has_space=`$ECHO "$path" | $GREP " "`
26289      if test "x$has_space" != x; then
26290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26293      fi
26294
26295      # Use eval to expand a potential ~
26296      eval path="$path"
26297      if test ! -f "$path" && test ! -d "$path"; then
26298        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26299      fi
26300
26301      if test -d "$path"; then
26302        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26303      else
26304        dir="`$DIRNAME "$path"`"
26305        base="`$BASENAME "$path"`"
26306        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26307      fi
26308    fi
26309  fi
26310
26311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26312$as_echo_n "checking for Boot JDK... " >&6; }
26313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26314$as_echo "$BOOT_JDK" >&6; }
26315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26316$as_echo_n "checking Boot JDK version... " >&6; }
26317            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26319$as_echo "$BOOT_JDK_VERSION" >&6; }
26320          fi # end check jdk version
26321        fi # end check javac
26322      fi # end check java
26323    fi # end check boot jdk found
26324  fi
26325
26326    done
26327  fi
26328
26329  fi
26330
26331
26332    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26333    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26334      # Do we have a bin/java?
26335      if test ! -x "$BOOT_JDK/bin/java"; then
26336        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26338        BOOT_JDK_FOUND=no
26339      else
26340        # Do we have a bin/javac?
26341        if test ! -x "$BOOT_JDK/bin/javac"; then
26342          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26344          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26345$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26346          BOOT_JDK_FOUND=no
26347        else
26348          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26349          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26350
26351          # Extra M4 quote needed to protect [] in grep expression.
26352          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26353          if test "x$FOUND_CORRECT_VERSION" = x; then
26354            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26356            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26357$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26358            BOOT_JDK_FOUND=no
26359          else
26360            # We're done! :-)
26361            BOOT_JDK_FOUND=yes
26362
26363  # Only process if variable expands to non-empty
26364
26365  if test "x$BOOT_JDK" != x; then
26366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26367
26368  # Input might be given as Windows format, start by converting to
26369  # unix format.
26370  path="$BOOT_JDK"
26371  new_path=`$CYGPATH -u "$path"`
26372
26373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26376  # "foo.exe" is OK but "foo" is an error.
26377  #
26378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26379  # It is also a way to make sure we got the proper file name for the real test later on.
26380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26381  if test "x$test_shortpath" = x; then
26382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26384    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26385  fi
26386
26387  # Call helper function which possibly converts this using DOS-style short mode.
26388  # If so, the updated path is stored in $new_path.
26389
26390  input_path="$new_path"
26391  # Check if we need to convert this using DOS-style short mode. If the path
26392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26393  # take no chances and rewrite it.
26394  # Note: m4 eats our [], so we need to use [ and ] instead.
26395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26396  if test "x$has_forbidden_chars" != x; then
26397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26401      # Going to short mode and back again did indeed matter. Since short mode is
26402      # case insensitive, let's make it lowercase to improve readability.
26403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26404      # Now convert it back to Unix-style (cygpath)
26405      input_path=`$CYGPATH -u "$shortmode_path"`
26406      new_path="$input_path"
26407    fi
26408  fi
26409
26410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26411  if test "x$test_cygdrive_prefix" = x; then
26412    # As a simple fix, exclude /usr/bin since it's not a real path.
26413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26415      # a path prefixed by /cygdrive for fixpath to work.
26416      new_path="$CYGWIN_ROOT_PATH$input_path"
26417    fi
26418  fi
26419
26420
26421  if test "x$path" != "x$new_path"; then
26422    BOOT_JDK="$new_path"
26423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26424$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26425  fi
26426
26427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26428
26429  path="$BOOT_JDK"
26430  has_colon=`$ECHO $path | $GREP ^.:`
26431  new_path="$path"
26432  if test "x$has_colon" = x; then
26433    # Not in mixed or Windows style, start by that.
26434    new_path=`cmd //c echo $path`
26435  fi
26436
26437
26438  input_path="$new_path"
26439  # Check if we need to convert this using DOS-style short mode. If the path
26440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26441  # take no chances and rewrite it.
26442  # Note: m4 eats our [], so we need to use [ and ] instead.
26443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26444  if test "x$has_forbidden_chars" != x; then
26445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26447  fi
26448
26449
26450  windows_path="$new_path"
26451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26452    unix_path=`$CYGPATH -u "$windows_path"`
26453    new_path="$unix_path"
26454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26456    new_path="$unix_path"
26457  fi
26458
26459  if test "x$path" != "x$new_path"; then
26460    BOOT_JDK="$new_path"
26461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26462$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26463  fi
26464
26465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26467
26468    else
26469      # We're on a unix platform. Hooray! :)
26470      path="$BOOT_JDK"
26471      has_space=`$ECHO "$path" | $GREP " "`
26472      if test "x$has_space" != x; then
26473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26475        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26476      fi
26477
26478      # Use eval to expand a potential ~
26479      eval path="$path"
26480      if test ! -f "$path" && test ! -d "$path"; then
26481        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26482      fi
26483
26484      if test -d "$path"; then
26485        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26486      else
26487        dir="`$DIRNAME "$path"`"
26488        base="`$BASENAME "$path"`"
26489        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26490      fi
26491    fi
26492  fi
26493
26494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26495$as_echo_n "checking for Boot JDK... " >&6; }
26496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26497$as_echo "$BOOT_JDK" >&6; }
26498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26499$as_echo_n "checking Boot JDK version... " >&6; }
26500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26502$as_echo "$BOOT_JDK_VERSION" >&6; }
26503          fi # end check jdk version
26504        fi # end check javac
26505      fi # end check java
26506    fi # end check boot jdk found
26507  fi
26508
26509
26510  if test "x$BOOT_JDK_FOUND" = xno; then
26511    # Now execute the test
26512
26513  if test "x$PROGRAMW6432" != x; then
26514    VIRTUAL_DIR="$PROGRAMW6432/Java"
26515
26516  windows_path="$VIRTUAL_DIR"
26517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26518    unix_path=`$CYGPATH -u "$windows_path"`
26519    VIRTUAL_DIR="$unix_path"
26520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26522    VIRTUAL_DIR="$unix_path"
26523  fi
26524
26525
26526  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26527  BOOT_JDK_SUFFIX=""
26528  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26529  if test "x$ALL_JDKS_FOUND" != x; then
26530    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26531
26532  if test "x$BOOT_JDK_FOUND" = xno; then
26533    # Now execute the test
26534
26535        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26536        if test -d "$BOOT_JDK"; then
26537          BOOT_JDK_FOUND=maybe
26538          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26539$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26540        fi
26541
26542
26543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26545      # Do we have a bin/java?
26546      if test ! -x "$BOOT_JDK/bin/java"; then
26547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26549        BOOT_JDK_FOUND=no
26550      else
26551        # Do we have a bin/javac?
26552        if test ! -x "$BOOT_JDK/bin/javac"; then
26553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26557          BOOT_JDK_FOUND=no
26558        else
26559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26561
26562          # Extra M4 quote needed to protect [] in grep expression.
26563          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26564          if test "x$FOUND_CORRECT_VERSION" = x; then
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26569            BOOT_JDK_FOUND=no
26570          else
26571            # We're done! :-)
26572            BOOT_JDK_FOUND=yes
26573
26574  # Only process if variable expands to non-empty
26575
26576  if test "x$BOOT_JDK" != x; then
26577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26578
26579  # Input might be given as Windows format, start by converting to
26580  # unix format.
26581  path="$BOOT_JDK"
26582  new_path=`$CYGPATH -u "$path"`
26583
26584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26587  # "foo.exe" is OK but "foo" is an error.
26588  #
26589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26590  # It is also a way to make sure we got the proper file name for the real test later on.
26591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26592  if test "x$test_shortpath" = x; then
26593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26596  fi
26597
26598  # Call helper function which possibly converts this using DOS-style short mode.
26599  # If so, the updated path is stored in $new_path.
26600
26601  input_path="$new_path"
26602  # Check if we need to convert this using DOS-style short mode. If the path
26603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26604  # take no chances and rewrite it.
26605  # Note: m4 eats our [], so we need to use [ and ] instead.
26606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26607  if test "x$has_forbidden_chars" != x; then
26608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26612      # Going to short mode and back again did indeed matter. Since short mode is
26613      # case insensitive, let's make it lowercase to improve readability.
26614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26615      # Now convert it back to Unix-style (cygpath)
26616      input_path=`$CYGPATH -u "$shortmode_path"`
26617      new_path="$input_path"
26618    fi
26619  fi
26620
26621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26622  if test "x$test_cygdrive_prefix" = x; then
26623    # As a simple fix, exclude /usr/bin since it's not a real path.
26624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26626      # a path prefixed by /cygdrive for fixpath to work.
26627      new_path="$CYGWIN_ROOT_PATH$input_path"
26628    fi
26629  fi
26630
26631
26632  if test "x$path" != "x$new_path"; then
26633    BOOT_JDK="$new_path"
26634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26636  fi
26637
26638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26639
26640  path="$BOOT_JDK"
26641  has_colon=`$ECHO $path | $GREP ^.:`
26642  new_path="$path"
26643  if test "x$has_colon" = x; then
26644    # Not in mixed or Windows style, start by that.
26645    new_path=`cmd //c echo $path`
26646  fi
26647
26648
26649  input_path="$new_path"
26650  # Check if we need to convert this using DOS-style short mode. If the path
26651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26652  # take no chances and rewrite it.
26653  # Note: m4 eats our [], so we need to use [ and ] instead.
26654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26655  if test "x$has_forbidden_chars" != x; then
26656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26658  fi
26659
26660
26661  windows_path="$new_path"
26662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26663    unix_path=`$CYGPATH -u "$windows_path"`
26664    new_path="$unix_path"
26665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26667    new_path="$unix_path"
26668  fi
26669
26670  if test "x$path" != "x$new_path"; then
26671    BOOT_JDK="$new_path"
26672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26674  fi
26675
26676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26678
26679    else
26680      # We're on a unix platform. Hooray! :)
26681      path="$BOOT_JDK"
26682      has_space=`$ECHO "$path" | $GREP " "`
26683      if test "x$has_space" != x; then
26684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26687      fi
26688
26689      # Use eval to expand a potential ~
26690      eval path="$path"
26691      if test ! -f "$path" && test ! -d "$path"; then
26692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26693      fi
26694
26695      if test -d "$path"; then
26696        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26697      else
26698        dir="`$DIRNAME "$path"`"
26699        base="`$BASENAME "$path"`"
26700        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26701      fi
26702    fi
26703  fi
26704
26705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26706$as_echo_n "checking for Boot JDK... " >&6; }
26707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26708$as_echo "$BOOT_JDK" >&6; }
26709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26710$as_echo_n "checking Boot JDK version... " >&6; }
26711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26713$as_echo "$BOOT_JDK_VERSION" >&6; }
26714          fi # end check jdk version
26715        fi # end check javac
26716      fi # end check java
26717    fi # end check boot jdk found
26718  fi
26719
26720    done
26721  fi
26722
26723  fi
26724
26725
26726    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26727    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26728      # Do we have a bin/java?
26729      if test ! -x "$BOOT_JDK/bin/java"; then
26730        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26732        BOOT_JDK_FOUND=no
26733      else
26734        # Do we have a bin/javac?
26735        if test ! -x "$BOOT_JDK/bin/javac"; then
26736          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26738          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26739$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26740          BOOT_JDK_FOUND=no
26741        else
26742          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26743          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26744
26745          # Extra M4 quote needed to protect [] in grep expression.
26746          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26747          if test "x$FOUND_CORRECT_VERSION" = x; then
26748            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26750            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26751$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26752            BOOT_JDK_FOUND=no
26753          else
26754            # We're done! :-)
26755            BOOT_JDK_FOUND=yes
26756
26757  # Only process if variable expands to non-empty
26758
26759  if test "x$BOOT_JDK" != x; then
26760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26761
26762  # Input might be given as Windows format, start by converting to
26763  # unix format.
26764  path="$BOOT_JDK"
26765  new_path=`$CYGPATH -u "$path"`
26766
26767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26770  # "foo.exe" is OK but "foo" is an error.
26771  #
26772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26773  # It is also a way to make sure we got the proper file name for the real test later on.
26774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26775  if test "x$test_shortpath" = x; then
26776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26778    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26779  fi
26780
26781  # Call helper function which possibly converts this using DOS-style short mode.
26782  # If so, the updated path is stored in $new_path.
26783
26784  input_path="$new_path"
26785  # Check if we need to convert this using DOS-style short mode. If the path
26786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26787  # take no chances and rewrite it.
26788  # Note: m4 eats our [], so we need to use [ and ] instead.
26789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26790  if test "x$has_forbidden_chars" != x; then
26791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26795      # Going to short mode and back again did indeed matter. Since short mode is
26796      # case insensitive, let's make it lowercase to improve readability.
26797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26798      # Now convert it back to Unix-style (cygpath)
26799      input_path=`$CYGPATH -u "$shortmode_path"`
26800      new_path="$input_path"
26801    fi
26802  fi
26803
26804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26805  if test "x$test_cygdrive_prefix" = x; then
26806    # As a simple fix, exclude /usr/bin since it's not a real path.
26807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26809      # a path prefixed by /cygdrive for fixpath to work.
26810      new_path="$CYGWIN_ROOT_PATH$input_path"
26811    fi
26812  fi
26813
26814
26815  if test "x$path" != "x$new_path"; then
26816    BOOT_JDK="$new_path"
26817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26819  fi
26820
26821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822
26823  path="$BOOT_JDK"
26824  has_colon=`$ECHO $path | $GREP ^.:`
26825  new_path="$path"
26826  if test "x$has_colon" = x; then
26827    # Not in mixed or Windows style, start by that.
26828    new_path=`cmd //c echo $path`
26829  fi
26830
26831
26832  input_path="$new_path"
26833  # Check if we need to convert this using DOS-style short mode. If the path
26834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26835  # take no chances and rewrite it.
26836  # Note: m4 eats our [], so we need to use [ and ] instead.
26837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26838  if test "x$has_forbidden_chars" != x; then
26839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26841  fi
26842
26843
26844  windows_path="$new_path"
26845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26846    unix_path=`$CYGPATH -u "$windows_path"`
26847    new_path="$unix_path"
26848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26850    new_path="$unix_path"
26851  fi
26852
26853  if test "x$path" != "x$new_path"; then
26854    BOOT_JDK="$new_path"
26855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26857  fi
26858
26859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26861
26862    else
26863      # We're on a unix platform. Hooray! :)
26864      path="$BOOT_JDK"
26865      has_space=`$ECHO "$path" | $GREP " "`
26866      if test "x$has_space" != x; then
26867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26870      fi
26871
26872      # Use eval to expand a potential ~
26873      eval path="$path"
26874      if test ! -f "$path" && test ! -d "$path"; then
26875        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26876      fi
26877
26878      if test -d "$path"; then
26879        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26880      else
26881        dir="`$DIRNAME "$path"`"
26882        base="`$BASENAME "$path"`"
26883        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26884      fi
26885    fi
26886  fi
26887
26888            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26889$as_echo_n "checking for Boot JDK... " >&6; }
26890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26891$as_echo "$BOOT_JDK" >&6; }
26892            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26893$as_echo_n "checking Boot JDK version... " >&6; }
26894            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26896$as_echo "$BOOT_JDK_VERSION" >&6; }
26897          fi # end check jdk version
26898        fi # end check javac
26899      fi # end check java
26900    fi # end check boot jdk found
26901  fi
26902
26903
26904  if test "x$BOOT_JDK_FOUND" = xno; then
26905    # Now execute the test
26906
26907  if test "x$PROGRAMFILES" != x; then
26908    VIRTUAL_DIR="$PROGRAMFILES/Java"
26909
26910  windows_path="$VIRTUAL_DIR"
26911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26912    unix_path=`$CYGPATH -u "$windows_path"`
26913    VIRTUAL_DIR="$unix_path"
26914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26916    VIRTUAL_DIR="$unix_path"
26917  fi
26918
26919
26920  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26921  BOOT_JDK_SUFFIX=""
26922  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26923  if test "x$ALL_JDKS_FOUND" != x; then
26924    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26925
26926  if test "x$BOOT_JDK_FOUND" = xno; then
26927    # Now execute the test
26928
26929        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26930        if test -d "$BOOT_JDK"; then
26931          BOOT_JDK_FOUND=maybe
26932          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26933$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26934        fi
26935
26936
26937    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26938    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26939      # Do we have a bin/java?
26940      if test ! -x "$BOOT_JDK/bin/java"; then
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26943        BOOT_JDK_FOUND=no
26944      else
26945        # Do we have a bin/javac?
26946        if test ! -x "$BOOT_JDK/bin/javac"; then
26947          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26949          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26950$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26951          BOOT_JDK_FOUND=no
26952        else
26953          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26954          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26955
26956          # Extra M4 quote needed to protect [] in grep expression.
26957          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26958          if test "x$FOUND_CORRECT_VERSION" = x; then
26959            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26961            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26962$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26963            BOOT_JDK_FOUND=no
26964          else
26965            # We're done! :-)
26966            BOOT_JDK_FOUND=yes
26967
26968  # Only process if variable expands to non-empty
26969
26970  if test "x$BOOT_JDK" != x; then
26971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26972
26973  # Input might be given as Windows format, start by converting to
26974  # unix format.
26975  path="$BOOT_JDK"
26976  new_path=`$CYGPATH -u "$path"`
26977
26978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26981  # "foo.exe" is OK but "foo" is an error.
26982  #
26983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26984  # It is also a way to make sure we got the proper file name for the real test later on.
26985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26986  if test "x$test_shortpath" = x; then
26987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26989    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26990  fi
26991
26992  # Call helper function which possibly converts this using DOS-style short mode.
26993  # If so, the updated path is stored in $new_path.
26994
26995  input_path="$new_path"
26996  # Check if we need to convert this using DOS-style short mode. If the path
26997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26998  # take no chances and rewrite it.
26999  # Note: m4 eats our [], so we need to use [ and ] instead.
27000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27001  if test "x$has_forbidden_chars" != x; then
27002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27006      # Going to short mode and back again did indeed matter. Since short mode is
27007      # case insensitive, let's make it lowercase to improve readability.
27008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27009      # Now convert it back to Unix-style (cygpath)
27010      input_path=`$CYGPATH -u "$shortmode_path"`
27011      new_path="$input_path"
27012    fi
27013  fi
27014
27015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27016  if test "x$test_cygdrive_prefix" = x; then
27017    # As a simple fix, exclude /usr/bin since it's not a real path.
27018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27020      # a path prefixed by /cygdrive for fixpath to work.
27021      new_path="$CYGWIN_ROOT_PATH$input_path"
27022    fi
27023  fi
27024
27025
27026  if test "x$path" != "x$new_path"; then
27027    BOOT_JDK="$new_path"
27028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27030  fi
27031
27032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27033
27034  path="$BOOT_JDK"
27035  has_colon=`$ECHO $path | $GREP ^.:`
27036  new_path="$path"
27037  if test "x$has_colon" = x; then
27038    # Not in mixed or Windows style, start by that.
27039    new_path=`cmd //c echo $path`
27040  fi
27041
27042
27043  input_path="$new_path"
27044  # Check if we need to convert this using DOS-style short mode. If the path
27045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27046  # take no chances and rewrite it.
27047  # Note: m4 eats our [], so we need to use [ and ] instead.
27048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27049  if test "x$has_forbidden_chars" != x; then
27050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27052  fi
27053
27054
27055  windows_path="$new_path"
27056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27057    unix_path=`$CYGPATH -u "$windows_path"`
27058    new_path="$unix_path"
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27061    new_path="$unix_path"
27062  fi
27063
27064  if test "x$path" != "x$new_path"; then
27065    BOOT_JDK="$new_path"
27066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27068  fi
27069
27070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27072
27073    else
27074      # We're on a unix platform. Hooray! :)
27075      path="$BOOT_JDK"
27076      has_space=`$ECHO "$path" | $GREP " "`
27077      if test "x$has_space" != x; then
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27081      fi
27082
27083      # Use eval to expand a potential ~
27084      eval path="$path"
27085      if test ! -f "$path" && test ! -d "$path"; then
27086        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27087      fi
27088
27089      if test -d "$path"; then
27090        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27091      else
27092        dir="`$DIRNAME "$path"`"
27093        base="`$BASENAME "$path"`"
27094        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27095      fi
27096    fi
27097  fi
27098
27099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27100$as_echo_n "checking for Boot JDK... " >&6; }
27101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27102$as_echo "$BOOT_JDK" >&6; }
27103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27104$as_echo_n "checking Boot JDK version... " >&6; }
27105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27107$as_echo "$BOOT_JDK_VERSION" >&6; }
27108          fi # end check jdk version
27109        fi # end check javac
27110      fi # end check java
27111    fi # end check boot jdk found
27112  fi
27113
27114    done
27115  fi
27116
27117  fi
27118
27119
27120    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27121    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27122      # Do we have a bin/java?
27123      if test ! -x "$BOOT_JDK/bin/java"; then
27124        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27126        BOOT_JDK_FOUND=no
27127      else
27128        # Do we have a bin/javac?
27129        if test ! -x "$BOOT_JDK/bin/javac"; then
27130          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27132          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27133$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27134          BOOT_JDK_FOUND=no
27135        else
27136          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27137          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27138
27139          # Extra M4 quote needed to protect [] in grep expression.
27140          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27141          if test "x$FOUND_CORRECT_VERSION" = x; then
27142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27144            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27145$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27146            BOOT_JDK_FOUND=no
27147          else
27148            # We're done! :-)
27149            BOOT_JDK_FOUND=yes
27150
27151  # Only process if variable expands to non-empty
27152
27153  if test "x$BOOT_JDK" != x; then
27154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27155
27156  # Input might be given as Windows format, start by converting to
27157  # unix format.
27158  path="$BOOT_JDK"
27159  new_path=`$CYGPATH -u "$path"`
27160
27161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27164  # "foo.exe" is OK but "foo" is an error.
27165  #
27166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27167  # It is also a way to make sure we got the proper file name for the real test later on.
27168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27169  if test "x$test_shortpath" = x; then
27170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27172    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27173  fi
27174
27175  # Call helper function which possibly converts this using DOS-style short mode.
27176  # If so, the updated path is stored in $new_path.
27177
27178  input_path="$new_path"
27179  # Check if we need to convert this using DOS-style short mode. If the path
27180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27181  # take no chances and rewrite it.
27182  # Note: m4 eats our [], so we need to use [ and ] instead.
27183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27184  if test "x$has_forbidden_chars" != x; then
27185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27189      # Going to short mode and back again did indeed matter. Since short mode is
27190      # case insensitive, let's make it lowercase to improve readability.
27191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27192      # Now convert it back to Unix-style (cygpath)
27193      input_path=`$CYGPATH -u "$shortmode_path"`
27194      new_path="$input_path"
27195    fi
27196  fi
27197
27198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27199  if test "x$test_cygdrive_prefix" = x; then
27200    # As a simple fix, exclude /usr/bin since it's not a real path.
27201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27203      # a path prefixed by /cygdrive for fixpath to work.
27204      new_path="$CYGWIN_ROOT_PATH$input_path"
27205    fi
27206  fi
27207
27208
27209  if test "x$path" != "x$new_path"; then
27210    BOOT_JDK="$new_path"
27211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27213  fi
27214
27215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27216
27217  path="$BOOT_JDK"
27218  has_colon=`$ECHO $path | $GREP ^.:`
27219  new_path="$path"
27220  if test "x$has_colon" = x; then
27221    # Not in mixed or Windows style, start by that.
27222    new_path=`cmd //c echo $path`
27223  fi
27224
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27235  fi
27236
27237
27238  windows_path="$new_path"
27239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27240    unix_path=`$CYGPATH -u "$windows_path"`
27241    new_path="$unix_path"
27242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27244    new_path="$unix_path"
27245  fi
27246
27247  if test "x$path" != "x$new_path"; then
27248    BOOT_JDK="$new_path"
27249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27251  fi
27252
27253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27255
27256    else
27257      # We're on a unix platform. Hooray! :)
27258      path="$BOOT_JDK"
27259      has_space=`$ECHO "$path" | $GREP " "`
27260      if test "x$has_space" != x; then
27261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27262$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27264      fi
27265
27266      # Use eval to expand a potential ~
27267      eval path="$path"
27268      if test ! -f "$path" && test ! -d "$path"; then
27269        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27270      fi
27271
27272      if test -d "$path"; then
27273        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27274      else
27275        dir="`$DIRNAME "$path"`"
27276        base="`$BASENAME "$path"`"
27277        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27278      fi
27279    fi
27280  fi
27281
27282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27283$as_echo_n "checking for Boot JDK... " >&6; }
27284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27285$as_echo "$BOOT_JDK" >&6; }
27286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27287$as_echo_n "checking Boot JDK version... " >&6; }
27288            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27290$as_echo "$BOOT_JDK_VERSION" >&6; }
27291          fi # end check jdk version
27292        fi # end check javac
27293      fi # end check java
27294    fi # end check boot jdk found
27295  fi
27296
27297
27298  if test "x$BOOT_JDK_FOUND" = xno; then
27299    # Now execute the test
27300
27301  if test "x$ProgramFiles" != x; then
27302    VIRTUAL_DIR="$ProgramFiles/Java"
27303
27304  windows_path="$VIRTUAL_DIR"
27305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27306    unix_path=`$CYGPATH -u "$windows_path"`
27307    VIRTUAL_DIR="$unix_path"
27308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27310    VIRTUAL_DIR="$unix_path"
27311  fi
27312
27313
27314  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27315  BOOT_JDK_SUFFIX=""
27316  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27317  if test "x$ALL_JDKS_FOUND" != x; then
27318    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27319
27320  if test "x$BOOT_JDK_FOUND" = xno; then
27321    # Now execute the test
27322
27323        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27324        if test -d "$BOOT_JDK"; then
27325          BOOT_JDK_FOUND=maybe
27326          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27327$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27328        fi
27329
27330
27331    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27332    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27333      # Do we have a bin/java?
27334      if test ! -x "$BOOT_JDK/bin/java"; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27337        BOOT_JDK_FOUND=no
27338      else
27339        # Do we have a bin/javac?
27340        if test ! -x "$BOOT_JDK/bin/javac"; then
27341          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27343          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27344$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27345          BOOT_JDK_FOUND=no
27346        else
27347          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27348          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27349
27350          # Extra M4 quote needed to protect [] in grep expression.
27351          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27352          if test "x$FOUND_CORRECT_VERSION" = x; then
27353            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27355            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27356$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27357            BOOT_JDK_FOUND=no
27358          else
27359            # We're done! :-)
27360            BOOT_JDK_FOUND=yes
27361
27362  # Only process if variable expands to non-empty
27363
27364  if test "x$BOOT_JDK" != x; then
27365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27366
27367  # Input might be given as Windows format, start by converting to
27368  # unix format.
27369  path="$BOOT_JDK"
27370  new_path=`$CYGPATH -u "$path"`
27371
27372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27375  # "foo.exe" is OK but "foo" is an error.
27376  #
27377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27378  # It is also a way to make sure we got the proper file name for the real test later on.
27379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27380  if test "x$test_shortpath" = x; then
27381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27383    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27384  fi
27385
27386  # Call helper function which possibly converts this using DOS-style short mode.
27387  # If so, the updated path is stored in $new_path.
27388
27389  input_path="$new_path"
27390  # Check if we need to convert this using DOS-style short mode. If the path
27391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27392  # take no chances and rewrite it.
27393  # Note: m4 eats our [], so we need to use [ and ] instead.
27394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27395  if test "x$has_forbidden_chars" != x; then
27396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27400      # Going to short mode and back again did indeed matter. Since short mode is
27401      # case insensitive, let's make it lowercase to improve readability.
27402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27403      # Now convert it back to Unix-style (cygpath)
27404      input_path=`$CYGPATH -u "$shortmode_path"`
27405      new_path="$input_path"
27406    fi
27407  fi
27408
27409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27410  if test "x$test_cygdrive_prefix" = x; then
27411    # As a simple fix, exclude /usr/bin since it's not a real path.
27412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27414      # a path prefixed by /cygdrive for fixpath to work.
27415      new_path="$CYGWIN_ROOT_PATH$input_path"
27416    fi
27417  fi
27418
27419
27420  if test "x$path" != "x$new_path"; then
27421    BOOT_JDK="$new_path"
27422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27424  fi
27425
27426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27427
27428  path="$BOOT_JDK"
27429  has_colon=`$ECHO $path | $GREP ^.:`
27430  new_path="$path"
27431  if test "x$has_colon" = x; then
27432    # Not in mixed or Windows style, start by that.
27433    new_path=`cmd //c echo $path`
27434  fi
27435
27436
27437  input_path="$new_path"
27438  # Check if we need to convert this using DOS-style short mode. If the path
27439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27440  # take no chances and rewrite it.
27441  # Note: m4 eats our [], so we need to use [ and ] instead.
27442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27443  if test "x$has_forbidden_chars" != x; then
27444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27446  fi
27447
27448
27449  windows_path="$new_path"
27450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27451    unix_path=`$CYGPATH -u "$windows_path"`
27452    new_path="$unix_path"
27453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27455    new_path="$unix_path"
27456  fi
27457
27458  if test "x$path" != "x$new_path"; then
27459    BOOT_JDK="$new_path"
27460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27462  fi
27463
27464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27466
27467    else
27468      # We're on a unix platform. Hooray! :)
27469      path="$BOOT_JDK"
27470      has_space=`$ECHO "$path" | $GREP " "`
27471      if test "x$has_space" != x; then
27472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27475      fi
27476
27477      # Use eval to expand a potential ~
27478      eval path="$path"
27479      if test ! -f "$path" && test ! -d "$path"; then
27480        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27481      fi
27482
27483      if test -d "$path"; then
27484        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27485      else
27486        dir="`$DIRNAME "$path"`"
27487        base="`$BASENAME "$path"`"
27488        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27489      fi
27490    fi
27491  fi
27492
27493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27494$as_echo_n "checking for Boot JDK... " >&6; }
27495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27496$as_echo "$BOOT_JDK" >&6; }
27497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27498$as_echo_n "checking Boot JDK version... " >&6; }
27499            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27501$as_echo "$BOOT_JDK_VERSION" >&6; }
27502          fi # end check jdk version
27503        fi # end check javac
27504      fi # end check java
27505    fi # end check boot jdk found
27506  fi
27507
27508    done
27509  fi
27510
27511  fi
27512
27513
27514    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27515    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27516      # Do we have a bin/java?
27517      if test ! -x "$BOOT_JDK/bin/java"; then
27518        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27520        BOOT_JDK_FOUND=no
27521      else
27522        # Do we have a bin/javac?
27523        if test ! -x "$BOOT_JDK/bin/javac"; then
27524          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27526          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27527$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27528          BOOT_JDK_FOUND=no
27529        else
27530          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27531          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27532
27533          # Extra M4 quote needed to protect [] in grep expression.
27534          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27535          if test "x$FOUND_CORRECT_VERSION" = x; then
27536            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27538            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27539$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27540            BOOT_JDK_FOUND=no
27541          else
27542            # We're done! :-)
27543            BOOT_JDK_FOUND=yes
27544
27545  # Only process if variable expands to non-empty
27546
27547  if test "x$BOOT_JDK" != x; then
27548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549
27550  # Input might be given as Windows format, start by converting to
27551  # unix format.
27552  path="$BOOT_JDK"
27553  new_path=`$CYGPATH -u "$path"`
27554
27555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27558  # "foo.exe" is OK but "foo" is an error.
27559  #
27560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27561  # It is also a way to make sure we got the proper file name for the real test later on.
27562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27563  if test "x$test_shortpath" = x; then
27564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27566    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27567  fi
27568
27569  # Call helper function which possibly converts this using DOS-style short mode.
27570  # If so, the updated path is stored in $new_path.
27571
27572  input_path="$new_path"
27573  # Check if we need to convert this using DOS-style short mode. If the path
27574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27575  # take no chances and rewrite it.
27576  # Note: m4 eats our [], so we need to use [ and ] instead.
27577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27578  if test "x$has_forbidden_chars" != x; then
27579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27583      # Going to short mode and back again did indeed matter. Since short mode is
27584      # case insensitive, let's make it lowercase to improve readability.
27585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27586      # Now convert it back to Unix-style (cygpath)
27587      input_path=`$CYGPATH -u "$shortmode_path"`
27588      new_path="$input_path"
27589    fi
27590  fi
27591
27592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27593  if test "x$test_cygdrive_prefix" = x; then
27594    # As a simple fix, exclude /usr/bin since it's not a real path.
27595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27597      # a path prefixed by /cygdrive for fixpath to work.
27598      new_path="$CYGWIN_ROOT_PATH$input_path"
27599    fi
27600  fi
27601
27602
27603  if test "x$path" != "x$new_path"; then
27604    BOOT_JDK="$new_path"
27605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27607  fi
27608
27609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27610
27611  path="$BOOT_JDK"
27612  has_colon=`$ECHO $path | $GREP ^.:`
27613  new_path="$path"
27614  if test "x$has_colon" = x; then
27615    # Not in mixed or Windows style, start by that.
27616    new_path=`cmd //c echo $path`
27617  fi
27618
27619
27620  input_path="$new_path"
27621  # Check if we need to convert this using DOS-style short mode. If the path
27622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27623  # take no chances and rewrite it.
27624  # Note: m4 eats our [], so we need to use [ and ] instead.
27625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27626  if test "x$has_forbidden_chars" != x; then
27627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27629  fi
27630
27631
27632  windows_path="$new_path"
27633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27634    unix_path=`$CYGPATH -u "$windows_path"`
27635    new_path="$unix_path"
27636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27638    new_path="$unix_path"
27639  fi
27640
27641  if test "x$path" != "x$new_path"; then
27642    BOOT_JDK="$new_path"
27643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27644$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27645  fi
27646
27647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27649
27650    else
27651      # We're on a unix platform. Hooray! :)
27652      path="$BOOT_JDK"
27653      has_space=`$ECHO "$path" | $GREP " "`
27654      if test "x$has_space" != x; then
27655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27658      fi
27659
27660      # Use eval to expand a potential ~
27661      eval path="$path"
27662      if test ! -f "$path" && test ! -d "$path"; then
27663        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27664      fi
27665
27666      if test -d "$path"; then
27667        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27668      else
27669        dir="`$DIRNAME "$path"`"
27670        base="`$BASENAME "$path"`"
27671        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27672      fi
27673    fi
27674  fi
27675
27676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27677$as_echo_n "checking for Boot JDK... " >&6; }
27678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27679$as_echo "$BOOT_JDK" >&6; }
27680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27681$as_echo_n "checking Boot JDK version... " >&6; }
27682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27684$as_echo "$BOOT_JDK_VERSION" >&6; }
27685          fi # end check jdk version
27686        fi # end check javac
27687      fi # end check java
27688    fi # end check boot jdk found
27689  fi
27690
27691
27692  if test "x$BOOT_JDK_FOUND" = xno; then
27693    # Now execute the test
27694
27695  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27696  BOOT_JDK_SUFFIX=""
27697  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27698  if test "x$ALL_JDKS_FOUND" != x; then
27699    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27700
27701  if test "x$BOOT_JDK_FOUND" = xno; then
27702    # Now execute the test
27703
27704        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27705        if test -d "$BOOT_JDK"; then
27706          BOOT_JDK_FOUND=maybe
27707          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27708$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27709        fi
27710
27711
27712    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27713    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27714      # Do we have a bin/java?
27715      if test ! -x "$BOOT_JDK/bin/java"; then
27716        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27718        BOOT_JDK_FOUND=no
27719      else
27720        # Do we have a bin/javac?
27721        if test ! -x "$BOOT_JDK/bin/javac"; then
27722          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27724          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27725$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27726          BOOT_JDK_FOUND=no
27727        else
27728          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27729          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27730
27731          # Extra M4 quote needed to protect [] in grep expression.
27732          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27733          if test "x$FOUND_CORRECT_VERSION" = x; then
27734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27736            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27737$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27738            BOOT_JDK_FOUND=no
27739          else
27740            # We're done! :-)
27741            BOOT_JDK_FOUND=yes
27742
27743  # Only process if variable expands to non-empty
27744
27745  if test "x$BOOT_JDK" != x; then
27746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27747
27748  # Input might be given as Windows format, start by converting to
27749  # unix format.
27750  path="$BOOT_JDK"
27751  new_path=`$CYGPATH -u "$path"`
27752
27753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27756  # "foo.exe" is OK but "foo" is an error.
27757  #
27758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27759  # It is also a way to make sure we got the proper file name for the real test later on.
27760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27761  if test "x$test_shortpath" = x; then
27762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27764    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27765  fi
27766
27767  # Call helper function which possibly converts this using DOS-style short mode.
27768  # If so, the updated path is stored in $new_path.
27769
27770  input_path="$new_path"
27771  # Check if we need to convert this using DOS-style short mode. If the path
27772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27773  # take no chances and rewrite it.
27774  # Note: m4 eats our [], so we need to use [ and ] instead.
27775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27776  if test "x$has_forbidden_chars" != x; then
27777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27781      # Going to short mode and back again did indeed matter. Since short mode is
27782      # case insensitive, let's make it lowercase to improve readability.
27783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27784      # Now convert it back to Unix-style (cygpath)
27785      input_path=`$CYGPATH -u "$shortmode_path"`
27786      new_path="$input_path"
27787    fi
27788  fi
27789
27790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27791  if test "x$test_cygdrive_prefix" = x; then
27792    # As a simple fix, exclude /usr/bin since it's not a real path.
27793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27795      # a path prefixed by /cygdrive for fixpath to work.
27796      new_path="$CYGWIN_ROOT_PATH$input_path"
27797    fi
27798  fi
27799
27800
27801  if test "x$path" != "x$new_path"; then
27802    BOOT_JDK="$new_path"
27803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27805  fi
27806
27807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27808
27809  path="$BOOT_JDK"
27810  has_colon=`$ECHO $path | $GREP ^.:`
27811  new_path="$path"
27812  if test "x$has_colon" = x; then
27813    # Not in mixed or Windows style, start by that.
27814    new_path=`cmd //c echo $path`
27815  fi
27816
27817
27818  input_path="$new_path"
27819  # Check if we need to convert this using DOS-style short mode. If the path
27820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27821  # take no chances and rewrite it.
27822  # Note: m4 eats our [], so we need to use [ and ] instead.
27823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27824  if test "x$has_forbidden_chars" != x; then
27825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27827  fi
27828
27829
27830  windows_path="$new_path"
27831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27832    unix_path=`$CYGPATH -u "$windows_path"`
27833    new_path="$unix_path"
27834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27836    new_path="$unix_path"
27837  fi
27838
27839  if test "x$path" != "x$new_path"; then
27840    BOOT_JDK="$new_path"
27841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27843  fi
27844
27845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27847
27848    else
27849      # We're on a unix platform. Hooray! :)
27850      path="$BOOT_JDK"
27851      has_space=`$ECHO "$path" | $GREP " "`
27852      if test "x$has_space" != x; then
27853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27856      fi
27857
27858      # Use eval to expand a potential ~
27859      eval path="$path"
27860      if test ! -f "$path" && test ! -d "$path"; then
27861        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27862      fi
27863
27864      if test -d "$path"; then
27865        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27866      else
27867        dir="`$DIRNAME "$path"`"
27868        base="`$BASENAME "$path"`"
27869        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27870      fi
27871    fi
27872  fi
27873
27874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27875$as_echo_n "checking for Boot JDK... " >&6; }
27876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27877$as_echo "$BOOT_JDK" >&6; }
27878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27879$as_echo_n "checking Boot JDK version... " >&6; }
27880            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27882$as_echo "$BOOT_JDK_VERSION" >&6; }
27883          fi # end check jdk version
27884        fi # end check javac
27885      fi # end check java
27886    fi # end check boot jdk found
27887  fi
27888
27889    done
27890  fi
27891
27892
27893    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27894    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27895      # Do we have a bin/java?
27896      if test ! -x "$BOOT_JDK/bin/java"; then
27897        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27899        BOOT_JDK_FOUND=no
27900      else
27901        # Do we have a bin/javac?
27902        if test ! -x "$BOOT_JDK/bin/javac"; then
27903          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27905          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27906$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27907          BOOT_JDK_FOUND=no
27908        else
27909          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27910          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27911
27912          # Extra M4 quote needed to protect [] in grep expression.
27913          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27914          if test "x$FOUND_CORRECT_VERSION" = x; then
27915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27917            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27918$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27919            BOOT_JDK_FOUND=no
27920          else
27921            # We're done! :-)
27922            BOOT_JDK_FOUND=yes
27923
27924  # Only process if variable expands to non-empty
27925
27926  if test "x$BOOT_JDK" != x; then
27927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928
27929  # Input might be given as Windows format, start by converting to
27930  # unix format.
27931  path="$BOOT_JDK"
27932  new_path=`$CYGPATH -u "$path"`
27933
27934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27937  # "foo.exe" is OK but "foo" is an error.
27938  #
27939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27940  # It is also a way to make sure we got the proper file name for the real test later on.
27941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27942  if test "x$test_shortpath" = x; then
27943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27946  fi
27947
27948  # Call helper function which possibly converts this using DOS-style short mode.
27949  # If so, the updated path is stored in $new_path.
27950
27951  input_path="$new_path"
27952  # Check if we need to convert this using DOS-style short mode. If the path
27953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27954  # take no chances and rewrite it.
27955  # Note: m4 eats our [], so we need to use [ and ] instead.
27956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27957  if test "x$has_forbidden_chars" != x; then
27958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27962      # Going to short mode and back again did indeed matter. Since short mode is
27963      # case insensitive, let's make it lowercase to improve readability.
27964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27965      # Now convert it back to Unix-style (cygpath)
27966      input_path=`$CYGPATH -u "$shortmode_path"`
27967      new_path="$input_path"
27968    fi
27969  fi
27970
27971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27972  if test "x$test_cygdrive_prefix" = x; then
27973    # As a simple fix, exclude /usr/bin since it's not a real path.
27974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27976      # a path prefixed by /cygdrive for fixpath to work.
27977      new_path="$CYGWIN_ROOT_PATH$input_path"
27978    fi
27979  fi
27980
27981
27982  if test "x$path" != "x$new_path"; then
27983    BOOT_JDK="$new_path"
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27986  fi
27987
27988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27989
27990  path="$BOOT_JDK"
27991  has_colon=`$ECHO $path | $GREP ^.:`
27992  new_path="$path"
27993  if test "x$has_colon" = x; then
27994    # Not in mixed or Windows style, start by that.
27995    new_path=`cmd //c echo $path`
27996  fi
27997
27998
27999  input_path="$new_path"
28000  # Check if we need to convert this using DOS-style short mode. If the path
28001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28002  # take no chances and rewrite it.
28003  # Note: m4 eats our [], so we need to use [ and ] instead.
28004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28005  if test "x$has_forbidden_chars" != x; then
28006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28008  fi
28009
28010
28011  windows_path="$new_path"
28012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28013    unix_path=`$CYGPATH -u "$windows_path"`
28014    new_path="$unix_path"
28015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28017    new_path="$unix_path"
28018  fi
28019
28020  if test "x$path" != "x$new_path"; then
28021    BOOT_JDK="$new_path"
28022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28024  fi
28025
28026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28028
28029    else
28030      # We're on a unix platform. Hooray! :)
28031      path="$BOOT_JDK"
28032      has_space=`$ECHO "$path" | $GREP " "`
28033      if test "x$has_space" != x; then
28034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28037      fi
28038
28039      # Use eval to expand a potential ~
28040      eval path="$path"
28041      if test ! -f "$path" && test ! -d "$path"; then
28042        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28043      fi
28044
28045      if test -d "$path"; then
28046        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28047      else
28048        dir="`$DIRNAME "$path"`"
28049        base="`$BASENAME "$path"`"
28050        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28051      fi
28052    fi
28053  fi
28054
28055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28056$as_echo_n "checking for Boot JDK... " >&6; }
28057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28058$as_echo "$BOOT_JDK" >&6; }
28059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28060$as_echo_n "checking Boot JDK version... " >&6; }
28061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28063$as_echo "$BOOT_JDK_VERSION" >&6; }
28064          fi # end check jdk version
28065        fi # end check javac
28066      fi # end check java
28067    fi # end check boot jdk found
28068  fi
28069
28070  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28071
28072  if test "x$BOOT_JDK_FOUND" = xno; then
28073    # Now execute the test
28074
28075  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28076  BOOT_JDK_SUFFIX="/Contents/Home"
28077  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28078  if test "x$ALL_JDKS_FOUND" != x; then
28079    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28080
28081  if test "x$BOOT_JDK_FOUND" = xno; then
28082    # Now execute the test
28083
28084        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28085        if test -d "$BOOT_JDK"; then
28086          BOOT_JDK_FOUND=maybe
28087          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28088$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28089        fi
28090
28091
28092    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28093    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28094      # Do we have a bin/java?
28095      if test ! -x "$BOOT_JDK/bin/java"; then
28096        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28098        BOOT_JDK_FOUND=no
28099      else
28100        # Do we have a bin/javac?
28101        if test ! -x "$BOOT_JDK/bin/javac"; then
28102          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28104          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28105$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28106          BOOT_JDK_FOUND=no
28107        else
28108          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28109          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28110
28111          # Extra M4 quote needed to protect [] in grep expression.
28112          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28113          if test "x$FOUND_CORRECT_VERSION" = x; then
28114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28116            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28118            BOOT_JDK_FOUND=no
28119          else
28120            # We're done! :-)
28121            BOOT_JDK_FOUND=yes
28122
28123  # Only process if variable expands to non-empty
28124
28125  if test "x$BOOT_JDK" != x; then
28126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28127
28128  # Input might be given as Windows format, start by converting to
28129  # unix format.
28130  path="$BOOT_JDK"
28131  new_path=`$CYGPATH -u "$path"`
28132
28133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28136  # "foo.exe" is OK but "foo" is an error.
28137  #
28138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28139  # It is also a way to make sure we got the proper file name for the real test later on.
28140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28141  if test "x$test_shortpath" = x; then
28142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28145  fi
28146
28147  # Call helper function which possibly converts this using DOS-style short mode.
28148  # If so, the updated path is stored in $new_path.
28149
28150  input_path="$new_path"
28151  # Check if we need to convert this using DOS-style short mode. If the path
28152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28153  # take no chances and rewrite it.
28154  # Note: m4 eats our [], so we need to use [ and ] instead.
28155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28156  if test "x$has_forbidden_chars" != x; then
28157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28161      # Going to short mode and back again did indeed matter. Since short mode is
28162      # case insensitive, let's make it lowercase to improve readability.
28163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28164      # Now convert it back to Unix-style (cygpath)
28165      input_path=`$CYGPATH -u "$shortmode_path"`
28166      new_path="$input_path"
28167    fi
28168  fi
28169
28170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28171  if test "x$test_cygdrive_prefix" = x; then
28172    # As a simple fix, exclude /usr/bin since it's not a real path.
28173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28175      # a path prefixed by /cygdrive for fixpath to work.
28176      new_path="$CYGWIN_ROOT_PATH$input_path"
28177    fi
28178  fi
28179
28180
28181  if test "x$path" != "x$new_path"; then
28182    BOOT_JDK="$new_path"
28183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28185  fi
28186
28187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28188
28189  path="$BOOT_JDK"
28190  has_colon=`$ECHO $path | $GREP ^.:`
28191  new_path="$path"
28192  if test "x$has_colon" = x; then
28193    # Not in mixed or Windows style, start by that.
28194    new_path=`cmd //c echo $path`
28195  fi
28196
28197
28198  input_path="$new_path"
28199  # Check if we need to convert this using DOS-style short mode. If the path
28200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28201  # take no chances and rewrite it.
28202  # Note: m4 eats our [], so we need to use [ and ] instead.
28203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28204  if test "x$has_forbidden_chars" != x; then
28205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28207  fi
28208
28209
28210  windows_path="$new_path"
28211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28212    unix_path=`$CYGPATH -u "$windows_path"`
28213    new_path="$unix_path"
28214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28216    new_path="$unix_path"
28217  fi
28218
28219  if test "x$path" != "x$new_path"; then
28220    BOOT_JDK="$new_path"
28221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28223  fi
28224
28225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28227
28228    else
28229      # We're on a unix platform. Hooray! :)
28230      path="$BOOT_JDK"
28231      has_space=`$ECHO "$path" | $GREP " "`
28232      if test "x$has_space" != x; then
28233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28236      fi
28237
28238      # Use eval to expand a potential ~
28239      eval path="$path"
28240      if test ! -f "$path" && test ! -d "$path"; then
28241        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28242      fi
28243
28244      if test -d "$path"; then
28245        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28246      else
28247        dir="`$DIRNAME "$path"`"
28248        base="`$BASENAME "$path"`"
28249        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28250      fi
28251    fi
28252  fi
28253
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28255$as_echo_n "checking for Boot JDK... " >&6; }
28256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28257$as_echo "$BOOT_JDK" >&6; }
28258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28259$as_echo_n "checking Boot JDK version... " >&6; }
28260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28262$as_echo "$BOOT_JDK_VERSION" >&6; }
28263          fi # end check jdk version
28264        fi # end check javac
28265      fi # end check java
28266    fi # end check boot jdk found
28267  fi
28268
28269    done
28270  fi
28271
28272
28273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28275      # Do we have a bin/java?
28276      if test ! -x "$BOOT_JDK/bin/java"; then
28277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28279        BOOT_JDK_FOUND=no
28280      else
28281        # Do we have a bin/javac?
28282        if test ! -x "$BOOT_JDK/bin/javac"; then
28283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28287          BOOT_JDK_FOUND=no
28288        else
28289          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28290          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28291
28292          # Extra M4 quote needed to protect [] in grep expression.
28293          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28294          if test "x$FOUND_CORRECT_VERSION" = x; then
28295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28297            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28299            BOOT_JDK_FOUND=no
28300          else
28301            # We're done! :-)
28302            BOOT_JDK_FOUND=yes
28303
28304  # Only process if variable expands to non-empty
28305
28306  if test "x$BOOT_JDK" != x; then
28307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28308
28309  # Input might be given as Windows format, start by converting to
28310  # unix format.
28311  path="$BOOT_JDK"
28312  new_path=`$CYGPATH -u "$path"`
28313
28314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28317  # "foo.exe" is OK but "foo" is an error.
28318  #
28319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28320  # It is also a way to make sure we got the proper file name for the real test later on.
28321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28322  if test "x$test_shortpath" = x; then
28323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28326  fi
28327
28328  # Call helper function which possibly converts this using DOS-style short mode.
28329  # If so, the updated path is stored in $new_path.
28330
28331  input_path="$new_path"
28332  # Check if we need to convert this using DOS-style short mode. If the path
28333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28334  # take no chances and rewrite it.
28335  # Note: m4 eats our [], so we need to use [ and ] instead.
28336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28337  if test "x$has_forbidden_chars" != x; then
28338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28342      # Going to short mode and back again did indeed matter. Since short mode is
28343      # case insensitive, let's make it lowercase to improve readability.
28344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28345      # Now convert it back to Unix-style (cygpath)
28346      input_path=`$CYGPATH -u "$shortmode_path"`
28347      new_path="$input_path"
28348    fi
28349  fi
28350
28351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28352  if test "x$test_cygdrive_prefix" = x; then
28353    # As a simple fix, exclude /usr/bin since it's not a real path.
28354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28356      # a path prefixed by /cygdrive for fixpath to work.
28357      new_path="$CYGWIN_ROOT_PATH$input_path"
28358    fi
28359  fi
28360
28361
28362  if test "x$path" != "x$new_path"; then
28363    BOOT_JDK="$new_path"
28364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28366  fi
28367
28368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28369
28370  path="$BOOT_JDK"
28371  has_colon=`$ECHO $path | $GREP ^.:`
28372  new_path="$path"
28373  if test "x$has_colon" = x; then
28374    # Not in mixed or Windows style, start by that.
28375    new_path=`cmd //c echo $path`
28376  fi
28377
28378
28379  input_path="$new_path"
28380  # Check if we need to convert this using DOS-style short mode. If the path
28381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28382  # take no chances and rewrite it.
28383  # Note: m4 eats our [], so we need to use [ and ] instead.
28384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28385  if test "x$has_forbidden_chars" != x; then
28386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28388  fi
28389
28390
28391  windows_path="$new_path"
28392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28393    unix_path=`$CYGPATH -u "$windows_path"`
28394    new_path="$unix_path"
28395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28397    new_path="$unix_path"
28398  fi
28399
28400  if test "x$path" != "x$new_path"; then
28401    BOOT_JDK="$new_path"
28402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28404  fi
28405
28406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28408
28409    else
28410      # We're on a unix platform. Hooray! :)
28411      path="$BOOT_JDK"
28412      has_space=`$ECHO "$path" | $GREP " "`
28413      if test "x$has_space" != x; then
28414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28417      fi
28418
28419      # Use eval to expand a potential ~
28420      eval path="$path"
28421      if test ! -f "$path" && test ! -d "$path"; then
28422        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28423      fi
28424
28425      if test -d "$path"; then
28426        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28427      else
28428        dir="`$DIRNAME "$path"`"
28429        base="`$BASENAME "$path"`"
28430        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28431      fi
28432    fi
28433  fi
28434
28435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28436$as_echo_n "checking for Boot JDK... " >&6; }
28437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28438$as_echo "$BOOT_JDK" >&6; }
28439            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28440$as_echo_n "checking Boot JDK version... " >&6; }
28441            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28443$as_echo "$BOOT_JDK_VERSION" >&6; }
28444          fi # end check jdk version
28445        fi # end check javac
28446      fi # end check java
28447    fi # end check boot jdk found
28448  fi
28449
28450
28451  if test "x$BOOT_JDK_FOUND" = xno; then
28452    # Now execute the test
28453
28454  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28455  BOOT_JDK_SUFFIX="/Contents/Home"
28456  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28457  if test "x$ALL_JDKS_FOUND" != x; then
28458    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28459
28460  if test "x$BOOT_JDK_FOUND" = xno; then
28461    # Now execute the test
28462
28463        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28464        if test -d "$BOOT_JDK"; then
28465          BOOT_JDK_FOUND=maybe
28466          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28467$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28468        fi
28469
28470
28471    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28472    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28473      # Do we have a bin/java?
28474      if test ! -x "$BOOT_JDK/bin/java"; then
28475        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28477        BOOT_JDK_FOUND=no
28478      else
28479        # Do we have a bin/javac?
28480        if test ! -x "$BOOT_JDK/bin/javac"; then
28481          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28483          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28484$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28485          BOOT_JDK_FOUND=no
28486        else
28487          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28488          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28489
28490          # Extra M4 quote needed to protect [] in grep expression.
28491          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28492          if test "x$FOUND_CORRECT_VERSION" = x; then
28493            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28495            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28496$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28497            BOOT_JDK_FOUND=no
28498          else
28499            # We're done! :-)
28500            BOOT_JDK_FOUND=yes
28501
28502  # Only process if variable expands to non-empty
28503
28504  if test "x$BOOT_JDK" != x; then
28505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28506
28507  # Input might be given as Windows format, start by converting to
28508  # unix format.
28509  path="$BOOT_JDK"
28510  new_path=`$CYGPATH -u "$path"`
28511
28512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28515  # "foo.exe" is OK but "foo" is an error.
28516  #
28517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28518  # It is also a way to make sure we got the proper file name for the real test later on.
28519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28520  if test "x$test_shortpath" = x; then
28521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28523    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28524  fi
28525
28526  # Call helper function which possibly converts this using DOS-style short mode.
28527  # If so, the updated path is stored in $new_path.
28528
28529  input_path="$new_path"
28530  # Check if we need to convert this using DOS-style short mode. If the path
28531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28532  # take no chances and rewrite it.
28533  # Note: m4 eats our [], so we need to use [ and ] instead.
28534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28535  if test "x$has_forbidden_chars" != x; then
28536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28540      # Going to short mode and back again did indeed matter. Since short mode is
28541      # case insensitive, let's make it lowercase to improve readability.
28542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28543      # Now convert it back to Unix-style (cygpath)
28544      input_path=`$CYGPATH -u "$shortmode_path"`
28545      new_path="$input_path"
28546    fi
28547  fi
28548
28549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28550  if test "x$test_cygdrive_prefix" = x; then
28551    # As a simple fix, exclude /usr/bin since it's not a real path.
28552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28554      # a path prefixed by /cygdrive for fixpath to work.
28555      new_path="$CYGWIN_ROOT_PATH$input_path"
28556    fi
28557  fi
28558
28559
28560  if test "x$path" != "x$new_path"; then
28561    BOOT_JDK="$new_path"
28562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28564  fi
28565
28566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567
28568  path="$BOOT_JDK"
28569  has_colon=`$ECHO $path | $GREP ^.:`
28570  new_path="$path"
28571  if test "x$has_colon" = x; then
28572    # Not in mixed or Windows style, start by that.
28573    new_path=`cmd //c echo $path`
28574  fi
28575
28576
28577  input_path="$new_path"
28578  # Check if we need to convert this using DOS-style short mode. If the path
28579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28580  # take no chances and rewrite it.
28581  # Note: m4 eats our [], so we need to use [ and ] instead.
28582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28583  if test "x$has_forbidden_chars" != x; then
28584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28586  fi
28587
28588
28589  windows_path="$new_path"
28590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28591    unix_path=`$CYGPATH -u "$windows_path"`
28592    new_path="$unix_path"
28593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28595    new_path="$unix_path"
28596  fi
28597
28598  if test "x$path" != "x$new_path"; then
28599    BOOT_JDK="$new_path"
28600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28602  fi
28603
28604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28606
28607    else
28608      # We're on a unix platform. Hooray! :)
28609      path="$BOOT_JDK"
28610      has_space=`$ECHO "$path" | $GREP " "`
28611      if test "x$has_space" != x; then
28612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28615      fi
28616
28617      # Use eval to expand a potential ~
28618      eval path="$path"
28619      if test ! -f "$path" && test ! -d "$path"; then
28620        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28621      fi
28622
28623      if test -d "$path"; then
28624        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28625      else
28626        dir="`$DIRNAME "$path"`"
28627        base="`$BASENAME "$path"`"
28628        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28629      fi
28630    fi
28631  fi
28632
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28634$as_echo_n "checking for Boot JDK... " >&6; }
28635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28636$as_echo "$BOOT_JDK" >&6; }
28637            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28638$as_echo_n "checking Boot JDK version... " >&6; }
28639            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28641$as_echo "$BOOT_JDK_VERSION" >&6; }
28642          fi # end check jdk version
28643        fi # end check javac
28644      fi # end check java
28645    fi # end check boot jdk found
28646  fi
28647
28648    done
28649  fi
28650
28651
28652    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28653    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28654      # Do we have a bin/java?
28655      if test ! -x "$BOOT_JDK/bin/java"; then
28656        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28658        BOOT_JDK_FOUND=no
28659      else
28660        # Do we have a bin/javac?
28661        if test ! -x "$BOOT_JDK/bin/javac"; then
28662          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28664          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28665$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28666          BOOT_JDK_FOUND=no
28667        else
28668          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28669          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28670
28671          # Extra M4 quote needed to protect [] in grep expression.
28672          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28673          if test "x$FOUND_CORRECT_VERSION" = x; then
28674            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28676            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28677$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28678            BOOT_JDK_FOUND=no
28679          else
28680            # We're done! :-)
28681            BOOT_JDK_FOUND=yes
28682
28683  # Only process if variable expands to non-empty
28684
28685  if test "x$BOOT_JDK" != x; then
28686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28687
28688  # Input might be given as Windows format, start by converting to
28689  # unix format.
28690  path="$BOOT_JDK"
28691  new_path=`$CYGPATH -u "$path"`
28692
28693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28696  # "foo.exe" is OK but "foo" is an error.
28697  #
28698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28699  # It is also a way to make sure we got the proper file name for the real test later on.
28700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28701  if test "x$test_shortpath" = x; then
28702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28704    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28705  fi
28706
28707  # Call helper function which possibly converts this using DOS-style short mode.
28708  # If so, the updated path is stored in $new_path.
28709
28710  input_path="$new_path"
28711  # Check if we need to convert this using DOS-style short mode. If the path
28712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28713  # take no chances and rewrite it.
28714  # Note: m4 eats our [], so we need to use [ and ] instead.
28715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28716  if test "x$has_forbidden_chars" != x; then
28717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28721      # Going to short mode and back again did indeed matter. Since short mode is
28722      # case insensitive, let's make it lowercase to improve readability.
28723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28724      # Now convert it back to Unix-style (cygpath)
28725      input_path=`$CYGPATH -u "$shortmode_path"`
28726      new_path="$input_path"
28727    fi
28728  fi
28729
28730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28731  if test "x$test_cygdrive_prefix" = x; then
28732    # As a simple fix, exclude /usr/bin since it's not a real path.
28733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28735      # a path prefixed by /cygdrive for fixpath to work.
28736      new_path="$CYGWIN_ROOT_PATH$input_path"
28737    fi
28738  fi
28739
28740
28741  if test "x$path" != "x$new_path"; then
28742    BOOT_JDK="$new_path"
28743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28745  fi
28746
28747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28748
28749  path="$BOOT_JDK"
28750  has_colon=`$ECHO $path | $GREP ^.:`
28751  new_path="$path"
28752  if test "x$has_colon" = x; then
28753    # Not in mixed or Windows style, start by that.
28754    new_path=`cmd //c echo $path`
28755  fi
28756
28757
28758  input_path="$new_path"
28759  # Check if we need to convert this using DOS-style short mode. If the path
28760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28761  # take no chances and rewrite it.
28762  # Note: m4 eats our [], so we need to use [ and ] instead.
28763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28764  if test "x$has_forbidden_chars" != x; then
28765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28767  fi
28768
28769
28770  windows_path="$new_path"
28771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28772    unix_path=`$CYGPATH -u "$windows_path"`
28773    new_path="$unix_path"
28774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28776    new_path="$unix_path"
28777  fi
28778
28779  if test "x$path" != "x$new_path"; then
28780    BOOT_JDK="$new_path"
28781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28782$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28783  fi
28784
28785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28787
28788    else
28789      # We're on a unix platform. Hooray! :)
28790      path="$BOOT_JDK"
28791      has_space=`$ECHO "$path" | $GREP " "`
28792      if test "x$has_space" != x; then
28793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28796      fi
28797
28798      # Use eval to expand a potential ~
28799      eval path="$path"
28800      if test ! -f "$path" && test ! -d "$path"; then
28801        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28802      fi
28803
28804      if test -d "$path"; then
28805        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28806      else
28807        dir="`$DIRNAME "$path"`"
28808        base="`$BASENAME "$path"`"
28809        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28810      fi
28811    fi
28812  fi
28813
28814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28815$as_echo_n "checking for Boot JDK... " >&6; }
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28817$as_echo "$BOOT_JDK" >&6; }
28818            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28819$as_echo_n "checking Boot JDK version... " >&6; }
28820            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28822$as_echo "$BOOT_JDK_VERSION" >&6; }
28823          fi # end check jdk version
28824        fi # end check javac
28825      fi # end check java
28826    fi # end check boot jdk found
28827  fi
28828
28829  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28830
28831  if test "x$BOOT_JDK_FOUND" = xno; then
28832    # Now execute the test
28833
28834  BOOT_JDK_PREFIX="/usr/lib/jvm"
28835  BOOT_JDK_SUFFIX=""
28836  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28837  if test "x$ALL_JDKS_FOUND" != x; then
28838    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28839
28840  if test "x$BOOT_JDK_FOUND" = xno; then
28841    # Now execute the test
28842
28843        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28844        if test -d "$BOOT_JDK"; then
28845          BOOT_JDK_FOUND=maybe
28846          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28847$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28848        fi
28849
28850
28851    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28852    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28853      # Do we have a bin/java?
28854      if test ! -x "$BOOT_JDK/bin/java"; then
28855        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28857        BOOT_JDK_FOUND=no
28858      else
28859        # Do we have a bin/javac?
28860        if test ! -x "$BOOT_JDK/bin/javac"; then
28861          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28863          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28864$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28865          BOOT_JDK_FOUND=no
28866        else
28867          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28868          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28869
28870          # Extra M4 quote needed to protect [] in grep expression.
28871          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28872          if test "x$FOUND_CORRECT_VERSION" = x; then
28873            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28875            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28876$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28877            BOOT_JDK_FOUND=no
28878          else
28879            # We're done! :-)
28880            BOOT_JDK_FOUND=yes
28881
28882  # Only process if variable expands to non-empty
28883
28884  if test "x$BOOT_JDK" != x; then
28885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28886
28887  # Input might be given as Windows format, start by converting to
28888  # unix format.
28889  path="$BOOT_JDK"
28890  new_path=`$CYGPATH -u "$path"`
28891
28892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28895  # "foo.exe" is OK but "foo" is an error.
28896  #
28897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28898  # It is also a way to make sure we got the proper file name for the real test later on.
28899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28900  if test "x$test_shortpath" = x; then
28901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28903    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28904  fi
28905
28906  # Call helper function which possibly converts this using DOS-style short mode.
28907  # If so, the updated path is stored in $new_path.
28908
28909  input_path="$new_path"
28910  # Check if we need to convert this using DOS-style short mode. If the path
28911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28912  # take no chances and rewrite it.
28913  # Note: m4 eats our [], so we need to use [ and ] instead.
28914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28915  if test "x$has_forbidden_chars" != x; then
28916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28920      # Going to short mode and back again did indeed matter. Since short mode is
28921      # case insensitive, let's make it lowercase to improve readability.
28922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28923      # Now convert it back to Unix-style (cygpath)
28924      input_path=`$CYGPATH -u "$shortmode_path"`
28925      new_path="$input_path"
28926    fi
28927  fi
28928
28929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28930  if test "x$test_cygdrive_prefix" = x; then
28931    # As a simple fix, exclude /usr/bin since it's not a real path.
28932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28934      # a path prefixed by /cygdrive for fixpath to work.
28935      new_path="$CYGWIN_ROOT_PATH$input_path"
28936    fi
28937  fi
28938
28939
28940  if test "x$path" != "x$new_path"; then
28941    BOOT_JDK="$new_path"
28942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28943$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28944  fi
28945
28946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28947
28948  path="$BOOT_JDK"
28949  has_colon=`$ECHO $path | $GREP ^.:`
28950  new_path="$path"
28951  if test "x$has_colon" = x; then
28952    # Not in mixed or Windows style, start by that.
28953    new_path=`cmd //c echo $path`
28954  fi
28955
28956
28957  input_path="$new_path"
28958  # Check if we need to convert this using DOS-style short mode. If the path
28959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28960  # take no chances and rewrite it.
28961  # Note: m4 eats our [], so we need to use [ and ] instead.
28962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28963  if test "x$has_forbidden_chars" != x; then
28964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28966  fi
28967
28968
28969  windows_path="$new_path"
28970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28971    unix_path=`$CYGPATH -u "$windows_path"`
28972    new_path="$unix_path"
28973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28975    new_path="$unix_path"
28976  fi
28977
28978  if test "x$path" != "x$new_path"; then
28979    BOOT_JDK="$new_path"
28980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28981$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28982  fi
28983
28984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28986
28987    else
28988      # We're on a unix platform. Hooray! :)
28989      path="$BOOT_JDK"
28990      has_space=`$ECHO "$path" | $GREP " "`
28991      if test "x$has_space" != x; then
28992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28993$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28995      fi
28996
28997      # Use eval to expand a potential ~
28998      eval path="$path"
28999      if test ! -f "$path" && test ! -d "$path"; then
29000        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29001      fi
29002
29003      if test -d "$path"; then
29004        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29005      else
29006        dir="`$DIRNAME "$path"`"
29007        base="`$BASENAME "$path"`"
29008        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29009      fi
29010    fi
29011  fi
29012
29013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29014$as_echo_n "checking for Boot JDK... " >&6; }
29015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29016$as_echo "$BOOT_JDK" >&6; }
29017            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29018$as_echo_n "checking Boot JDK version... " >&6; }
29019            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29021$as_echo "$BOOT_JDK_VERSION" >&6; }
29022          fi # end check jdk version
29023        fi # end check javac
29024      fi # end check java
29025    fi # end check boot jdk found
29026  fi
29027
29028    done
29029  fi
29030
29031
29032    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29033    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29034      # Do we have a bin/java?
29035      if test ! -x "$BOOT_JDK/bin/java"; then
29036        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29038        BOOT_JDK_FOUND=no
29039      else
29040        # Do we have a bin/javac?
29041        if test ! -x "$BOOT_JDK/bin/javac"; then
29042          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29044          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29045$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29046          BOOT_JDK_FOUND=no
29047        else
29048          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29049          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29050
29051          # Extra M4 quote needed to protect [] in grep expression.
29052          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29053          if test "x$FOUND_CORRECT_VERSION" = x; then
29054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29056            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29057$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29058            BOOT_JDK_FOUND=no
29059          else
29060            # We're done! :-)
29061            BOOT_JDK_FOUND=yes
29062
29063  # Only process if variable expands to non-empty
29064
29065  if test "x$BOOT_JDK" != x; then
29066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29067
29068  # Input might be given as Windows format, start by converting to
29069  # unix format.
29070  path="$BOOT_JDK"
29071  new_path=`$CYGPATH -u "$path"`
29072
29073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29076  # "foo.exe" is OK but "foo" is an error.
29077  #
29078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29079  # It is also a way to make sure we got the proper file name for the real test later on.
29080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29081  if test "x$test_shortpath" = x; then
29082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29084    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29085  fi
29086
29087  # Call helper function which possibly converts this using DOS-style short mode.
29088  # If so, the updated path is stored in $new_path.
29089
29090  input_path="$new_path"
29091  # Check if we need to convert this using DOS-style short mode. If the path
29092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29093  # take no chances and rewrite it.
29094  # Note: m4 eats our [], so we need to use [ and ] instead.
29095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29096  if test "x$has_forbidden_chars" != x; then
29097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29101      # Going to short mode and back again did indeed matter. Since short mode is
29102      # case insensitive, let's make it lowercase to improve readability.
29103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29104      # Now convert it back to Unix-style (cygpath)
29105      input_path=`$CYGPATH -u "$shortmode_path"`
29106      new_path="$input_path"
29107    fi
29108  fi
29109
29110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29111  if test "x$test_cygdrive_prefix" = x; then
29112    # As a simple fix, exclude /usr/bin since it's not a real path.
29113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29115      # a path prefixed by /cygdrive for fixpath to work.
29116      new_path="$CYGWIN_ROOT_PATH$input_path"
29117    fi
29118  fi
29119
29120
29121  if test "x$path" != "x$new_path"; then
29122    BOOT_JDK="$new_path"
29123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29125  fi
29126
29127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29128
29129  path="$BOOT_JDK"
29130  has_colon=`$ECHO $path | $GREP ^.:`
29131  new_path="$path"
29132  if test "x$has_colon" = x; then
29133    # Not in mixed or Windows style, start by that.
29134    new_path=`cmd //c echo $path`
29135  fi
29136
29137
29138  input_path="$new_path"
29139  # Check if we need to convert this using DOS-style short mode. If the path
29140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29141  # take no chances and rewrite it.
29142  # Note: m4 eats our [], so we need to use [ and ] instead.
29143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29144  if test "x$has_forbidden_chars" != x; then
29145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29147  fi
29148
29149
29150  windows_path="$new_path"
29151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29152    unix_path=`$CYGPATH -u "$windows_path"`
29153    new_path="$unix_path"
29154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29156    new_path="$unix_path"
29157  fi
29158
29159  if test "x$path" != "x$new_path"; then
29160    BOOT_JDK="$new_path"
29161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29163  fi
29164
29165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29167
29168    else
29169      # We're on a unix platform. Hooray! :)
29170      path="$BOOT_JDK"
29171      has_space=`$ECHO "$path" | $GREP " "`
29172      if test "x$has_space" != x; then
29173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29175        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29176      fi
29177
29178      # Use eval to expand a potential ~
29179      eval path="$path"
29180      if test ! -f "$path" && test ! -d "$path"; then
29181        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29182      fi
29183
29184      if test -d "$path"; then
29185        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29186      else
29187        dir="`$DIRNAME "$path"`"
29188        base="`$BASENAME "$path"`"
29189        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29190      fi
29191    fi
29192  fi
29193
29194            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29195$as_echo_n "checking for Boot JDK... " >&6; }
29196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29197$as_echo "$BOOT_JDK" >&6; }
29198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29199$as_echo_n "checking Boot JDK version... " >&6; }
29200            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29202$as_echo "$BOOT_JDK_VERSION" >&6; }
29203          fi # end check jdk version
29204        fi # end check javac
29205      fi # end check java
29206    fi # end check boot jdk found
29207  fi
29208
29209  fi
29210
29211
29212    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29213    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29214      # Do we have a bin/java?
29215      if test ! -x "$BOOT_JDK/bin/java"; then
29216        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29218        BOOT_JDK_FOUND=no
29219      else
29220        # Do we have a bin/javac?
29221        if test ! -x "$BOOT_JDK/bin/javac"; then
29222          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29224          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29225$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29226          BOOT_JDK_FOUND=no
29227        else
29228          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29229          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29230
29231          # Extra M4 quote needed to protect [] in grep expression.
29232          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29233          if test "x$FOUND_CORRECT_VERSION" = x; then
29234            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29236            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29237$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29238            BOOT_JDK_FOUND=no
29239          else
29240            # We're done! :-)
29241            BOOT_JDK_FOUND=yes
29242
29243  # Only process if variable expands to non-empty
29244
29245  if test "x$BOOT_JDK" != x; then
29246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29247
29248  # Input might be given as Windows format, start by converting to
29249  # unix format.
29250  path="$BOOT_JDK"
29251  new_path=`$CYGPATH -u "$path"`
29252
29253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29256  # "foo.exe" is OK but "foo" is an error.
29257  #
29258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29259  # It is also a way to make sure we got the proper file name for the real test later on.
29260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29261  if test "x$test_shortpath" = x; then
29262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29264    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29265  fi
29266
29267  # Call helper function which possibly converts this using DOS-style short mode.
29268  # If so, the updated path is stored in $new_path.
29269
29270  input_path="$new_path"
29271  # Check if we need to convert this using DOS-style short mode. If the path
29272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29273  # take no chances and rewrite it.
29274  # Note: m4 eats our [], so we need to use [ and ] instead.
29275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29276  if test "x$has_forbidden_chars" != x; then
29277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29281      # Going to short mode and back again did indeed matter. Since short mode is
29282      # case insensitive, let's make it lowercase to improve readability.
29283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29284      # Now convert it back to Unix-style (cygpath)
29285      input_path=`$CYGPATH -u "$shortmode_path"`
29286      new_path="$input_path"
29287    fi
29288  fi
29289
29290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29291  if test "x$test_cygdrive_prefix" = x; then
29292    # As a simple fix, exclude /usr/bin since it's not a real path.
29293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29295      # a path prefixed by /cygdrive for fixpath to work.
29296      new_path="$CYGWIN_ROOT_PATH$input_path"
29297    fi
29298  fi
29299
29300
29301  if test "x$path" != "x$new_path"; then
29302    BOOT_JDK="$new_path"
29303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29305  fi
29306
29307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29308
29309  path="$BOOT_JDK"
29310  has_colon=`$ECHO $path | $GREP ^.:`
29311  new_path="$path"
29312  if test "x$has_colon" = x; then
29313    # Not in mixed or Windows style, start by that.
29314    new_path=`cmd //c echo $path`
29315  fi
29316
29317
29318  input_path="$new_path"
29319  # Check if we need to convert this using DOS-style short mode. If the path
29320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29321  # take no chances and rewrite it.
29322  # Note: m4 eats our [], so we need to use [ and ] instead.
29323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29324  if test "x$has_forbidden_chars" != x; then
29325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29327  fi
29328
29329
29330  windows_path="$new_path"
29331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29332    unix_path=`$CYGPATH -u "$windows_path"`
29333    new_path="$unix_path"
29334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29336    new_path="$unix_path"
29337  fi
29338
29339  if test "x$path" != "x$new_path"; then
29340    BOOT_JDK="$new_path"
29341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29343  fi
29344
29345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29347
29348    else
29349      # We're on a unix platform. Hooray! :)
29350      path="$BOOT_JDK"
29351      has_space=`$ECHO "$path" | $GREP " "`
29352      if test "x$has_space" != x; then
29353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29354$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29356      fi
29357
29358      # Use eval to expand a potential ~
29359      eval path="$path"
29360      if test ! -f "$path" && test ! -d "$path"; then
29361        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29362      fi
29363
29364      if test -d "$path"; then
29365        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29366      else
29367        dir="`$DIRNAME "$path"`"
29368        base="`$BASENAME "$path"`"
29369        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29370      fi
29371    fi
29372  fi
29373
29374            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29375$as_echo_n "checking for Boot JDK... " >&6; }
29376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29377$as_echo "$BOOT_JDK" >&6; }
29378            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29379$as_echo_n "checking Boot JDK version... " >&6; }
29380            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29382$as_echo "$BOOT_JDK_VERSION" >&6; }
29383          fi # end check jdk version
29384        fi # end check javac
29385      fi # end check java
29386    fi # end check boot jdk found
29387  fi
29388
29389
29390  # If we haven't found anything yet, we've truly lost. Give up.
29391  if test "x$BOOT_JDK_FOUND" = xno; then
29392
29393  # Print a helpful message on how to acquire the necessary build dependency.
29394  # openjdk is the help tag: freetype, cups, alsa etc
29395  MISSING_DEPENDENCY=openjdk
29396
29397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29398    cygwin_help $MISSING_DEPENDENCY
29399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29400    msys_help $MISSING_DEPENDENCY
29401  else
29402    PKGHANDLER_COMMAND=
29403
29404    case $PKGHANDLER in
29405      apt-get)
29406        apt_help     $MISSING_DEPENDENCY ;;
29407      yum)
29408        yum_help     $MISSING_DEPENDENCY ;;
29409      port)
29410        port_help    $MISSING_DEPENDENCY ;;
29411      pkgutil)
29412        pkgutil_help $MISSING_DEPENDENCY ;;
29413      pkgadd)
29414        pkgadd_help  $MISSING_DEPENDENCY ;;
29415    esac
29416
29417    if test "x$PKGHANDLER_COMMAND" != x; then
29418      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29419    fi
29420  fi
29421
29422    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29423$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29424    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29425$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29426    as_fn_error $? "Cannot continue" "$LINENO" 5
29427  fi
29428
29429
29430
29431  # Setup tools from the Boot JDK.
29432
29433  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29434
29435  # Publish this variable in the help.
29436
29437
29438  if [ -z "${JAVA+x}" ]; then
29439    # The variable is not set by user, try to locate tool using the code snippet
29440
29441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29442$as_echo_n "checking for java in Boot JDK... " >&6; }
29443      JAVA=$BOOT_JDK/bin/java
29444      if test ! -x $JAVA; then
29445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29446$as_echo "not found" >&6; }
29447        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29448$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29449        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29450      fi
29451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29452$as_echo "ok" >&6; }
29453
29454
29455  else
29456    # The variable is set, but is it from the command line or the environment?
29457
29458    # Try to remove the string !JAVA! from our list.
29459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29461      # If it failed, the variable was not from the command line. Ignore it,
29462      # but warn the user (except for BASH, which is always set by the calling BASH).
29463      if test "xJAVA" != xBASH; then
29464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29465$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29466      fi
29467      # Try to locate tool using the code snippet
29468
29469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29470$as_echo_n "checking for java in Boot JDK... " >&6; }
29471      JAVA=$BOOT_JDK/bin/java
29472      if test ! -x $JAVA; then
29473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29474$as_echo "not found" >&6; }
29475        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29476$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29477        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29478      fi
29479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29480$as_echo "ok" >&6; }
29481
29482
29483    else
29484      # If it succeeded, then it was overridden by the user. We will use it
29485      # for the tool.
29486
29487      # First remove it from the list of overridden variables, so we can test
29488      # for unknown variables in the end.
29489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29490
29491      # Check if we try to supply an empty value
29492      if test "x$JAVA" = x; then
29493        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29494$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29496$as_echo_n "checking for JAVA... " >&6; }
29497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29498$as_echo "disabled" >&6; }
29499      else
29500        # Check if the provided tool contains a complete path.
29501        tool_specified="$JAVA"
29502        tool_basename="${tool_specified##*/}"
29503        if test "x$tool_basename" = "x$tool_specified"; then
29504          # A command without a complete path is provided, search $PATH.
29505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29506$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29507          # Extract the first word of "$tool_basename", so it can be a program name with args.
29508set dummy $tool_basename; ac_word=$2
29509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29510$as_echo_n "checking for $ac_word... " >&6; }
29511if ${ac_cv_path_JAVA+:} false; then :
29512  $as_echo_n "(cached) " >&6
29513else
29514  case $JAVA in
29515  [\\/]* | ?:[\\/]*)
29516  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29517  ;;
29518  *)
29519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29520for as_dir in $PATH
29521do
29522  IFS=$as_save_IFS
29523  test -z "$as_dir" && as_dir=.
29524    for ac_exec_ext in '' $ac_executable_extensions; do
29525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29526    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29528    break 2
29529  fi
29530done
29531  done
29532IFS=$as_save_IFS
29533
29534  ;;
29535esac
29536fi
29537JAVA=$ac_cv_path_JAVA
29538if test -n "$JAVA"; then
29539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29540$as_echo "$JAVA" >&6; }
29541else
29542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29543$as_echo "no" >&6; }
29544fi
29545
29546
29547          if test "x$JAVA" = x; then
29548            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29549          fi
29550        else
29551          # Otherwise we believe it is a complete path. Use it as it is.
29552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29553$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29554          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29555$as_echo_n "checking for JAVA... " >&6; }
29556          if test ! -x "$tool_specified"; then
29557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29558$as_echo "not found" >&6; }
29559            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29560          fi
29561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29562$as_echo "$tool_specified" >&6; }
29563        fi
29564      fi
29565    fi
29566
29567  fi
29568
29569
29570
29571  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29572
29573  # Publish this variable in the help.
29574
29575
29576  if [ -z "${JAVAC+x}" ]; then
29577    # The variable is not set by user, try to locate tool using the code snippet
29578
29579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29580$as_echo_n "checking for javac in Boot JDK... " >&6; }
29581      JAVAC=$BOOT_JDK/bin/javac
29582      if test ! -x $JAVAC; then
29583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29584$as_echo "not found" >&6; }
29585        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29586$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29587        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29588      fi
29589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29590$as_echo "ok" >&6; }
29591
29592
29593  else
29594    # The variable is set, but is it from the command line or the environment?
29595
29596    # Try to remove the string !JAVAC! from our list.
29597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29599      # If it failed, the variable was not from the command line. Ignore it,
29600      # but warn the user (except for BASH, which is always set by the calling BASH).
29601      if test "xJAVAC" != xBASH; then
29602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29603$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29604      fi
29605      # Try to locate tool using the code snippet
29606
29607      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29608$as_echo_n "checking for javac in Boot JDK... " >&6; }
29609      JAVAC=$BOOT_JDK/bin/javac
29610      if test ! -x $JAVAC; then
29611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29612$as_echo "not found" >&6; }
29613        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29614$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29615        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29616      fi
29617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29618$as_echo "ok" >&6; }
29619
29620
29621    else
29622      # If it succeeded, then it was overridden by the user. We will use it
29623      # for the tool.
29624
29625      # First remove it from the list of overridden variables, so we can test
29626      # for unknown variables in the end.
29627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29628
29629      # Check if we try to supply an empty value
29630      if test "x$JAVAC" = x; then
29631        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29632$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29634$as_echo_n "checking for JAVAC... " >&6; }
29635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29636$as_echo "disabled" >&6; }
29637      else
29638        # Check if the provided tool contains a complete path.
29639        tool_specified="$JAVAC"
29640        tool_basename="${tool_specified##*/}"
29641        if test "x$tool_basename" = "x$tool_specified"; then
29642          # A command without a complete path is provided, search $PATH.
29643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29644$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29645          # Extract the first word of "$tool_basename", so it can be a program name with args.
29646set dummy $tool_basename; ac_word=$2
29647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29648$as_echo_n "checking for $ac_word... " >&6; }
29649if ${ac_cv_path_JAVAC+:} false; then :
29650  $as_echo_n "(cached) " >&6
29651else
29652  case $JAVAC in
29653  [\\/]* | ?:[\\/]*)
29654  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29655  ;;
29656  *)
29657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29658for as_dir in $PATH
29659do
29660  IFS=$as_save_IFS
29661  test -z "$as_dir" && as_dir=.
29662    for ac_exec_ext in '' $ac_executable_extensions; do
29663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29664    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29666    break 2
29667  fi
29668done
29669  done
29670IFS=$as_save_IFS
29671
29672  ;;
29673esac
29674fi
29675JAVAC=$ac_cv_path_JAVAC
29676if test -n "$JAVAC"; then
29677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29678$as_echo "$JAVAC" >&6; }
29679else
29680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29681$as_echo "no" >&6; }
29682fi
29683
29684
29685          if test "x$JAVAC" = x; then
29686            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29687          fi
29688        else
29689          # Otherwise we believe it is a complete path. Use it as it is.
29690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29691$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29692          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29693$as_echo_n "checking for JAVAC... " >&6; }
29694          if test ! -x "$tool_specified"; then
29695            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29696$as_echo "not found" >&6; }
29697            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29698          fi
29699          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29700$as_echo "$tool_specified" >&6; }
29701        fi
29702      fi
29703    fi
29704
29705  fi
29706
29707
29708
29709  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29710
29711  # Publish this variable in the help.
29712
29713
29714  if [ -z "${JAVAH+x}" ]; then
29715    # The variable is not set by user, try to locate tool using the code snippet
29716
29717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29718$as_echo_n "checking for javah in Boot JDK... " >&6; }
29719      JAVAH=$BOOT_JDK/bin/javah
29720      if test ! -x $JAVAH; then
29721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29722$as_echo "not found" >&6; }
29723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29725        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29726      fi
29727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29728$as_echo "ok" >&6; }
29729
29730
29731  else
29732    # The variable is set, but is it from the command line or the environment?
29733
29734    # Try to remove the string !JAVAH! from our list.
29735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29737      # If it failed, the variable was not from the command line. Ignore it,
29738      # but warn the user (except for BASH, which is always set by the calling BASH).
29739      if test "xJAVAH" != xBASH; then
29740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29741$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29742      fi
29743      # Try to locate tool using the code snippet
29744
29745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29746$as_echo_n "checking for javah in Boot JDK... " >&6; }
29747      JAVAH=$BOOT_JDK/bin/javah
29748      if test ! -x $JAVAH; then
29749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29750$as_echo "not found" >&6; }
29751        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29752$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29753        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29754      fi
29755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29756$as_echo "ok" >&6; }
29757
29758
29759    else
29760      # If it succeeded, then it was overridden by the user. We will use it
29761      # for the tool.
29762
29763      # First remove it from the list of overridden variables, so we can test
29764      # for unknown variables in the end.
29765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29766
29767      # Check if we try to supply an empty value
29768      if test "x$JAVAH" = x; then
29769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29770$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29772$as_echo_n "checking for JAVAH... " >&6; }
29773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29774$as_echo "disabled" >&6; }
29775      else
29776        # Check if the provided tool contains a complete path.
29777        tool_specified="$JAVAH"
29778        tool_basename="${tool_specified##*/}"
29779        if test "x$tool_basename" = "x$tool_specified"; then
29780          # A command without a complete path is provided, search $PATH.
29781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29782$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29783          # Extract the first word of "$tool_basename", so it can be a program name with args.
29784set dummy $tool_basename; ac_word=$2
29785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29786$as_echo_n "checking for $ac_word... " >&6; }
29787if ${ac_cv_path_JAVAH+:} false; then :
29788  $as_echo_n "(cached) " >&6
29789else
29790  case $JAVAH in
29791  [\\/]* | ?:[\\/]*)
29792  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29793  ;;
29794  *)
29795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29796for as_dir in $PATH
29797do
29798  IFS=$as_save_IFS
29799  test -z "$as_dir" && as_dir=.
29800    for ac_exec_ext in '' $ac_executable_extensions; do
29801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29802    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29804    break 2
29805  fi
29806done
29807  done
29808IFS=$as_save_IFS
29809
29810  ;;
29811esac
29812fi
29813JAVAH=$ac_cv_path_JAVAH
29814if test -n "$JAVAH"; then
29815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29816$as_echo "$JAVAH" >&6; }
29817else
29818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29819$as_echo "no" >&6; }
29820fi
29821
29822
29823          if test "x$JAVAH" = x; then
29824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29825          fi
29826        else
29827          # Otherwise we believe it is a complete path. Use it as it is.
29828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29829$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29831$as_echo_n "checking for JAVAH... " >&6; }
29832          if test ! -x "$tool_specified"; then
29833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29834$as_echo "not found" >&6; }
29835            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29836          fi
29837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29838$as_echo "$tool_specified" >&6; }
29839        fi
29840      fi
29841    fi
29842
29843  fi
29844
29845
29846
29847  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29848
29849  # Publish this variable in the help.
29850
29851
29852  if [ -z "${JAR+x}" ]; then
29853    # The variable is not set by user, try to locate tool using the code snippet
29854
29855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29856$as_echo_n "checking for jar in Boot JDK... " >&6; }
29857      JAR=$BOOT_JDK/bin/jar
29858      if test ! -x $JAR; then
29859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29860$as_echo "not found" >&6; }
29861        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29862$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29863        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29864      fi
29865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29866$as_echo "ok" >&6; }
29867
29868
29869  else
29870    # The variable is set, but is it from the command line or the environment?
29871
29872    # Try to remove the string !JAR! from our list.
29873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29875      # If it failed, the variable was not from the command line. Ignore it,
29876      # but warn the user (except for BASH, which is always set by the calling BASH).
29877      if test "xJAR" != xBASH; then
29878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29879$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29880      fi
29881      # Try to locate tool using the code snippet
29882
29883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29884$as_echo_n "checking for jar in Boot JDK... " >&6; }
29885      JAR=$BOOT_JDK/bin/jar
29886      if test ! -x $JAR; then
29887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29888$as_echo "not found" >&6; }
29889        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29890$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29891        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29892      fi
29893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29894$as_echo "ok" >&6; }
29895
29896
29897    else
29898      # If it succeeded, then it was overridden by the user. We will use it
29899      # for the tool.
29900
29901      # First remove it from the list of overridden variables, so we can test
29902      # for unknown variables in the end.
29903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29904
29905      # Check if we try to supply an empty value
29906      if test "x$JAR" = x; then
29907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29908$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29910$as_echo_n "checking for JAR... " >&6; }
29911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29912$as_echo "disabled" >&6; }
29913      else
29914        # Check if the provided tool contains a complete path.
29915        tool_specified="$JAR"
29916        tool_basename="${tool_specified##*/}"
29917        if test "x$tool_basename" = "x$tool_specified"; then
29918          # A command without a complete path is provided, search $PATH.
29919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29920$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29921          # Extract the first word of "$tool_basename", so it can be a program name with args.
29922set dummy $tool_basename; ac_word=$2
29923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29924$as_echo_n "checking for $ac_word... " >&6; }
29925if ${ac_cv_path_JAR+:} false; then :
29926  $as_echo_n "(cached) " >&6
29927else
29928  case $JAR in
29929  [\\/]* | ?:[\\/]*)
29930  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29931  ;;
29932  *)
29933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29934for as_dir in $PATH
29935do
29936  IFS=$as_save_IFS
29937  test -z "$as_dir" && as_dir=.
29938    for ac_exec_ext in '' $ac_executable_extensions; do
29939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29940    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29942    break 2
29943  fi
29944done
29945  done
29946IFS=$as_save_IFS
29947
29948  ;;
29949esac
29950fi
29951JAR=$ac_cv_path_JAR
29952if test -n "$JAR"; then
29953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29954$as_echo "$JAR" >&6; }
29955else
29956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29957$as_echo "no" >&6; }
29958fi
29959
29960
29961          if test "x$JAR" = x; then
29962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29963          fi
29964        else
29965          # Otherwise we believe it is a complete path. Use it as it is.
29966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29967$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29969$as_echo_n "checking for JAR... " >&6; }
29970          if test ! -x "$tool_specified"; then
29971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29972$as_echo "not found" >&6; }
29973            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29974          fi
29975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29976$as_echo "$tool_specified" >&6; }
29977        fi
29978      fi
29979    fi
29980
29981  fi
29982
29983
29984
29985  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29986
29987  # Publish this variable in the help.
29988
29989
29990  if [ -z "${JARSIGNER+x}" ]; then
29991    # The variable is not set by user, try to locate tool using the code snippet
29992
29993      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29994$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29995      JARSIGNER=$BOOT_JDK/bin/jarsigner
29996      if test ! -x $JARSIGNER; then
29997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29998$as_echo "not found" >&6; }
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30000$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30001        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30002      fi
30003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30004$as_echo "ok" >&6; }
30005
30006
30007  else
30008    # The variable is set, but is it from the command line or the environment?
30009
30010    # Try to remove the string !JARSIGNER! from our list.
30011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30013      # If it failed, the variable was not from the command line. Ignore it,
30014      # but warn the user (except for BASH, which is always set by the calling BASH).
30015      if test "xJARSIGNER" != xBASH; then
30016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30017$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30018      fi
30019      # Try to locate tool using the code snippet
30020
30021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30022$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30023      JARSIGNER=$BOOT_JDK/bin/jarsigner
30024      if test ! -x $JARSIGNER; then
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30026$as_echo "not found" >&6; }
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30028$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30029        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30030      fi
30031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30032$as_echo "ok" >&6; }
30033
30034
30035    else
30036      # If it succeeded, then it was overridden by the user. We will use it
30037      # for the tool.
30038
30039      # First remove it from the list of overridden variables, so we can test
30040      # for unknown variables in the end.
30041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30042
30043      # Check if we try to supply an empty value
30044      if test "x$JARSIGNER" = x; then
30045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30046$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30048$as_echo_n "checking for JARSIGNER... " >&6; }
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30050$as_echo "disabled" >&6; }
30051      else
30052        # Check if the provided tool contains a complete path.
30053        tool_specified="$JARSIGNER"
30054        tool_basename="${tool_specified##*/}"
30055        if test "x$tool_basename" = "x$tool_specified"; then
30056          # A command without a complete path is provided, search $PATH.
30057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30058$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30059          # Extract the first word of "$tool_basename", so it can be a program name with args.
30060set dummy $tool_basename; ac_word=$2
30061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30062$as_echo_n "checking for $ac_word... " >&6; }
30063if ${ac_cv_path_JARSIGNER+:} false; then :
30064  $as_echo_n "(cached) " >&6
30065else
30066  case $JARSIGNER in
30067  [\\/]* | ?:[\\/]*)
30068  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30069  ;;
30070  *)
30071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30072for as_dir in $PATH
30073do
30074  IFS=$as_save_IFS
30075  test -z "$as_dir" && as_dir=.
30076    for ac_exec_ext in '' $ac_executable_extensions; do
30077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30078    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30080    break 2
30081  fi
30082done
30083  done
30084IFS=$as_save_IFS
30085
30086  ;;
30087esac
30088fi
30089JARSIGNER=$ac_cv_path_JARSIGNER
30090if test -n "$JARSIGNER"; then
30091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30092$as_echo "$JARSIGNER" >&6; }
30093else
30094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30095$as_echo "no" >&6; }
30096fi
30097
30098
30099          if test "x$JARSIGNER" = x; then
30100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30101          fi
30102        else
30103          # Otherwise we believe it is a complete path. Use it as it is.
30104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30105$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30107$as_echo_n "checking for JARSIGNER... " >&6; }
30108          if test ! -x "$tool_specified"; then
30109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30110$as_echo "not found" >&6; }
30111            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30112          fi
30113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30114$as_echo "$tool_specified" >&6; }
30115        fi
30116      fi
30117    fi
30118
30119  fi
30120
30121
30122
30123  # Finally, set some other options...
30124
30125  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30126  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30127
30128
30129
30130  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30131  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30132  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30133  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30134  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30135  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30136    dummy="$dummy -Xpatch:foo=bar"
30137    JVM_ARG_OK=true
30138  else
30139    $ECHO "Arg failed:" >&5
30140    $ECHO "$OUTPUT" >&5
30141    JVM_ARG_OK=false
30142  fi
30143
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30145$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30146  if test "x$JVM_ARG_OK" = "xtrue"; then
30147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30148$as_echo "yes" >&6; }
30149    BOOT_JDK_MODULAR="true"
30150  else
30151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30152$as_echo "no" >&6; }
30153    BOOT_JDK_MODULAR="false"
30154  fi
30155
30156
30157
30158
30159  # Check if the boot jdk is 32 or 64 bit
30160  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30161    BOOT_JDK_BITS="64"
30162  else
30163    BOOT_JDK_BITS="32"
30164  fi
30165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30166$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30168$as_echo "$BOOT_JDK_BITS" >&6; }
30169
30170
30171
30172
30173# Check whether --with-build-jdk was given.
30174if test "${with_build_jdk+set}" = set; then :
30175  withval=$with_build_jdk;
30176fi
30177
30178
30179  CREATE_BUILDJDK_FOR_HOST=false
30180  BUILD_JDK_FOUND="no"
30181  if test "x$with_build_jdk" != "x"; then
30182
30183  if test "x$BUILD_JDK_FOUND" = xno; then
30184    # Execute the test
30185
30186       if test "x$with_build_jdk" != x; then
30187         BUILD_JDK=$with_build_jdk
30188         BUILD_JDK_FOUND=maybe
30189         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30190$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30191       fi
30192
30193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30194    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30195      # Do we have a bin/java?
30196      if test ! -x "$BUILD_JDK/bin/java"; then
30197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30198$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30199        BUILD_JDK_FOUND=no
30200      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30201        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30202$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30203        BUILD_JDK_FOUND=no
30204      elif test ! -x "$BUILD_JDK/bin/javac"; then
30205        # Do we have a bin/javac?
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30207$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30209$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30210        BUILD_JDK_FOUND=no
30211      else
30212        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30213        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30214
30215        # Extra M4 quote needed to protect [] in grep expression.
30216        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30217        if test "x$FOUND_CORRECT_VERSION" = x; then
30218          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30219$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30220          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30221$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30222          BUILD_JDK_FOUND=no
30223        else
30224          # We're done!
30225          BUILD_JDK_FOUND=yes
30226
30227  # Only process if variable expands to non-empty
30228
30229  if test "x$BUILD_JDK" != x; then
30230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30231
30232  # Input might be given as Windows format, start by converting to
30233  # unix format.
30234  path="$BUILD_JDK"
30235  new_path=`$CYGPATH -u "$path"`
30236
30237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30240  # "foo.exe" is OK but "foo" is an error.
30241  #
30242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30243  # It is also a way to make sure we got the proper file name for the real test later on.
30244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30245  if test "x$test_shortpath" = x; then
30246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30247$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30248    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30249  fi
30250
30251  # Call helper function which possibly converts this using DOS-style short mode.
30252  # If so, the updated path is stored in $new_path.
30253
30254  input_path="$new_path"
30255  # Check if we need to convert this using DOS-style short mode. If the path
30256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30257  # take no chances and rewrite it.
30258  # Note: m4 eats our [], so we need to use [ and ] instead.
30259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30260  if test "x$has_forbidden_chars" != x; then
30261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30265      # Going to short mode and back again did indeed matter. Since short mode is
30266      # case insensitive, let's make it lowercase to improve readability.
30267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30268      # Now convert it back to Unix-style (cygpath)
30269      input_path=`$CYGPATH -u "$shortmode_path"`
30270      new_path="$input_path"
30271    fi
30272  fi
30273
30274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30275  if test "x$test_cygdrive_prefix" = x; then
30276    # As a simple fix, exclude /usr/bin since it's not a real path.
30277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30279      # a path prefixed by /cygdrive for fixpath to work.
30280      new_path="$CYGWIN_ROOT_PATH$input_path"
30281    fi
30282  fi
30283
30284
30285  if test "x$path" != "x$new_path"; then
30286    BUILD_JDK="$new_path"
30287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30288$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30289  fi
30290
30291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30292
30293  path="$BUILD_JDK"
30294  has_colon=`$ECHO $path | $GREP ^.:`
30295  new_path="$path"
30296  if test "x$has_colon" = x; then
30297    # Not in mixed or Windows style, start by that.
30298    new_path=`cmd //c echo $path`
30299  fi
30300
30301
30302  input_path="$new_path"
30303  # Check if we need to convert this using DOS-style short mode. If the path
30304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30305  # take no chances and rewrite it.
30306  # Note: m4 eats our [], so we need to use [ and ] instead.
30307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30308  if test "x$has_forbidden_chars" != x; then
30309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30311  fi
30312
30313
30314  windows_path="$new_path"
30315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30316    unix_path=`$CYGPATH -u "$windows_path"`
30317    new_path="$unix_path"
30318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30320    new_path="$unix_path"
30321  fi
30322
30323  if test "x$path" != "x$new_path"; then
30324    BUILD_JDK="$new_path"
30325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30326$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30327  fi
30328
30329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30331
30332    else
30333      # We're on a unix platform. Hooray! :)
30334      path="$BUILD_JDK"
30335      has_space=`$ECHO "$path" | $GREP " "`
30336      if test "x$has_space" != x; then
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30338$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30340      fi
30341
30342      # Use eval to expand a potential ~
30343      eval path="$path"
30344      if test ! -f "$path" && test ! -d "$path"; then
30345        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30346      fi
30347
30348      if test -d "$path"; then
30349        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30350      else
30351        dir="`$DIRNAME "$path"`"
30352        base="`$BASENAME "$path"`"
30353        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30354      fi
30355    fi
30356  fi
30357
30358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30359$as_echo_n "checking for Build JDK... " >&6; }
30360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30361$as_echo "$BUILD_JDK" >&6; }
30362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30363$as_echo_n "checking Build JDK version... " >&6; }
30364          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30366$as_echo "$BUILD_JDK_VERSION" >&6; }
30367        fi # end check jdk version
30368      fi # end check java
30369    fi # end check build jdk found
30370  fi
30371
30372  else
30373    if test "x$COMPILE_TYPE" = "xcross"; then
30374      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30375      BUILD_JDK_FOUND=yes
30376      CREATE_BUILDJDK=true
30377      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30378$as_echo_n "checking for Build JDK... " >&6; }
30379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30380$as_echo "yes, will build it for the host platform" >&6; }
30381    else
30382      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30383      BUILD_JDK_FOUND=yes
30384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30385$as_echo_n "checking for Build JDK... " >&6; }
30386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30387$as_echo "yes, will use output dir" >&6; }
30388    fi
30389  fi
30390
30391  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30393$as_echo_n "checking for Build JDK... " >&6; }
30394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30395$as_echo "no" >&6; }
30396    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30397  fi
30398
30399
30400
30401
30402
30403###############################################################################
30404#
30405# Configure the sources to use. We can add or override individual directories.
30406#
30407###############################################################################
30408
30409
30410  # Where are the sources.
30411  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30412  CORBA_TOPDIR="$SRC_ROOT/corba"
30413  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30414  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30415  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30416  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30417  JDK_TOPDIR="$SRC_ROOT/jdk"
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427  # This feature is no longer supported.
30428
30429
30430
30431# Check whether --with-add-source-root was given.
30432if test "${with_add_source_root+set}" = set; then :
30433  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
30434$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30435fi
30436
30437
30438
30439
30440# Check whether --with-override-source-root was given.
30441if test "${with_override_source_root+set}" = set; then :
30442  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
30443$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30444fi
30445
30446
30447
30448
30449# Check whether --with-adds-and-overrides was given.
30450if test "${with_adds_and_overrides+set}" = set; then :
30451  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
30452$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30453fi
30454
30455
30456
30457
30458# Check whether --with-override-langtools was given.
30459if test "${with_override_langtools+set}" = set; then :
30460  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30461$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30462fi
30463
30464
30465
30466
30467# Check whether --with-override-corba was given.
30468if test "${with_override_corba+set}" = set; then :
30469  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30470$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30471fi
30472
30473
30474
30475
30476# Check whether --with-override-jaxp was given.
30477if test "${with_override_jaxp+set}" = set; then :
30478  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30479$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30480fi
30481
30482
30483
30484
30485# Check whether --with-override-jaxws was given.
30486if test "${with_override_jaxws+set}" = set; then :
30487  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30488$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30489fi
30490
30491
30492
30493
30494# Check whether --with-override-hotspot was given.
30495if test "${with_override_hotspot+set}" = set; then :
30496  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30497$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30498fi
30499
30500
30501
30502
30503# Check whether --with-override-nashorn was given.
30504if test "${with_override_nashorn+set}" = set; then :
30505  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30506$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30507fi
30508
30509
30510
30511
30512# Check whether --with-override-jdk was given.
30513if test "${with_override_jdk+set}" = set; then :
30514  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30515$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30516fi
30517
30518
30519
30520
30521  BUILD_OUTPUT="$OUTPUT_ROOT"
30522
30523
30524  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30525  BUILD_HOTSPOT=true
30526
30527
30528
30529# Check whether --with-import-hotspot was given.
30530if test "${with_import_hotspot+set}" = set; then :
30531  withval=$with_import_hotspot;
30532fi
30533
30534  if test "x$with_import_hotspot" != x; then
30535    CURDIR="$PWD"
30536    cd "$with_import_hotspot"
30537    HOTSPOT_DIST="`pwd`"
30538    cd "$CURDIR"
30539    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30540      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30541    fi
30542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30543$as_echo_n "checking if hotspot should be imported... " >&6; }
30544    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30545$as_echo "yes from $HOTSPOT_DIST" >&6; }
30546    BUILD_HOTSPOT=false
30547  fi
30548
30549  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30550
30551
30552
30553
30554# Check whether --with-import-modules was given.
30555if test "${with_import_modules+set}" = set; then :
30556  withval=$with_import_modules;
30557fi
30558
30559
30560  if test "x$with_import_modules" != x \
30561      && test "x$with_import_modules" != "xno"; then
30562    if test -d "$with_import_modules"; then
30563      IMPORT_MODULES_TOPDIR="$with_import_modules"
30564
30565  # Only process if variable expands to non-empty
30566
30567  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30569
30570  # Input might be given as Windows format, start by converting to
30571  # unix format.
30572  path="$IMPORT_MODULES_TOPDIR"
30573  new_path=`$CYGPATH -u "$path"`
30574
30575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30578  # "foo.exe" is OK but "foo" is an error.
30579  #
30580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30581  # It is also a way to make sure we got the proper file name for the real test later on.
30582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30583  if test "x$test_shortpath" = x; then
30584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30585$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30586    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30587  fi
30588
30589  # Call helper function which possibly converts this using DOS-style short mode.
30590  # If so, the updated path is stored in $new_path.
30591
30592  input_path="$new_path"
30593  # Check if we need to convert this using DOS-style short mode. If the path
30594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30595  # take no chances and rewrite it.
30596  # Note: m4 eats our [], so we need to use [ and ] instead.
30597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30598  if test "x$has_forbidden_chars" != x; then
30599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30603      # Going to short mode and back again did indeed matter. Since short mode is
30604      # case insensitive, let's make it lowercase to improve readability.
30605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30606      # Now convert it back to Unix-style (cygpath)
30607      input_path=`$CYGPATH -u "$shortmode_path"`
30608      new_path="$input_path"
30609    fi
30610  fi
30611
30612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30613  if test "x$test_cygdrive_prefix" = x; then
30614    # As a simple fix, exclude /usr/bin since it's not a real path.
30615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30617      # a path prefixed by /cygdrive for fixpath to work.
30618      new_path="$CYGWIN_ROOT_PATH$input_path"
30619    fi
30620  fi
30621
30622
30623  if test "x$path" != "x$new_path"; then
30624    IMPORT_MODULES_TOPDIR="$new_path"
30625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30626$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30627  fi
30628
30629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30630
30631  path="$IMPORT_MODULES_TOPDIR"
30632  has_colon=`$ECHO $path | $GREP ^.:`
30633  new_path="$path"
30634  if test "x$has_colon" = x; then
30635    # Not in mixed or Windows style, start by that.
30636    new_path=`cmd //c echo $path`
30637  fi
30638
30639
30640  input_path="$new_path"
30641  # Check if we need to convert this using DOS-style short mode. If the path
30642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30643  # take no chances and rewrite it.
30644  # Note: m4 eats our [], so we need to use [ and ] instead.
30645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30646  if test "x$has_forbidden_chars" != x; then
30647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30649  fi
30650
30651
30652  windows_path="$new_path"
30653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30654    unix_path=`$CYGPATH -u "$windows_path"`
30655    new_path="$unix_path"
30656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30658    new_path="$unix_path"
30659  fi
30660
30661  if test "x$path" != "x$new_path"; then
30662    IMPORT_MODULES_TOPDIR="$new_path"
30663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30664$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30665  fi
30666
30667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30669
30670    else
30671      # We're on a unix platform. Hooray! :)
30672      path="$IMPORT_MODULES_TOPDIR"
30673      has_space=`$ECHO "$path" | $GREP " "`
30674      if test "x$has_space" != x; then
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30676$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30678      fi
30679
30680      # Use eval to expand a potential ~
30681      eval path="$path"
30682      if test ! -f "$path" && test ! -d "$path"; then
30683        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30684      fi
30685
30686      if test -d "$path"; then
30687        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30688      else
30689        dir="`$DIRNAME "$path"`"
30690        base="`$BASENAME "$path"`"
30691        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30692      fi
30693    fi
30694  fi
30695
30696    elif test -e "$with_import_modules"; then
30697      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30698      $RM -rf "$IMPORT_MODULES_TOPDIR"
30699      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30700      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30701        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30702      fi
30703    else
30704      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30705    fi
30706  fi
30707
30708  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30709    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30710  fi
30711  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30712    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30713  fi
30714  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30715    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30716  fi
30717  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30718    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30719  fi
30720  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30721    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30722  fi
30723  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30724    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30725  fi
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735###############################################################################
30736#
30737# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30738# native code.
30739#
30740###############################################################################
30741
30742# See if we are doing a complete static build or not
30743
30744  # Check whether --enable-static-build was given.
30745if test "${enable_static_build+set}" = set; then :
30746  enableval=$enable_static_build;
30747fi
30748
30749  STATIC_BUILD=false
30750  if test "x$enable_static_build" = "xyes"; then
30751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30752$as_echo_n "checking if static build is enabled... " >&6; }
30753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30754$as_echo "yes" >&6; }
30755    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30756      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30757    fi
30758    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30759    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30760    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30761    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30762    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30763    STATIC_BUILD=true
30764  elif test "x$enable_static_build" = "xno"; then
30765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30766$as_echo_n "checking if static build is enabled... " >&6; }
30767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30768$as_echo "no" >&6; }
30769  elif test "x$enable_static_build" != "x"; then
30770    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30771  fi
30772
30773
30774
30775
30776# First determine the toolchain type (compiler family)
30777
30778
30779# Check whether --with-toolchain-type was given.
30780if test "${with_toolchain_type+set}" = set; then :
30781  withval=$with_toolchain_type;
30782fi
30783
30784
30785  # Use indirect variable referencing
30786  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30787  VALID_TOOLCHAINS=${!toolchain_var_name}
30788
30789  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30790    if test -n "$XCODEBUILD"; then
30791      # On Mac OS X, default toolchain to clang after Xcode 5
30792      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30793      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30794      if test $? -ne 0; then
30795        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30796      fi
30797      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30798          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30799          $CUT -f 1 -d .`
30800      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30801$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30802      if test $XCODE_MAJOR_VERSION -ge 5; then
30803          DEFAULT_TOOLCHAIN="clang"
30804      else
30805          DEFAULT_TOOLCHAIN="gcc"
30806      fi
30807    else
30808      # If Xcode is not installed, but the command line tools are
30809      # then we can't run xcodebuild. On these systems we should
30810      # default to clang
30811      DEFAULT_TOOLCHAIN="clang"
30812    fi
30813  else
30814    # First toolchain type in the list is the default
30815    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30816  fi
30817
30818  if test "x$with_toolchain_type" = xlist; then
30819    # List all toolchains
30820    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30821$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30822    for toolchain in $VALID_TOOLCHAINS; do
30823      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30824      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30825      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30826    done
30827
30828    exit 0
30829  elif test "x$with_toolchain_type" != x; then
30830    # User override; check that it is valid
30831    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30832      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30833$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30834      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30835$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30836      as_fn_error $? "Cannot continue." "$LINENO" 5
30837    fi
30838    TOOLCHAIN_TYPE=$with_toolchain_type
30839  else
30840    # No flag given, use default
30841    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30842  fi
30843
30844
30845  TOOLCHAIN_CC_BINARY_clang="clang"
30846  TOOLCHAIN_CC_BINARY_gcc="gcc"
30847  TOOLCHAIN_CC_BINARY_microsoft="cl"
30848  TOOLCHAIN_CC_BINARY_solstudio="cc"
30849  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30850
30851  TOOLCHAIN_CXX_BINARY_clang="clang++"
30852  TOOLCHAIN_CXX_BINARY_gcc="g++"
30853  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30854  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30855  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30856
30857  # Use indirect variable referencing
30858  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30859  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30860  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30861  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30862  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30863  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30864  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30865  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30866
30867
30868  # Define filename patterns
30869  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30870    LIBRARY_PREFIX=
30871    SHARED_LIBRARY_SUFFIX='.dll'
30872    STATIC_LIBRARY_SUFFIX='.lib'
30873    SHARED_LIBRARY='$1.dll'
30874    STATIC_LIBRARY='$1.lib'
30875    OBJ_SUFFIX='.obj'
30876    EXE_SUFFIX='.exe'
30877  else
30878    LIBRARY_PREFIX=lib
30879    SHARED_LIBRARY_SUFFIX='.so'
30880    STATIC_LIBRARY_SUFFIX='.a'
30881    SHARED_LIBRARY='lib$1.so'
30882    STATIC_LIBRARY='lib$1.a'
30883    OBJ_SUFFIX='.o'
30884    EXE_SUFFIX=''
30885    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30886      # For full static builds, we're overloading the SHARED_LIBRARY
30887      # variables in order to limit the amount of changes required.
30888      # It would be better to remove SHARED and just use LIBRARY and
30889      # LIBRARY_SUFFIX for libraries that can be built either
30890      # shared or static and use STATIC_* for libraries that are
30891      # always built statically.
30892      if test "x$STATIC_BUILD" = xtrue; then
30893        SHARED_LIBRARY='lib$1.a'
30894        SHARED_LIBRARY_SUFFIX='.a'
30895      else
30896        SHARED_LIBRARY='lib$1.dylib'
30897        SHARED_LIBRARY_SUFFIX='.dylib'
30898      fi
30899    fi
30900  fi
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30912    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30913$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30914  else
30915    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30916$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30917  fi
30918
30919
30920# User supplied flags should be used when configure detects compilers
30921
30922  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30924$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30925  fi
30926
30927  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30928    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30929$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30930  fi
30931
30932  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30933    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30934$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30935  fi
30936
30937
30938# Check whether --with-extra-cflags was given.
30939if test "${with_extra_cflags+set}" = set; then :
30940  withval=$with_extra_cflags;
30941fi
30942
30943
30944
30945# Check whether --with-extra-cxxflags was given.
30946if test "${with_extra_cxxflags+set}" = set; then :
30947  withval=$with_extra_cxxflags;
30948fi
30949
30950
30951
30952# Check whether --with-extra-ldflags was given.
30953if test "${with_extra_ldflags+set}" = set; then :
30954  withval=$with_extra_ldflags;
30955fi
30956
30957
30958  EXTRA_CFLAGS="$with_extra_cflags"
30959  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30960  EXTRA_LDFLAGS="$with_extra_ldflags"
30961
30962  # Hotspot needs these set in their legacy form
30963  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30964  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30965  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975  # The global CFLAGS and LDLAGS variables are used by configure tests and
30976  # should include the extra parameters
30977  CFLAGS="$EXTRA_CFLAGS"
30978  CXXFLAGS="$EXTRA_CXXFLAGS"
30979  LDFLAGS="$EXTRA_LDFLAGS"
30980  CPPFLAGS=""
30981
30982# The sysroot cflags are needed for configure to be able to run the compilers
30983
30984  if test "x$SYSROOT" != "x"; then
30985    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30986      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30987        # Solaris Studio does not have a concept of sysroot. Instead we must
30988        # make sure the default include and lib dirs are appended to each
30989        # compile and link command line. Must also add -I-xbuiltin to enable
30990        # inlining of system functions and intrinsics.
30991        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30992        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30993            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30994            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30995      fi
30996    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30997      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30998      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30999    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31000      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31001      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31002    fi
31003    # Propagate the sysroot args to hotspot
31004    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31005    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31006    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31007    # The global CFLAGS and LDFLAGS variables need these for configure to function
31008    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31009    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31010    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31011    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31012  fi
31013
31014  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31015    # We also need -iframework<path>/System/Library/Frameworks
31016    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31017    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31018    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31019    # set this here so it doesn't have to be peppered throughout the forest
31020    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31021    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31022  fi
31023
31024
31025
31026
31027
31028# Then detect the actual binaries needed
31029
31030  # FIXME: Is this needed?
31031  ac_ext=cpp
31032ac_cpp='$CXXCPP $CPPFLAGS'
31033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31036
31037
31038  # Store the CFLAGS etc passed to the configure script.
31039  ORG_CFLAGS="$CFLAGS"
31040  ORG_CXXFLAGS="$CXXFLAGS"
31041
31042  # autoconf magic only relies on PATH, so update it if tools dir is specified
31043  OLD_PATH="$PATH"
31044
31045  # On Windows, we need to detect the visual studio installation first.
31046  # This will change the PATH, but we need to keep that new PATH even
31047  # after toolchain detection is done, since the compiler (on x86) uses
31048  # it for DLL resolution in runtime.
31049  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31050      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31051
31052  # Store path to cygwin link.exe to help excluding it when searching for
31053  # VS linker. This must be done before changing the PATH when looking for VS.
31054  # Extract the first word of "link", so it can be a program name with args.
31055set dummy link; ac_word=$2
31056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31057$as_echo_n "checking for $ac_word... " >&6; }
31058if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31059  $as_echo_n "(cached) " >&6
31060else
31061  case $CYGWIN_LINK in
31062  [\\/]* | ?:[\\/]*)
31063  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31064  ;;
31065  *)
31066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31067for as_dir in $PATH
31068do
31069  IFS=$as_save_IFS
31070  test -z "$as_dir" && as_dir=.
31071    for ac_exec_ext in '' $ac_executable_extensions; do
31072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31073    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31075    break 2
31076  fi
31077done
31078  done
31079IFS=$as_save_IFS
31080
31081  ;;
31082esac
31083fi
31084CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31085if test -n "$CYGWIN_LINK"; then
31086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31087$as_echo "$CYGWIN_LINK" >&6; }
31088else
31089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31090$as_echo "no" >&6; }
31091fi
31092
31093
31094  if test "x$CYGWIN_LINK" != x; then
31095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31096$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31097    "$CYGWIN_LINK" --version > /dev/null
31098    if test $? -eq 0 ; then
31099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31100$as_echo "yes" >&6; }
31101    else
31102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31103$as_echo "no" >&6; }
31104      # This might be the VS linker. Don't exclude it later on.
31105      CYGWIN_LINK=""
31106    fi
31107  fi
31108
31109  # First-hand choice is to locate and run the vsvars bat file.
31110
31111
31112# Check whether --with-toolchain-version was given.
31113if test "${with_toolchain_version+set}" = set; then :
31114  withval=$with_toolchain_version;
31115fi
31116
31117
31118  if test "x$with_toolchain_version" = xlist; then
31119    # List all toolchains
31120    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31121$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31122    for version in $VALID_VS_VERSIONS; do
31123      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31124      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31125    done
31126
31127    exit 0
31128  elif test "x$DEVKIT_VS_VERSION" != x; then
31129    VS_VERSION=$DEVKIT_VS_VERSION
31130    TOOLCHAIN_VERSION=$VS_VERSION
31131    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31132    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31133    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31134    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31135    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31136    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31137
31138    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31139    # can still be exported as INCLUDE for compiler invocations without
31140    # SYSROOT_CFLAGS
31141    OLDIFS="$IFS"
31142    IFS=";"
31143    for i in $DEVKIT_VS_INCLUDE; do
31144      ipath=$i
31145
31146  unix_path="$ipath"
31147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31148    windows_path=`$CYGPATH -m "$unix_path"`
31149    ipath="$windows_path"
31150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31151    windows_path=`cmd //c echo $unix_path`
31152    ipath="$windows_path"
31153  fi
31154
31155      VS_INCLUDE="$VS_INCLUDE;$ipath"
31156    done
31157    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31158    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31159    for i in $DEVKIT_VS_LIB; do
31160      libpath=$i
31161
31162  unix_path="$libpath"
31163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31164    windows_path=`$CYGPATH -m "$unix_path"`
31165    libpath="$windows_path"
31166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31167    windows_path=`cmd //c echo $unix_path`
31168    libpath="$windows_path"
31169  fi
31170
31171      VS_LIB="$VS_LIB;$libpath"
31172    done
31173    IFS="$OLDIFS"
31174
31175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31176$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31177
31178  elif test "x$with_toolchain_version" != x; then
31179    # User override; check that it is valid
31180    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31181      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31182$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31183      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31184$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31185      as_fn_error $? "Cannot continue." "$LINENO" 5
31186    fi
31187    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31188  else
31189    # No flag given, use default
31190    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31191  fi
31192
31193  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31194
31195  VS_VERSION="$VS_VERSION"
31196  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31197  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31198  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31199  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31200
31201  # When using --with-tools-dir, assume it points to the correct and default
31202  # version of Visual Studio or that --with-toolchain-version was also set.
31203  if test "x$with_tools_dir" != x; then
31204
31205  if test "x$VS_ENV_CMD" = x; then
31206    VS_VERSION="${VS_VERSION}"
31207    VS_BASE="$with_tools_dir/../.."
31208    METHOD="--with-tools-dir"
31209
31210    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31211      VCVARSFILE="vc/bin/vcvars32.bat"
31212    else
31213      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31214    fi
31215
31216
31217  windows_path="$VS_BASE"
31218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31219    unix_path=`$CYGPATH -u "$windows_path"`
31220    VS_BASE="$unix_path"
31221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31223    VS_BASE="$unix_path"
31224  fi
31225
31226    if test -d "$VS_BASE"; then
31227      if test -f "$VS_BASE/$VCVARSFILE"; then
31228        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31229$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31230        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31231        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31232        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31233        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31234      else
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31236$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31237        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31238$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31239      fi
31240    fi
31241  fi
31242
31243
31244  if test "x$VS_ENV_CMD" = x; then
31245    VS_VERSION="${VS_VERSION}"
31246    VS_BASE="$with_tools_dir/../../.."
31247    METHOD="--with-tools-dir"
31248
31249    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31250      VCVARSFILE="vc/bin/vcvars32.bat"
31251    else
31252      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31253    fi
31254
31255
31256  windows_path="$VS_BASE"
31257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31258    unix_path=`$CYGPATH -u "$windows_path"`
31259    VS_BASE="$unix_path"
31260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31262    VS_BASE="$unix_path"
31263  fi
31264
31265    if test -d "$VS_BASE"; then
31266      if test -f "$VS_BASE/$VCVARSFILE"; then
31267        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31268$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31269        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31270        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31271        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31272        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31273      else
31274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31275$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31276        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31277$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31278      fi
31279    fi
31280  fi
31281
31282    if test "x$VS_ENV_CMD" = x; then
31283      # Having specified an argument which is incorrect will produce an instant failure;
31284      # we should not go on looking
31285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31286$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31287      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31288$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31289      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31290$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31291      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31292    fi
31293  fi
31294
31295  VS_ENV_CMD=""
31296  VS_ENV_ARGS=""
31297
31298  if test "x$VS_COMNTOOLS" != x; then
31299
31300  if test "x$VS_ENV_CMD" = x; then
31301    VS_VERSION="${VS_VERSION}"
31302    VS_BASE="$VS_COMNTOOLS/../.."
31303    METHOD="$VS_COMNTOOLS_VAR variable"
31304
31305    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31306      VCVARSFILE="vc/bin/vcvars32.bat"
31307    else
31308      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31309    fi
31310
31311
31312  windows_path="$VS_BASE"
31313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31314    unix_path=`$CYGPATH -u "$windows_path"`
31315    VS_BASE="$unix_path"
31316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31318    VS_BASE="$unix_path"
31319  fi
31320
31321    if test -d "$VS_BASE"; then
31322      if test -f "$VS_BASE/$VCVARSFILE"; then
31323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31324$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31325        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31326        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31327        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31328        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31329      else
31330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31331$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31333$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31334      fi
31335    fi
31336  fi
31337
31338  fi
31339  if test "x$PROGRAMFILES" != x; then
31340
31341  if test "x$VS_ENV_CMD" = x; then
31342    VS_VERSION="${VS_VERSION}"
31343    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31344    METHOD="well-known name"
31345
31346    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31347      VCVARSFILE="vc/bin/vcvars32.bat"
31348    else
31349      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31350    fi
31351
31352
31353  windows_path="$VS_BASE"
31354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31355    unix_path=`$CYGPATH -u "$windows_path"`
31356    VS_BASE="$unix_path"
31357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31359    VS_BASE="$unix_path"
31360  fi
31361
31362    if test -d "$VS_BASE"; then
31363      if test -f "$VS_BASE/$VCVARSFILE"; then
31364        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31365$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31366        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31367        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31368        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31369        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31370      else
31371        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31372$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31373        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31374$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31375      fi
31376    fi
31377  fi
31378
31379  fi
31380  # Work around the insanely named ProgramFiles(x86) env variable
31381  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31382  if test "x$PROGRAMFILES_X86" != x; then
31383
31384  if test "x$VS_ENV_CMD" = x; then
31385    VS_VERSION="${VS_VERSION}"
31386    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31387    METHOD="well-known name"
31388
31389    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31390      VCVARSFILE="vc/bin/vcvars32.bat"
31391    else
31392      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31393    fi
31394
31395
31396  windows_path="$VS_BASE"
31397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31398    unix_path=`$CYGPATH -u "$windows_path"`
31399    VS_BASE="$unix_path"
31400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31402    VS_BASE="$unix_path"
31403  fi
31404
31405    if test -d "$VS_BASE"; then
31406      if test -f "$VS_BASE/$VCVARSFILE"; then
31407        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31408$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31409        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31410        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31411        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31412        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31413      else
31414        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31415$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31416        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31417$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31418      fi
31419    fi
31420  fi
31421
31422  fi
31423
31424  if test "x$VS_ENV_CMD" = x; then
31425    VS_VERSION="${VS_VERSION}"
31426    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31427    METHOD="well-known name"
31428
31429    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31430      VCVARSFILE="vc/bin/vcvars32.bat"
31431    else
31432      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31433    fi
31434
31435
31436  windows_path="$VS_BASE"
31437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31438    unix_path=`$CYGPATH -u "$windows_path"`
31439    VS_BASE="$unix_path"
31440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31442    VS_BASE="$unix_path"
31443  fi
31444
31445    if test -d "$VS_BASE"; then
31446      if test -f "$VS_BASE/$VCVARSFILE"; then
31447        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31448$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31449        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31450        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31451        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31452        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31453      else
31454        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31455$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31456        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31457$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31458      fi
31459    fi
31460  fi
31461
31462
31463  if test "x$VS_ENV_CMD" = x; then
31464    VS_VERSION="${VS_VERSION}"
31465    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31466    METHOD="well-known name"
31467
31468    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31469      VCVARSFILE="vc/bin/vcvars32.bat"
31470    else
31471      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31472    fi
31473
31474
31475  windows_path="$VS_BASE"
31476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31477    unix_path=`$CYGPATH -u "$windows_path"`
31478    VS_BASE="$unix_path"
31479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31481    VS_BASE="$unix_path"
31482  fi
31483
31484    if test -d "$VS_BASE"; then
31485      if test -f "$VS_BASE/$VCVARSFILE"; then
31486        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31487$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31488        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31489        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31490        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31491        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31492      else
31493        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31494$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31495        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31496$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31497      fi
31498    fi
31499  fi
31500
31501
31502  if test "x$SDK_INSTALL_DIR" != x; then
31503    if test "x$ProgramW6432" != x; then
31504
31505  if test "x$VS_ENV_CMD" = x; then
31506    VS_VERSION="${VS_VERSION}"
31507    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31508    METHOD="well-known name"
31509
31510  windows_path="$WIN_SDK_BASE"
31511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31512    unix_path=`$CYGPATH -u "$windows_path"`
31513    WIN_SDK_BASE="$unix_path"
31514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31516    WIN_SDK_BASE="$unix_path"
31517  fi
31518
31519    if test -d "$WIN_SDK_BASE"; then
31520      # There have been cases of partial or broken SDK installations. A missing
31521      # lib dir is not going to work.
31522      if test ! -d "$WIN_SDK_BASE/lib"; then
31523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31524$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31525        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31526$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31527      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31528        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31529$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31530        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31531        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31532          VS_ENV_ARGS="/x86"
31533        else
31534          VS_ENV_ARGS="/x64"
31535        fi
31536        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31537        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31538        # TODO: improve detection for other versions of SDK
31539        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31540      else
31541        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31542$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31543        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31544$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31545      fi
31546    fi
31547  fi
31548
31549    fi
31550    if test "x$PROGRAMW6432" != x; then
31551
31552  if test "x$VS_ENV_CMD" = x; then
31553    VS_VERSION="${VS_VERSION}"
31554    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31555    METHOD="well-known name"
31556
31557  windows_path="$WIN_SDK_BASE"
31558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31559    unix_path=`$CYGPATH -u "$windows_path"`
31560    WIN_SDK_BASE="$unix_path"
31561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31563    WIN_SDK_BASE="$unix_path"
31564  fi
31565
31566    if test -d "$WIN_SDK_BASE"; then
31567      # There have been cases of partial or broken SDK installations. A missing
31568      # lib dir is not going to work.
31569      if test ! -d "$WIN_SDK_BASE/lib"; then
31570        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31571$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31572        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31573$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31574      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31576$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31577        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31578        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31579          VS_ENV_ARGS="/x86"
31580        else
31581          VS_ENV_ARGS="/x64"
31582        fi
31583        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31584        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31585        # TODO: improve detection for other versions of SDK
31586        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31587      else
31588        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31589$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31590        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31591$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31592      fi
31593    fi
31594  fi
31595
31596    fi
31597    if test "x$PROGRAMFILES" != x; then
31598
31599  if test "x$VS_ENV_CMD" = x; then
31600    VS_VERSION="${VS_VERSION}"
31601    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31602    METHOD="well-known name"
31603
31604  windows_path="$WIN_SDK_BASE"
31605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31606    unix_path=`$CYGPATH -u "$windows_path"`
31607    WIN_SDK_BASE="$unix_path"
31608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31610    WIN_SDK_BASE="$unix_path"
31611  fi
31612
31613    if test -d "$WIN_SDK_BASE"; then
31614      # There have been cases of partial or broken SDK installations. A missing
31615      # lib dir is not going to work.
31616      if test ! -d "$WIN_SDK_BASE/lib"; then
31617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31618$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31619        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31620$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31621      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31623$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31624        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31625        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31626          VS_ENV_ARGS="/x86"
31627        else
31628          VS_ENV_ARGS="/x64"
31629        fi
31630        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31631        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31632        # TODO: improve detection for other versions of SDK
31633        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31634      else
31635        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31636$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31637        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31638$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31639      fi
31640    fi
31641  fi
31642
31643    fi
31644
31645  if test "x$VS_ENV_CMD" = x; then
31646    VS_VERSION="${VS_VERSION}"
31647    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31648    METHOD="well-known name"
31649
31650  windows_path="$WIN_SDK_BASE"
31651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31652    unix_path=`$CYGPATH -u "$windows_path"`
31653    WIN_SDK_BASE="$unix_path"
31654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31656    WIN_SDK_BASE="$unix_path"
31657  fi
31658
31659    if test -d "$WIN_SDK_BASE"; then
31660      # There have been cases of partial or broken SDK installations. A missing
31661      # lib dir is not going to work.
31662      if test ! -d "$WIN_SDK_BASE/lib"; then
31663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31665        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31666$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31667      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31668        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31669$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31670        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31671        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31672          VS_ENV_ARGS="/x86"
31673        else
31674          VS_ENV_ARGS="/x64"
31675        fi
31676        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31677        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31678        # TODO: improve detection for other versions of SDK
31679        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31680      else
31681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31682$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31683        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31684$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31685      fi
31686    fi
31687  fi
31688
31689
31690  if test "x$VS_ENV_CMD" = x; then
31691    VS_VERSION="${VS_VERSION}"
31692    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31693    METHOD="well-known name"
31694
31695  windows_path="$WIN_SDK_BASE"
31696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31697    unix_path=`$CYGPATH -u "$windows_path"`
31698    WIN_SDK_BASE="$unix_path"
31699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31701    WIN_SDK_BASE="$unix_path"
31702  fi
31703
31704    if test -d "$WIN_SDK_BASE"; then
31705      # There have been cases of partial or broken SDK installations. A missing
31706      # lib dir is not going to work.
31707      if test ! -d "$WIN_SDK_BASE/lib"; then
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31709$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31710        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31711$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31712      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31714$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31715        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31716        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31717          VS_ENV_ARGS="/x86"
31718        else
31719          VS_ENV_ARGS="/x64"
31720        fi
31721        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31722        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31723        # TODO: improve detection for other versions of SDK
31724        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31725      else
31726        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31727$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31728        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31729$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31730      fi
31731    fi
31732  fi
31733
31734  fi
31735
31736    if test "x$VS_ENV_CMD" != x; then
31737      TOOLCHAIN_VERSION=$VS_VERSION
31738      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31739      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31740      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31741      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31742      # The rest of the variables are already evaled while probing
31743      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31744$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31745      break
31746    fi
31747  done
31748
31749
31750  # If we have a devkit, skip all of the below.
31751  if test "x$DEVKIT_VS_VERSION" = x; then
31752    if test "x$VS_ENV_CMD" != x; then
31753      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31754
31755  # Only process if variable expands to non-empty
31756
31757  if test "x$VS_ENV_CMD" != x; then
31758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31759
31760  # First separate the path from the arguments. This will split at the first
31761  # space.
31762  complete="$VS_ENV_CMD"
31763  path="${complete%% *}"
31764  tmp="$complete EOL"
31765  arguments="${tmp#* }"
31766
31767  # Input might be given as Windows format, start by converting to
31768  # unix format.
31769  new_path=`$CYGPATH -u "$path"`
31770
31771  # Now try to locate executable using which
31772  new_path=`$WHICH "$new_path" 2> /dev/null`
31773  # bat and cmd files are not always considered executable in cygwin causing which
31774  # to not find them
31775  if test "x$new_path" = x \
31776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31778    new_path=`$CYGPATH -u "$path"`
31779  fi
31780  if test "x$new_path" = x; then
31781    # Oops. Which didn't find the executable.
31782    # The splitting of arguments from the executable at a space might have been incorrect,
31783    # since paths with space are more likely in Windows. Give it another try with the whole
31784    # argument.
31785    path="$complete"
31786    arguments="EOL"
31787    new_path=`$CYGPATH -u "$path"`
31788    new_path=`$WHICH "$new_path" 2> /dev/null`
31789    # bat and cmd files are not always considered executable in cygwin causing which
31790    # to not find them
31791    if test "x$new_path" = x \
31792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31794      new_path=`$CYGPATH -u "$path"`
31795    fi
31796    if test "x$new_path" = x; then
31797      # It's still not found. Now this is an unrecoverable error.
31798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31799$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31800      has_space=`$ECHO "$complete" | $GREP " "`
31801      if test "x$has_space" != x; then
31802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31804      fi
31805      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31806    fi
31807  fi
31808
31809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31812  # "foo.exe" is OK but "foo" is an error.
31813  #
31814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31815  # It is also a way to make sure we got the proper file name for the real test later on.
31816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31817  if test "x$test_shortpath" = x; then
31818    # Short path failed, file does not exist as specified.
31819    # Try adding .exe or .cmd
31820    if test -f "${new_path}.exe"; then
31821      input_to_shortpath="${new_path}.exe"
31822    elif test -f "${new_path}.cmd"; then
31823      input_to_shortpath="${new_path}.cmd"
31824    else
31825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31826$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31829      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31830    fi
31831  else
31832    input_to_shortpath="$new_path"
31833  fi
31834
31835  # Call helper function which possibly converts this using DOS-style short mode.
31836  # If so, the updated path is stored in $new_path.
31837  new_path="$input_to_shortpath"
31838
31839  input_path="$input_to_shortpath"
31840  # Check if we need to convert this using DOS-style short mode. If the path
31841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31842  # take no chances and rewrite it.
31843  # Note: m4 eats our [], so we need to use [ and ] instead.
31844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31845  if test "x$has_forbidden_chars" != x; then
31846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31850      # Going to short mode and back again did indeed matter. Since short mode is
31851      # case insensitive, let's make it lowercase to improve readability.
31852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31853      # Now convert it back to Unix-style (cygpath)
31854      input_path=`$CYGPATH -u "$shortmode_path"`
31855      new_path="$input_path"
31856    fi
31857  fi
31858
31859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31860  if test "x$test_cygdrive_prefix" = x; then
31861    # As a simple fix, exclude /usr/bin since it's not a real path.
31862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31864      # a path prefixed by /cygdrive for fixpath to work.
31865      new_path="$CYGWIN_ROOT_PATH$input_path"
31866    fi
31867  fi
31868
31869  # remove trailing .exe if any
31870  new_path="${new_path/%.exe/}"
31871
31872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873
31874  # First separate the path from the arguments. This will split at the first
31875  # space.
31876  complete="$VS_ENV_CMD"
31877  path="${complete%% *}"
31878  tmp="$complete EOL"
31879  arguments="${tmp#* }"
31880
31881  # Input might be given as Windows format, start by converting to
31882  # unix format.
31883  new_path="$path"
31884
31885  windows_path="$new_path"
31886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31887    unix_path=`$CYGPATH -u "$windows_path"`
31888    new_path="$unix_path"
31889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31891    new_path="$unix_path"
31892  fi
31893
31894
31895  # Now try to locate executable using which
31896  new_path=`$WHICH "$new_path" 2> /dev/null`
31897
31898  if test "x$new_path" = x; then
31899    # Oops. Which didn't find the executable.
31900    # The splitting of arguments from the executable at a space might have been incorrect,
31901    # since paths with space are more likely in Windows. Give it another try with the whole
31902    # argument.
31903    path="$complete"
31904    arguments="EOL"
31905    new_path="$path"
31906
31907  windows_path="$new_path"
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909    unix_path=`$CYGPATH -u "$windows_path"`
31910    new_path="$unix_path"
31911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31913    new_path="$unix_path"
31914  fi
31915
31916
31917    new_path=`$WHICH "$new_path" 2> /dev/null`
31918    # bat and cmd files are not always considered executable in MSYS causing which
31919    # to not find them
31920    if test "x$new_path" = x \
31921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31923      new_path="$path"
31924
31925  windows_path="$new_path"
31926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31927    unix_path=`$CYGPATH -u "$windows_path"`
31928    new_path="$unix_path"
31929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31931    new_path="$unix_path"
31932  fi
31933
31934    fi
31935
31936    if test "x$new_path" = x; then
31937      # It's still not found. Now this is an unrecoverable error.
31938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31939$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31940      has_space=`$ECHO "$complete" | $GREP " "`
31941      if test "x$has_space" != x; then
31942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31944      fi
31945      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31946    fi
31947  fi
31948
31949  # Now new_path has a complete unix path to the binary
31950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31951    # Keep paths in /bin as-is, but remove trailing .exe if any
31952    new_path="${new_path/%.exe/}"
31953    # Do not save /bin paths to all_fixpath_prefixes!
31954  else
31955    # Not in mixed or Windows style, start by that.
31956    new_path=`cmd //c echo $new_path`
31957
31958  input_path="$new_path"
31959  # Check if we need to convert this using DOS-style short mode. If the path
31960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31961  # take no chances and rewrite it.
31962  # Note: m4 eats our [], so we need to use [ and ] instead.
31963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31964  if test "x$has_forbidden_chars" != x; then
31965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31967  fi
31968
31969    # Output is in $new_path
31970
31971  windows_path="$new_path"
31972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31973    unix_path=`$CYGPATH -u "$windows_path"`
31974    new_path="$unix_path"
31975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31977    new_path="$unix_path"
31978  fi
31979
31980    # remove trailing .exe if any
31981    new_path="${new_path/%.exe/}"
31982
31983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31985  fi
31986
31987    else
31988      # We're on a unix platform. Hooray! :)
31989      # First separate the path from the arguments. This will split at the first
31990      # space.
31991      complete="$VS_ENV_CMD"
31992      path="${complete%% *}"
31993      tmp="$complete EOL"
31994      arguments="${tmp#* }"
31995
31996      # Cannot rely on the command "which" here since it doesn't always work.
31997      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31998      if test -z "$is_absolute_path"; then
31999        # Path to executable is not absolute. Find it.
32000        IFS_save="$IFS"
32001        IFS=:
32002        for p in $PATH; do
32003          if test -f "$p/$path" && test -x "$p/$path"; then
32004            new_path="$p/$path"
32005            break
32006          fi
32007        done
32008        IFS="$IFS_save"
32009      else
32010        # This is an absolute path, we can use it without further modifications.
32011        new_path="$path"
32012      fi
32013
32014      if test "x$new_path" = x; then
32015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32016$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32017        has_space=`$ECHO "$complete" | $GREP " "`
32018        if test "x$has_space" != x; then
32019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32021        fi
32022        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32023      fi
32024    fi
32025
32026    # Now join together the path and the arguments once again
32027    if test "x$arguments" != xEOL; then
32028      new_complete="$new_path ${arguments% *}"
32029    else
32030      new_complete="$new_path"
32031    fi
32032
32033    if test "x$complete" != "x$new_complete"; then
32034      VS_ENV_CMD="$new_complete"
32035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32036$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32037    fi
32038  fi
32039
32040
32041      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32042      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32043$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32044
32045      # We need to create a couple of temporary files.
32046      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32047      $MKDIR -p $VS_ENV_TMP_DIR
32048
32049      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32050      # Instead create a shell script which will set the relevant variables when run.
32051      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32052
32053  unix_path="$WINPATH_VS_ENV_CMD"
32054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32055    windows_path=`$CYGPATH -m "$unix_path"`
32056    WINPATH_VS_ENV_CMD="$windows_path"
32057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32058    windows_path=`cmd //c echo $unix_path`
32059    WINPATH_VS_ENV_CMD="$windows_path"
32060  fi
32061
32062      WINPATH_BASH="$BASH"
32063
32064  unix_path="$WINPATH_BASH"
32065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32066    windows_path=`$CYGPATH -m "$unix_path"`
32067    WINPATH_BASH="$windows_path"
32068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32069    windows_path=`cmd //c echo $unix_path`
32070    WINPATH_BASH="$windows_path"
32071  fi
32072
32073
32074      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32075      # script (executable by bash) that will setup the important variables.
32076      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32077      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32078      # This will end up something like:
32079      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32080      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32081      # These will end up something like:
32082      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32083      # The trailing space for everyone except PATH is no typo, but is needed due
32084      # to trailing \ in the Windows paths. These will be stripped later.
32085      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32086          >> $EXTRACT_VC_ENV_BAT_FILE
32087      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32088          >> $EXTRACT_VC_ENV_BAT_FILE
32089      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32090          >> $EXTRACT_VC_ENV_BAT_FILE
32091      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32092          >> $EXTRACT_VC_ENV_BAT_FILE
32093      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32094          >> $EXTRACT_VC_ENV_BAT_FILE
32095      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32096          >> $EXTRACT_VC_ENV_BAT_FILE
32097
32098      # Now execute the newly created bat file.
32099      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32100      # Change directory so we don't need to mess with Windows paths in redirects.
32101      cd $VS_ENV_TMP_DIR
32102      cmd /c extract-vs-env.bat | $CAT
32103      cd $CURDIR
32104
32105      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32107$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32109$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32111$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32112        as_fn_error $? "Cannot continue" "$LINENO" 5
32113      fi
32114
32115      # Now set all paths and other env variables. This will allow the rest of
32116      # the configure script to find and run the compiler in the proper way.
32117      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32118$as_echo "$as_me: Setting extracted environment variables" >&6;}
32119      . $VS_ENV_TMP_DIR/set-vs-env.sh
32120      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32121      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32122    else
32123      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32124      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32125$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32126    fi
32127  fi
32128
32129  # At this point, we should have correct variables in the environment, or we can't continue.
32130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32131$as_echo_n "checking for Visual Studio variables... " >&6; }
32132
32133  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32134      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32135    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32137$as_echo "present but broken" >&6; }
32138      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32139    else
32140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32141$as_echo "ok" >&6; }
32142      # Remove any trailing "\" ";" and " " from the variables.
32143      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32144      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32145      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32146      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32147      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32148      # Remove any paths containing # (typically F#) as that messes up make. This
32149      # is needed if visual studio was installed with F# support.
32150      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32151
32152
32153
32154
32155
32156      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32157      OLDIFS="$IFS"
32158      IFS=";"
32159      for i in $VS_INCLUDE; do
32160        ipath=$i
32161        # Only process non-empty elements
32162        if test "x$ipath" != x; then
32163          IFS="$OLDIFS"
32164          # Check that directory exists before calling fixup_path
32165          testpath=$ipath
32166
32167  windows_path="$testpath"
32168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32169    unix_path=`$CYGPATH -u "$windows_path"`
32170    testpath="$unix_path"
32171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32173    testpath="$unix_path"
32174  fi
32175
32176          if test -d "$testpath"; then
32177
32178  # Only process if variable expands to non-empty
32179
32180  if test "x$ipath" != x; then
32181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32182
32183  # Input might be given as Windows format, start by converting to
32184  # unix format.
32185  path="$ipath"
32186  new_path=`$CYGPATH -u "$path"`
32187
32188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32191  # "foo.exe" is OK but "foo" is an error.
32192  #
32193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32194  # It is also a way to make sure we got the proper file name for the real test later on.
32195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32196  if test "x$test_shortpath" = x; then
32197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32198$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32199    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32200  fi
32201
32202  # Call helper function which possibly converts this using DOS-style short mode.
32203  # If so, the updated path is stored in $new_path.
32204
32205  input_path="$new_path"
32206  # Check if we need to convert this using DOS-style short mode. If the path
32207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32208  # take no chances and rewrite it.
32209  # Note: m4 eats our [], so we need to use [ and ] instead.
32210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32211  if test "x$has_forbidden_chars" != x; then
32212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32216      # Going to short mode and back again did indeed matter. Since short mode is
32217      # case insensitive, let's make it lowercase to improve readability.
32218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32219      # Now convert it back to Unix-style (cygpath)
32220      input_path=`$CYGPATH -u "$shortmode_path"`
32221      new_path="$input_path"
32222    fi
32223  fi
32224
32225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32226  if test "x$test_cygdrive_prefix" = x; then
32227    # As a simple fix, exclude /usr/bin since it's not a real path.
32228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32230      # a path prefixed by /cygdrive for fixpath to work.
32231      new_path="$CYGWIN_ROOT_PATH$input_path"
32232    fi
32233  fi
32234
32235
32236  if test "x$path" != "x$new_path"; then
32237    ipath="$new_path"
32238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32239$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32240  fi
32241
32242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32243
32244  path="$ipath"
32245  has_colon=`$ECHO $path | $GREP ^.:`
32246  new_path="$path"
32247  if test "x$has_colon" = x; then
32248    # Not in mixed or Windows style, start by that.
32249    new_path=`cmd //c echo $path`
32250  fi
32251
32252
32253  input_path="$new_path"
32254  # Check if we need to convert this using DOS-style short mode. If the path
32255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32256  # take no chances and rewrite it.
32257  # Note: m4 eats our [], so we need to use [ and ] instead.
32258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32259  if test "x$has_forbidden_chars" != x; then
32260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32262  fi
32263
32264
32265  windows_path="$new_path"
32266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32267    unix_path=`$CYGPATH -u "$windows_path"`
32268    new_path="$unix_path"
32269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32271    new_path="$unix_path"
32272  fi
32273
32274  if test "x$path" != "x$new_path"; then
32275    ipath="$new_path"
32276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32277$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32278  fi
32279
32280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32282
32283    else
32284      # We're on a unix platform. Hooray! :)
32285      path="$ipath"
32286      has_space=`$ECHO "$path" | $GREP " "`
32287      if test "x$has_space" != x; then
32288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32289$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32291      fi
32292
32293      # Use eval to expand a potential ~
32294      eval path="$path"
32295      if test ! -f "$path" && test ! -d "$path"; then
32296        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32297      fi
32298
32299      if test -d "$path"; then
32300        ipath="`cd "$path"; $THEPWDCMD -L`"
32301      else
32302        dir="`$DIRNAME "$path"`"
32303        base="`$BASENAME "$path"`"
32304        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32305      fi
32306    fi
32307  fi
32308
32309            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32310          fi
32311          IFS=";"
32312        fi
32313      done
32314      # Convert VS_LIB into SYSROOT_LDFLAGS
32315      for i in $VS_LIB; do
32316        libpath=$i
32317        # Only process non-empty elements
32318        if test "x$libpath" != x; then
32319          IFS="$OLDIFS"
32320          # Check that directory exists before calling fixup_path
32321          testpath=$libpath
32322
32323  windows_path="$testpath"
32324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32325    unix_path=`$CYGPATH -u "$windows_path"`
32326    testpath="$unix_path"
32327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32329    testpath="$unix_path"
32330  fi
32331
32332          if test -d "$testpath"; then
32333
32334  # Only process if variable expands to non-empty
32335
32336  if test "x$libpath" != x; then
32337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32338
32339  # Input might be given as Windows format, start by converting to
32340  # unix format.
32341  path="$libpath"
32342  new_path=`$CYGPATH -u "$path"`
32343
32344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32347  # "foo.exe" is OK but "foo" is an error.
32348  #
32349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32350  # It is also a way to make sure we got the proper file name for the real test later on.
32351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32352  if test "x$test_shortpath" = x; then
32353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32354$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32355    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32356  fi
32357
32358  # Call helper function which possibly converts this using DOS-style short mode.
32359  # If so, the updated path is stored in $new_path.
32360
32361  input_path="$new_path"
32362  # Check if we need to convert this using DOS-style short mode. If the path
32363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32364  # take no chances and rewrite it.
32365  # Note: m4 eats our [], so we need to use [ and ] instead.
32366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32367  if test "x$has_forbidden_chars" != x; then
32368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32372      # Going to short mode and back again did indeed matter. Since short mode is
32373      # case insensitive, let's make it lowercase to improve readability.
32374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32375      # Now convert it back to Unix-style (cygpath)
32376      input_path=`$CYGPATH -u "$shortmode_path"`
32377      new_path="$input_path"
32378    fi
32379  fi
32380
32381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32382  if test "x$test_cygdrive_prefix" = x; then
32383    # As a simple fix, exclude /usr/bin since it's not a real path.
32384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32386      # a path prefixed by /cygdrive for fixpath to work.
32387      new_path="$CYGWIN_ROOT_PATH$input_path"
32388    fi
32389  fi
32390
32391
32392  if test "x$path" != "x$new_path"; then
32393    libpath="$new_path"
32394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32395$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32396  fi
32397
32398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32399
32400  path="$libpath"
32401  has_colon=`$ECHO $path | $GREP ^.:`
32402  new_path="$path"
32403  if test "x$has_colon" = x; then
32404    # Not in mixed or Windows style, start by that.
32405    new_path=`cmd //c echo $path`
32406  fi
32407
32408
32409  input_path="$new_path"
32410  # Check if we need to convert this using DOS-style short mode. If the path
32411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32412  # take no chances and rewrite it.
32413  # Note: m4 eats our [], so we need to use [ and ] instead.
32414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32415  if test "x$has_forbidden_chars" != x; then
32416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32418  fi
32419
32420
32421  windows_path="$new_path"
32422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32423    unix_path=`$CYGPATH -u "$windows_path"`
32424    new_path="$unix_path"
32425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32427    new_path="$unix_path"
32428  fi
32429
32430  if test "x$path" != "x$new_path"; then
32431    libpath="$new_path"
32432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32433$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32434  fi
32435
32436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32438
32439    else
32440      # We're on a unix platform. Hooray! :)
32441      path="$libpath"
32442      has_space=`$ECHO "$path" | $GREP " "`
32443      if test "x$has_space" != x; then
32444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32445$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32447      fi
32448
32449      # Use eval to expand a potential ~
32450      eval path="$path"
32451      if test ! -f "$path" && test ! -d "$path"; then
32452        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32453      fi
32454
32455      if test -d "$path"; then
32456        libpath="`cd "$path"; $THEPWDCMD -L`"
32457      else
32458        dir="`$DIRNAME "$path"`"
32459        base="`$BASENAME "$path"`"
32460        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32461      fi
32462    fi
32463  fi
32464
32465            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32466          fi
32467          IFS=";"
32468        fi
32469      done
32470      IFS="$OLDIFS"
32471    fi
32472  else
32473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32474$as_echo "not found" >&6; }
32475
32476    if test "x$VS_ENV_CMD" = x; then
32477      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32478$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32479      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32480$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32481    else
32482      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32483$as_echo "$as_me: Running the extraction script failed." >&6;}
32484    fi
32485    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32486$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32487    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32488$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32489    as_fn_error $? "Cannot continue" "$LINENO" 5
32490  fi
32491
32492    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32493    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32494    PATH="$VS_PATH"
32495    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32496    export INCLUDE="$VS_INCLUDE"
32497    export LIB="$VS_LIB"
32498  else
32499    if test "x$XCODE_VERSION_OUTPUT" != x; then
32500      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32501      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32502      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32503    else
32504      # Currently we do not define this for other toolchains. This might change as the need arise.
32505      TOOLCHAIN_VERSION=
32506    fi
32507  fi
32508
32509
32510  # For solaris we really need solaris tools, and not the GNU equivalent.
32511  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32512  # so add that to path before starting to probe.
32513  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32514  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32515    PATH="/usr/ccs/bin:$PATH"
32516  fi
32517
32518  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32519  # override all other locations.
32520  if test "x$TOOLCHAIN_PATH" != x; then
32521    PATH=$TOOLCHAIN_PATH:$PATH
32522  fi
32523
32524
32525  #
32526  # Setup the compilers (CC and CXX)
32527  #
32528
32529  COMPILER_NAME=C
32530  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32531
32532  if test "x$CC" != x; then
32533    # User has supplied compiler name already, always let that override.
32534    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32535$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32536    if test "x`basename $CC`" = "x$CC"; then
32537      # A command without a complete path is provided, search $PATH.
32538
32539      for ac_prog in $CC
32540do
32541  # Extract the first word of "$ac_prog", so it can be a program name with args.
32542set dummy $ac_prog; ac_word=$2
32543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32544$as_echo_n "checking for $ac_word... " >&6; }
32545if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32546  $as_echo_n "(cached) " >&6
32547else
32548  case $POTENTIAL_CC in
32549  [\\/]* | ?:[\\/]*)
32550  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32551  ;;
32552  *)
32553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32554for as_dir in $PATH
32555do
32556  IFS=$as_save_IFS
32557  test -z "$as_dir" && as_dir=.
32558    for ac_exec_ext in '' $ac_executable_extensions; do
32559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32560    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32562    break 2
32563  fi
32564done
32565  done
32566IFS=$as_save_IFS
32567
32568  ;;
32569esac
32570fi
32571POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32572if test -n "$POTENTIAL_CC"; then
32573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32574$as_echo "$POTENTIAL_CC" >&6; }
32575else
32576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32577$as_echo "no" >&6; }
32578fi
32579
32580
32581  test -n "$POTENTIAL_CC" && break
32582done
32583
32584      if test "x$POTENTIAL_CC" != x; then
32585        CC=$POTENTIAL_CC
32586      else
32587        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32588      fi
32589    else
32590      # Otherwise it might already be a complete path
32591      if test ! -x "$CC"; then
32592        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32593      fi
32594    fi
32595  else
32596    # No user supplied value. Locate compiler ourselves.
32597
32598    # If we are cross compiling, assume cross compilation tools follows the
32599    # cross compilation standard where they are prefixed with the autoconf
32600    # standard name for the target. For example the binary
32601    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32602    # If we are not cross compiling, then the default compiler name will be
32603    # used.
32604
32605    CC=
32606    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32607    # before checking the rest of the PATH.
32608    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32609    # step, this should not be necessary.
32610    if test -n "$TOOLCHAIN_PATH"; then
32611      PATH_save="$PATH"
32612      PATH="$TOOLCHAIN_PATH"
32613      for ac_prog in $SEARCH_LIST
32614do
32615  # Extract the first word of "$ac_prog", so it can be a program name with args.
32616set dummy $ac_prog; ac_word=$2
32617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32618$as_echo_n "checking for $ac_word... " >&6; }
32619if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32620  $as_echo_n "(cached) " >&6
32621else
32622  case $TOOLCHAIN_PATH_CC in
32623  [\\/]* | ?:[\\/]*)
32624  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32625  ;;
32626  *)
32627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32628for as_dir in $PATH
32629do
32630  IFS=$as_save_IFS
32631  test -z "$as_dir" && as_dir=.
32632    for ac_exec_ext in '' $ac_executable_extensions; do
32633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32634    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32636    break 2
32637  fi
32638done
32639  done
32640IFS=$as_save_IFS
32641
32642  ;;
32643esac
32644fi
32645TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32646if test -n "$TOOLCHAIN_PATH_CC"; then
32647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32648$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32649else
32650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32651$as_echo "no" >&6; }
32652fi
32653
32654
32655  test -n "$TOOLCHAIN_PATH_CC" && break
32656done
32657
32658      CC=$TOOLCHAIN_PATH_CC
32659      PATH="$PATH_save"
32660    fi
32661
32662    # AC_PATH_PROGS can't be run multiple times with the same variable,
32663    # so create a new name for this run.
32664    if test "x$CC" = x; then
32665      for ac_prog in $SEARCH_LIST
32666do
32667  # Extract the first word of "$ac_prog", so it can be a program name with args.
32668set dummy $ac_prog; ac_word=$2
32669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32670$as_echo_n "checking for $ac_word... " >&6; }
32671if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32672  $as_echo_n "(cached) " >&6
32673else
32674  case $POTENTIAL_CC in
32675  [\\/]* | ?:[\\/]*)
32676  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32677  ;;
32678  *)
32679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32680for as_dir in $PATH
32681do
32682  IFS=$as_save_IFS
32683  test -z "$as_dir" && as_dir=.
32684    for ac_exec_ext in '' $ac_executable_extensions; do
32685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32686    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32688    break 2
32689  fi
32690done
32691  done
32692IFS=$as_save_IFS
32693
32694  ;;
32695esac
32696fi
32697POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32698if test -n "$POTENTIAL_CC"; then
32699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32700$as_echo "$POTENTIAL_CC" >&6; }
32701else
32702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32703$as_echo "no" >&6; }
32704fi
32705
32706
32707  test -n "$POTENTIAL_CC" && break
32708done
32709
32710      CC=$POTENTIAL_CC
32711    fi
32712
32713    if test "x$CC" = x; then
32714
32715  # Print a helpful message on how to acquire the necessary build dependency.
32716  # devkit is the help tag: freetype, cups, alsa etc
32717  MISSING_DEPENDENCY=devkit
32718
32719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32720    cygwin_help $MISSING_DEPENDENCY
32721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32722    msys_help $MISSING_DEPENDENCY
32723  else
32724    PKGHANDLER_COMMAND=
32725
32726    case $PKGHANDLER in
32727      apt-get)
32728        apt_help     $MISSING_DEPENDENCY ;;
32729      yum)
32730        yum_help     $MISSING_DEPENDENCY ;;
32731      port)
32732        port_help    $MISSING_DEPENDENCY ;;
32733      pkgutil)
32734        pkgutil_help $MISSING_DEPENDENCY ;;
32735      pkgadd)
32736        pkgadd_help  $MISSING_DEPENDENCY ;;
32737    esac
32738
32739    if test "x$PKGHANDLER_COMMAND" != x; then
32740      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32741    fi
32742  fi
32743
32744      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32745    fi
32746  fi
32747
32748  # Now we have a compiler binary in CC. Make sure it's okay.
32749
32750  # Only process if variable expands to non-empty
32751
32752  if test "x$CC" != x; then
32753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32754
32755  # First separate the path from the arguments. This will split at the first
32756  # space.
32757  complete="$CC"
32758  path="${complete%% *}"
32759  tmp="$complete EOL"
32760  arguments="${tmp#* }"
32761
32762  # Input might be given as Windows format, start by converting to
32763  # unix format.
32764  new_path=`$CYGPATH -u "$path"`
32765
32766  # Now try to locate executable using which
32767  new_path=`$WHICH "$new_path" 2> /dev/null`
32768  # bat and cmd files are not always considered executable in cygwin causing which
32769  # to not find them
32770  if test "x$new_path" = x \
32771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32773    new_path=`$CYGPATH -u "$path"`
32774  fi
32775  if test "x$new_path" = x; then
32776    # Oops. Which didn't find the executable.
32777    # The splitting of arguments from the executable at a space might have been incorrect,
32778    # since paths with space are more likely in Windows. Give it another try with the whole
32779    # argument.
32780    path="$complete"
32781    arguments="EOL"
32782    new_path=`$CYGPATH -u "$path"`
32783    new_path=`$WHICH "$new_path" 2> /dev/null`
32784    # bat and cmd files are not always considered executable in cygwin causing which
32785    # to not find them
32786    if test "x$new_path" = x \
32787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32789      new_path=`$CYGPATH -u "$path"`
32790    fi
32791    if test "x$new_path" = x; then
32792      # It's still not found. Now this is an unrecoverable error.
32793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32794$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32795      has_space=`$ECHO "$complete" | $GREP " "`
32796      if test "x$has_space" != x; then
32797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32799      fi
32800      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32801    fi
32802  fi
32803
32804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32807  # "foo.exe" is OK but "foo" is an error.
32808  #
32809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32810  # It is also a way to make sure we got the proper file name for the real test later on.
32811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32812  if test "x$test_shortpath" = x; then
32813    # Short path failed, file does not exist as specified.
32814    # Try adding .exe or .cmd
32815    if test -f "${new_path}.exe"; then
32816      input_to_shortpath="${new_path}.exe"
32817    elif test -f "${new_path}.cmd"; then
32818      input_to_shortpath="${new_path}.cmd"
32819    else
32820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32821$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32824      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32825    fi
32826  else
32827    input_to_shortpath="$new_path"
32828  fi
32829
32830  # Call helper function which possibly converts this using DOS-style short mode.
32831  # If so, the updated path is stored in $new_path.
32832  new_path="$input_to_shortpath"
32833
32834  input_path="$input_to_shortpath"
32835  # Check if we need to convert this using DOS-style short mode. If the path
32836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32837  # take no chances and rewrite it.
32838  # Note: m4 eats our [], so we need to use [ and ] instead.
32839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32840  if test "x$has_forbidden_chars" != x; then
32841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32845      # Going to short mode and back again did indeed matter. Since short mode is
32846      # case insensitive, let's make it lowercase to improve readability.
32847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32848      # Now convert it back to Unix-style (cygpath)
32849      input_path=`$CYGPATH -u "$shortmode_path"`
32850      new_path="$input_path"
32851    fi
32852  fi
32853
32854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32855  if test "x$test_cygdrive_prefix" = x; then
32856    # As a simple fix, exclude /usr/bin since it's not a real path.
32857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32859      # a path prefixed by /cygdrive for fixpath to work.
32860      new_path="$CYGWIN_ROOT_PATH$input_path"
32861    fi
32862  fi
32863
32864  # remove trailing .exe if any
32865  new_path="${new_path/%.exe/}"
32866
32867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32868
32869  # First separate the path from the arguments. This will split at the first
32870  # space.
32871  complete="$CC"
32872  path="${complete%% *}"
32873  tmp="$complete EOL"
32874  arguments="${tmp#* }"
32875
32876  # Input might be given as Windows format, start by converting to
32877  # unix format.
32878  new_path="$path"
32879
32880  windows_path="$new_path"
32881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32882    unix_path=`$CYGPATH -u "$windows_path"`
32883    new_path="$unix_path"
32884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32886    new_path="$unix_path"
32887  fi
32888
32889
32890  # Now try to locate executable using which
32891  new_path=`$WHICH "$new_path" 2> /dev/null`
32892
32893  if test "x$new_path" = x; then
32894    # Oops. Which didn't find the executable.
32895    # The splitting of arguments from the executable at a space might have been incorrect,
32896    # since paths with space are more likely in Windows. Give it another try with the whole
32897    # argument.
32898    path="$complete"
32899    arguments="EOL"
32900    new_path="$path"
32901
32902  windows_path="$new_path"
32903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32904    unix_path=`$CYGPATH -u "$windows_path"`
32905    new_path="$unix_path"
32906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32908    new_path="$unix_path"
32909  fi
32910
32911
32912    new_path=`$WHICH "$new_path" 2> /dev/null`
32913    # bat and cmd files are not always considered executable in MSYS causing which
32914    # to not find them
32915    if test "x$new_path" = x \
32916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32918      new_path="$path"
32919
32920  windows_path="$new_path"
32921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32922    unix_path=`$CYGPATH -u "$windows_path"`
32923    new_path="$unix_path"
32924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32926    new_path="$unix_path"
32927  fi
32928
32929    fi
32930
32931    if test "x$new_path" = x; then
32932      # It's still not found. Now this is an unrecoverable error.
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32934$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32935      has_space=`$ECHO "$complete" | $GREP " "`
32936      if test "x$has_space" != x; then
32937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32939      fi
32940      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32941    fi
32942  fi
32943
32944  # Now new_path has a complete unix path to the binary
32945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32946    # Keep paths in /bin as-is, but remove trailing .exe if any
32947    new_path="${new_path/%.exe/}"
32948    # Do not save /bin paths to all_fixpath_prefixes!
32949  else
32950    # Not in mixed or Windows style, start by that.
32951    new_path=`cmd //c echo $new_path`
32952
32953  input_path="$new_path"
32954  # Check if we need to convert this using DOS-style short mode. If the path
32955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32956  # take no chances and rewrite it.
32957  # Note: m4 eats our [], so we need to use [ and ] instead.
32958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32959  if test "x$has_forbidden_chars" != x; then
32960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32962  fi
32963
32964    # Output is in $new_path
32965
32966  windows_path="$new_path"
32967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32968    unix_path=`$CYGPATH -u "$windows_path"`
32969    new_path="$unix_path"
32970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32972    new_path="$unix_path"
32973  fi
32974
32975    # remove trailing .exe if any
32976    new_path="${new_path/%.exe/}"
32977
32978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32980  fi
32981
32982    else
32983      # We're on a unix platform. Hooray! :)
32984      # First separate the path from the arguments. This will split at the first
32985      # space.
32986      complete="$CC"
32987      path="${complete%% *}"
32988      tmp="$complete EOL"
32989      arguments="${tmp#* }"
32990
32991      # Cannot rely on the command "which" here since it doesn't always work.
32992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32993      if test -z "$is_absolute_path"; then
32994        # Path to executable is not absolute. Find it.
32995        IFS_save="$IFS"
32996        IFS=:
32997        for p in $PATH; do
32998          if test -f "$p/$path" && test -x "$p/$path"; then
32999            new_path="$p/$path"
33000            break
33001          fi
33002        done
33003        IFS="$IFS_save"
33004      else
33005        # This is an absolute path, we can use it without further modifications.
33006        new_path="$path"
33007      fi
33008
33009      if test "x$new_path" = x; then
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33011$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33012        has_space=`$ECHO "$complete" | $GREP " "`
33013        if test "x$has_space" != x; then
33014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33016        fi
33017        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33018      fi
33019    fi
33020
33021    # Now join together the path and the arguments once again
33022    if test "x$arguments" != xEOL; then
33023      new_complete="$new_path ${arguments% *}"
33024    else
33025      new_complete="$new_path"
33026    fi
33027
33028    if test "x$complete" != "x$new_complete"; then
33029      CC="$new_complete"
33030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33031$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33032    fi
33033  fi
33034
33035  TEST_COMPILER="$CC"
33036
33037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33038$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33039  SYMLINK_ORIGINAL="$TEST_COMPILER"
33040
33041  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33042    # Follow a chain of symbolic links. Use readlink
33043    # where it exists, else fall back to horribly
33044    # complicated shell code.
33045    if test "x$READLINK_TESTED" != yes; then
33046      # On MacOSX there is a readlink tool with a different
33047      # purpose than the GNU readlink tool. Check the found readlink.
33048      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33049      if test "x$ISGNU" = x; then
33050        # A readlink that we do not know how to use.
33051        # Are there other non-GNU readlinks out there?
33052        READLINK_TESTED=yes
33053        READLINK=
33054      fi
33055    fi
33056
33057    if test "x$READLINK" != x; then
33058      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33059    else
33060      # Save the current directory for restoring afterwards
33061      STARTDIR=$PWD
33062      COUNTER=0
33063      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33064      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33065      cd $sym_link_dir
33066      # Use -P flag to resolve symlinks in directories.
33067      cd `$THEPWDCMD -P`
33068      sym_link_dir=`$THEPWDCMD -P`
33069      # Resolve file symlinks
33070      while test $COUNTER -lt 20; do
33071        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33072        if test "x$ISLINK" == x; then
33073          # This is not a symbolic link! We are done!
33074          break
33075        fi
33076        # Again resolve directory symlinks since the target of the just found
33077        # link could be in a different directory
33078        cd `$DIRNAME $ISLINK`
33079        sym_link_dir=`$THEPWDCMD -P`
33080        sym_link_file=`$BASENAME $ISLINK`
33081        let COUNTER=COUNTER+1
33082      done
33083      cd $STARTDIR
33084      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33085    fi
33086  fi
33087
33088  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33090$as_echo "no symlink" >&6; }
33091  else
33092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33093$as_echo "$SYMLINK_ORIGINAL" >&6; }
33094
33095    # We can't handle ccache by gcc wrappers, since we need to know if we're
33096    # using ccache. Instead ccache usage must be controlled by a configure option.
33097    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33098    if test "x$COMPILER_BASENAME" = "xccache"; then
33099      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33100$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33101      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33102    fi
33103  fi
33104
33105
33106  COMPILER=$CC
33107  COMPILER_NAME=$COMPILER_NAME
33108
33109  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33110    # cc -V output typically looks like
33111    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33112    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33113    # Check that this is likely to be the Solaris Studio cc.
33114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33115    if test $? -ne 0; then
33116      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33117      { $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
33118$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33120$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33122$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33124    fi
33125    # Remove usage instructions (if present), and
33126    # collapse compiler output into a single line
33127    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33128        $SED -e 's/ *[Uu]sage:.*//'`
33129    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33130        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33131  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33132    # xlc -qversion output typically looks like
33133    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33134    #     Version: 11.01.0000.0015
33135    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33136    # Check that this is likely to be the IBM XL C compiler.
33137    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33138    if test $? -ne 0; then
33139      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33140      { $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
33141$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33142      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33143$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33144      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33145$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33146      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33147    fi
33148    # Collapse compiler output into a single line
33149    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33150    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33151        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33152  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33153    # There is no specific version flag, but all output starts with a version string.
33154    # First line typically looks something like:
33155    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33156    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33157    # Check that this is likely to be Microsoft CL.EXE.
33158    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33159    if test $? -ne 0; then
33160      { $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
33161$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33162      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33163$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33164      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33165    fi
33166    # Collapse compiler output into a single line
33167    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33168    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33169        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33170  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33171    # gcc --version output typically looks like
33172    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33173    #     Copyright (C) 2013 Free Software Foundation, Inc.
33174    #     This is free software; see the source for copying conditions.  There is NO
33175    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33176    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33177    # Check that this is likely to be GCC.
33178    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33179    if test $? -ne 0; then
33180      { $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
33181$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33182      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33183$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33184      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33185    fi
33186    # Remove Copyright and legalese from version string, and
33187    # collapse into a single line
33188    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33189        $SED -e 's/ *Copyright .*//'`
33190    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33191        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33192  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33193    # clang --version output typically looks like
33194    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33195    #    clang version 3.3 (tags/RELEASE_33/final)
33196    # or
33197    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33198    #    Target: x86_64-pc-linux-gnu
33199    #    Thread model: posix
33200    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33201    # Check that this is likely to be clang
33202    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33203    if test $? -ne 0; then
33204      { $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
33205$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33206      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33207$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33208      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33209    fi
33210    # Collapse compiler output into a single line
33211    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33212    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33213        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33214  else
33215      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33216  fi
33217  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33218  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33219  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33220  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33221
33222  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33223$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33224
33225
33226  # Now that we have resolved CC ourself, let autoconf have its go at it
33227  ac_ext=c
33228ac_cpp='$CPP $CPPFLAGS'
33229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33231ac_compiler_gnu=$ac_cv_c_compiler_gnu
33232if test -n "$ac_tool_prefix"; then
33233  for ac_prog in $CC
33234  do
33235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33238$as_echo_n "checking for $ac_word... " >&6; }
33239if ${ac_cv_prog_CC+:} false; then :
33240  $as_echo_n "(cached) " >&6
33241else
33242  if test -n "$CC"; then
33243  ac_cv_prog_CC="$CC" # Let the user override the test.
33244else
33245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33246for as_dir in $PATH
33247do
33248  IFS=$as_save_IFS
33249  test -z "$as_dir" && as_dir=.
33250    for ac_exec_ext in '' $ac_executable_extensions; do
33251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33252    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33254    break 2
33255  fi
33256done
33257  done
33258IFS=$as_save_IFS
33259
33260fi
33261fi
33262CC=$ac_cv_prog_CC
33263if test -n "$CC"; then
33264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33265$as_echo "$CC" >&6; }
33266else
33267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33268$as_echo "no" >&6; }
33269fi
33270
33271
33272    test -n "$CC" && break
33273  done
33274fi
33275if test -z "$CC"; then
33276  ac_ct_CC=$CC
33277  for ac_prog in $CC
33278do
33279  # Extract the first word of "$ac_prog", so it can be a program name with args.
33280set dummy $ac_prog; ac_word=$2
33281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33282$as_echo_n "checking for $ac_word... " >&6; }
33283if ${ac_cv_prog_ac_ct_CC+:} false; then :
33284  $as_echo_n "(cached) " >&6
33285else
33286  if test -n "$ac_ct_CC"; then
33287  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33288else
33289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33290for as_dir in $PATH
33291do
33292  IFS=$as_save_IFS
33293  test -z "$as_dir" && as_dir=.
33294    for ac_exec_ext in '' $ac_executable_extensions; do
33295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33296    ac_cv_prog_ac_ct_CC="$ac_prog"
33297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33298    break 2
33299  fi
33300done
33301  done
33302IFS=$as_save_IFS
33303
33304fi
33305fi
33306ac_ct_CC=$ac_cv_prog_ac_ct_CC
33307if test -n "$ac_ct_CC"; then
33308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33309$as_echo "$ac_ct_CC" >&6; }
33310else
33311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33312$as_echo "no" >&6; }
33313fi
33314
33315
33316  test -n "$ac_ct_CC" && break
33317done
33318
33319  if test "x$ac_ct_CC" = x; then
33320    CC=""
33321  else
33322    case $cross_compiling:$ac_tool_warned in
33323yes:)
33324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33326ac_tool_warned=yes ;;
33327esac
33328    CC=$ac_ct_CC
33329  fi
33330fi
33331
33332
33333test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33335as_fn_error $? "no acceptable C compiler found in \$PATH
33336See \`config.log' for more details" "$LINENO" 5; }
33337
33338# Provide some information about the compiler.
33339$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33340set X $ac_compile
33341ac_compiler=$2
33342for ac_option in --version -v -V -qversion; do
33343  { { ac_try="$ac_compiler $ac_option >&5"
33344case "(($ac_try" in
33345  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33346  *) ac_try_echo=$ac_try;;
33347esac
33348eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33349$as_echo "$ac_try_echo"; } >&5
33350  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33351  ac_status=$?
33352  if test -s conftest.err; then
33353    sed '10a\
33354... rest of stderr output deleted ...
33355         10q' conftest.err >conftest.er1
33356    cat conftest.er1 >&5
33357  fi
33358  rm -f conftest.er1 conftest.err
33359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33360  test $ac_status = 0; }
33361done
33362
33363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33364/* end confdefs.h.  */
33365
33366int
33367main ()
33368{
33369
33370  ;
33371  return 0;
33372}
33373_ACEOF
33374ac_clean_files_save=$ac_clean_files
33375ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33376# Try to create an executable without -o first, disregard a.out.
33377# It will help us diagnose broken compilers, and finding out an intuition
33378# of exeext.
33379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33380$as_echo_n "checking whether the C compiler works... " >&6; }
33381ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33382
33383# The possible output files:
33384ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33385
33386ac_rmfiles=
33387for ac_file in $ac_files
33388do
33389  case $ac_file in
33390    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33391    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33392  esac
33393done
33394rm -f $ac_rmfiles
33395
33396if { { ac_try="$ac_link_default"
33397case "(($ac_try" in
33398  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33399  *) ac_try_echo=$ac_try;;
33400esac
33401eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33402$as_echo "$ac_try_echo"; } >&5
33403  (eval "$ac_link_default") 2>&5
33404  ac_status=$?
33405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33406  test $ac_status = 0; }; then :
33407  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33408# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33409# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33410# so that the user can short-circuit this test for compilers unknown to
33411# Autoconf.
33412for ac_file in $ac_files ''
33413do
33414  test -f "$ac_file" || continue
33415  case $ac_file in
33416    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33417	;;
33418    [ab].out )
33419	# We found the default executable, but exeext='' is most
33420	# certainly right.
33421	break;;
33422    *.* )
33423	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33424	then :; else
33425	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33426	fi
33427	# We set ac_cv_exeext here because the later test for it is not
33428	# safe: cross compilers may not add the suffix if given an `-o'
33429	# argument, so we may need to know it at that point already.
33430	# Even if this section looks crufty: it has the advantage of
33431	# actually working.
33432	break;;
33433    * )
33434	break;;
33435  esac
33436done
33437test "$ac_cv_exeext" = no && ac_cv_exeext=
33438
33439else
33440  ac_file=''
33441fi
33442if test -z "$ac_file"; then :
33443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33444$as_echo "no" >&6; }
33445$as_echo "$as_me: failed program was:" >&5
33446sed 's/^/| /' conftest.$ac_ext >&5
33447
33448{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33450as_fn_error 77 "C compiler cannot create executables
33451See \`config.log' for more details" "$LINENO" 5; }
33452else
33453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33454$as_echo "yes" >&6; }
33455fi
33456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33457$as_echo_n "checking for C compiler default output file name... " >&6; }
33458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33459$as_echo "$ac_file" >&6; }
33460ac_exeext=$ac_cv_exeext
33461
33462rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33463ac_clean_files=$ac_clean_files_save
33464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33465$as_echo_n "checking for suffix of executables... " >&6; }
33466if { { ac_try="$ac_link"
33467case "(($ac_try" in
33468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33469  *) ac_try_echo=$ac_try;;
33470esac
33471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33472$as_echo "$ac_try_echo"; } >&5
33473  (eval "$ac_link") 2>&5
33474  ac_status=$?
33475  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33476  test $ac_status = 0; }; then :
33477  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33478# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33479# work properly (i.e., refer to `conftest.exe'), while it won't with
33480# `rm'.
33481for ac_file in conftest.exe conftest conftest.*; do
33482  test -f "$ac_file" || continue
33483  case $ac_file in
33484    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33485    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33486	  break;;
33487    * ) break;;
33488  esac
33489done
33490else
33491  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33493as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33494See \`config.log' for more details" "$LINENO" 5; }
33495fi
33496rm -f conftest conftest$ac_cv_exeext
33497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33498$as_echo "$ac_cv_exeext" >&6; }
33499
33500rm -f conftest.$ac_ext
33501EXEEXT=$ac_cv_exeext
33502ac_exeext=$EXEEXT
33503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33504/* end confdefs.h.  */
33505#include <stdio.h>
33506int
33507main ()
33508{
33509FILE *f = fopen ("conftest.out", "w");
33510 return ferror (f) || fclose (f) != 0;
33511
33512  ;
33513  return 0;
33514}
33515_ACEOF
33516ac_clean_files="$ac_clean_files conftest.out"
33517# Check that the compiler produces executables we can run.  If not, either
33518# the compiler is broken, or we cross compile.
33519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33520$as_echo_n "checking whether we are cross compiling... " >&6; }
33521if test "$cross_compiling" != yes; then
33522  { { ac_try="$ac_link"
33523case "(($ac_try" in
33524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33525  *) ac_try_echo=$ac_try;;
33526esac
33527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33528$as_echo "$ac_try_echo"; } >&5
33529  (eval "$ac_link") 2>&5
33530  ac_status=$?
33531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33532  test $ac_status = 0; }
33533  if { ac_try='./conftest$ac_cv_exeext'
33534  { { case "(($ac_try" in
33535  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33536  *) ac_try_echo=$ac_try;;
33537esac
33538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33539$as_echo "$ac_try_echo"; } >&5
33540  (eval "$ac_try") 2>&5
33541  ac_status=$?
33542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33543  test $ac_status = 0; }; }; then
33544    cross_compiling=no
33545  else
33546    if test "$cross_compiling" = maybe; then
33547	cross_compiling=yes
33548    else
33549	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33551as_fn_error $? "cannot run C compiled programs.
33552If you meant to cross compile, use \`--host'.
33553See \`config.log' for more details" "$LINENO" 5; }
33554    fi
33555  fi
33556fi
33557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33558$as_echo "$cross_compiling" >&6; }
33559
33560rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33561ac_clean_files=$ac_clean_files_save
33562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33563$as_echo_n "checking for suffix of object files... " >&6; }
33564if ${ac_cv_objext+:} false; then :
33565  $as_echo_n "(cached) " >&6
33566else
33567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33568/* end confdefs.h.  */
33569
33570int
33571main ()
33572{
33573
33574  ;
33575  return 0;
33576}
33577_ACEOF
33578rm -f conftest.o conftest.obj
33579if { { ac_try="$ac_compile"
33580case "(($ac_try" in
33581  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33582  *) ac_try_echo=$ac_try;;
33583esac
33584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33585$as_echo "$ac_try_echo"; } >&5
33586  (eval "$ac_compile") 2>&5
33587  ac_status=$?
33588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33589  test $ac_status = 0; }; then :
33590  for ac_file in conftest.o conftest.obj conftest.*; do
33591  test -f "$ac_file" || continue;
33592  case $ac_file in
33593    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33594    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33595       break;;
33596  esac
33597done
33598else
33599  $as_echo "$as_me: failed program was:" >&5
33600sed 's/^/| /' conftest.$ac_ext >&5
33601
33602{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33604as_fn_error $? "cannot compute suffix of object files: cannot compile
33605See \`config.log' for more details" "$LINENO" 5; }
33606fi
33607rm -f conftest.$ac_cv_objext conftest.$ac_ext
33608fi
33609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33610$as_echo "$ac_cv_objext" >&6; }
33611OBJEXT=$ac_cv_objext
33612ac_objext=$OBJEXT
33613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33614$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33615if ${ac_cv_c_compiler_gnu+:} false; then :
33616  $as_echo_n "(cached) " >&6
33617else
33618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33619/* end confdefs.h.  */
33620
33621int
33622main ()
33623{
33624#ifndef __GNUC__
33625       choke me
33626#endif
33627
33628  ;
33629  return 0;
33630}
33631_ACEOF
33632if ac_fn_c_try_compile "$LINENO"; then :
33633  ac_compiler_gnu=yes
33634else
33635  ac_compiler_gnu=no
33636fi
33637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33638ac_cv_c_compiler_gnu=$ac_compiler_gnu
33639
33640fi
33641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33642$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33643if test $ac_compiler_gnu = yes; then
33644  GCC=yes
33645else
33646  GCC=
33647fi
33648ac_test_CFLAGS=${CFLAGS+set}
33649ac_save_CFLAGS=$CFLAGS
33650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33651$as_echo_n "checking whether $CC accepts -g... " >&6; }
33652if ${ac_cv_prog_cc_g+:} false; then :
33653  $as_echo_n "(cached) " >&6
33654else
33655  ac_save_c_werror_flag=$ac_c_werror_flag
33656   ac_c_werror_flag=yes
33657   ac_cv_prog_cc_g=no
33658   CFLAGS="-g"
33659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33660/* end confdefs.h.  */
33661
33662int
33663main ()
33664{
33665
33666  ;
33667  return 0;
33668}
33669_ACEOF
33670if ac_fn_c_try_compile "$LINENO"; then :
33671  ac_cv_prog_cc_g=yes
33672else
33673  CFLAGS=""
33674      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33675/* end confdefs.h.  */
33676
33677int
33678main ()
33679{
33680
33681  ;
33682  return 0;
33683}
33684_ACEOF
33685if ac_fn_c_try_compile "$LINENO"; then :
33686
33687else
33688  ac_c_werror_flag=$ac_save_c_werror_flag
33689	 CFLAGS="-g"
33690	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33691/* end confdefs.h.  */
33692
33693int
33694main ()
33695{
33696
33697  ;
33698  return 0;
33699}
33700_ACEOF
33701if ac_fn_c_try_compile "$LINENO"; then :
33702  ac_cv_prog_cc_g=yes
33703fi
33704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33705fi
33706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33707fi
33708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33709   ac_c_werror_flag=$ac_save_c_werror_flag
33710fi
33711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33712$as_echo "$ac_cv_prog_cc_g" >&6; }
33713if test "$ac_test_CFLAGS" = set; then
33714  CFLAGS=$ac_save_CFLAGS
33715elif test $ac_cv_prog_cc_g = yes; then
33716  if test "$GCC" = yes; then
33717    CFLAGS="-g -O2"
33718  else
33719    CFLAGS="-g"
33720  fi
33721else
33722  if test "$GCC" = yes; then
33723    CFLAGS="-O2"
33724  else
33725    CFLAGS=
33726  fi
33727fi
33728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33729$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33730if ${ac_cv_prog_cc_c89+:} false; then :
33731  $as_echo_n "(cached) " >&6
33732else
33733  ac_cv_prog_cc_c89=no
33734ac_save_CC=$CC
33735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33736/* end confdefs.h.  */
33737#include <stdarg.h>
33738#include <stdio.h>
33739struct stat;
33740/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33741struct buf { int x; };
33742FILE * (*rcsopen) (struct buf *, struct stat *, int);
33743static char *e (p, i)
33744     char **p;
33745     int i;
33746{
33747  return p[i];
33748}
33749static char *f (char * (*g) (char **, int), char **p, ...)
33750{
33751  char *s;
33752  va_list v;
33753  va_start (v,p);
33754  s = g (p, va_arg (v,int));
33755  va_end (v);
33756  return s;
33757}
33758
33759/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33760   function prototypes and stuff, but not '\xHH' hex character constants.
33761   These don't provoke an error unfortunately, instead are silently treated
33762   as 'x'.  The following induces an error, until -std is added to get
33763   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33764   array size at least.  It's necessary to write '\x00'==0 to get something
33765   that's true only with -std.  */
33766int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33767
33768/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33769   inside strings and character constants.  */
33770#define FOO(x) 'x'
33771int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33772
33773int test (int i, double x);
33774struct s1 {int (*f) (int a);};
33775struct s2 {int (*f) (double a);};
33776int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33777int argc;
33778char **argv;
33779int
33780main ()
33781{
33782return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33783  ;
33784  return 0;
33785}
33786_ACEOF
33787for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33788	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33789do
33790  CC="$ac_save_CC $ac_arg"
33791  if ac_fn_c_try_compile "$LINENO"; then :
33792  ac_cv_prog_cc_c89=$ac_arg
33793fi
33794rm -f core conftest.err conftest.$ac_objext
33795  test "x$ac_cv_prog_cc_c89" != "xno" && break
33796done
33797rm -f conftest.$ac_ext
33798CC=$ac_save_CC
33799
33800fi
33801# AC_CACHE_VAL
33802case "x$ac_cv_prog_cc_c89" in
33803  x)
33804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33805$as_echo "none needed" >&6; } ;;
33806  xno)
33807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33808$as_echo "unsupported" >&6; } ;;
33809  *)
33810    CC="$CC $ac_cv_prog_cc_c89"
33811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33812$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33813esac
33814if test "x$ac_cv_prog_cc_c89" != xno; then :
33815
33816fi
33817
33818ac_ext=cpp
33819ac_cpp='$CXXCPP $CPPFLAGS'
33820ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33821ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33822ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33823
33824
33825
33826  COMPILER_NAME=C++
33827  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33828
33829  if test "x$CXX" != x; then
33830    # User has supplied compiler name already, always let that override.
33831    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33832$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33833    if test "x`basename $CXX`" = "x$CXX"; then
33834      # A command without a complete path is provided, search $PATH.
33835
33836      for ac_prog in $CXX
33837do
33838  # Extract the first word of "$ac_prog", so it can be a program name with args.
33839set dummy $ac_prog; ac_word=$2
33840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33841$as_echo_n "checking for $ac_word... " >&6; }
33842if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33843  $as_echo_n "(cached) " >&6
33844else
33845  case $POTENTIAL_CXX in
33846  [\\/]* | ?:[\\/]*)
33847  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33848  ;;
33849  *)
33850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33851for as_dir in $PATH
33852do
33853  IFS=$as_save_IFS
33854  test -z "$as_dir" && as_dir=.
33855    for ac_exec_ext in '' $ac_executable_extensions; do
33856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33857    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33859    break 2
33860  fi
33861done
33862  done
33863IFS=$as_save_IFS
33864
33865  ;;
33866esac
33867fi
33868POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33869if test -n "$POTENTIAL_CXX"; then
33870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33871$as_echo "$POTENTIAL_CXX" >&6; }
33872else
33873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33874$as_echo "no" >&6; }
33875fi
33876
33877
33878  test -n "$POTENTIAL_CXX" && break
33879done
33880
33881      if test "x$POTENTIAL_CXX" != x; then
33882        CXX=$POTENTIAL_CXX
33883      else
33884        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33885      fi
33886    else
33887      # Otherwise it might already be a complete path
33888      if test ! -x "$CXX"; then
33889        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33890      fi
33891    fi
33892  else
33893    # No user supplied value. Locate compiler ourselves.
33894
33895    # If we are cross compiling, assume cross compilation tools follows the
33896    # cross compilation standard where they are prefixed with the autoconf
33897    # standard name for the target. For example the binary
33898    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33899    # If we are not cross compiling, then the default compiler name will be
33900    # used.
33901
33902    CXX=
33903    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33904    # before checking the rest of the PATH.
33905    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33906    # step, this should not be necessary.
33907    if test -n "$TOOLCHAIN_PATH"; then
33908      PATH_save="$PATH"
33909      PATH="$TOOLCHAIN_PATH"
33910      for ac_prog in $SEARCH_LIST
33911do
33912  # Extract the first word of "$ac_prog", so it can be a program name with args.
33913set dummy $ac_prog; ac_word=$2
33914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33915$as_echo_n "checking for $ac_word... " >&6; }
33916if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33917  $as_echo_n "(cached) " >&6
33918else
33919  case $TOOLCHAIN_PATH_CXX in
33920  [\\/]* | ?:[\\/]*)
33921  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33922  ;;
33923  *)
33924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33925for as_dir in $PATH
33926do
33927  IFS=$as_save_IFS
33928  test -z "$as_dir" && as_dir=.
33929    for ac_exec_ext in '' $ac_executable_extensions; do
33930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33931    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33933    break 2
33934  fi
33935done
33936  done
33937IFS=$as_save_IFS
33938
33939  ;;
33940esac
33941fi
33942TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33943if test -n "$TOOLCHAIN_PATH_CXX"; then
33944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33945$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33946else
33947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33948$as_echo "no" >&6; }
33949fi
33950
33951
33952  test -n "$TOOLCHAIN_PATH_CXX" && break
33953done
33954
33955      CXX=$TOOLCHAIN_PATH_CXX
33956      PATH="$PATH_save"
33957    fi
33958
33959    # AC_PATH_PROGS can't be run multiple times with the same variable,
33960    # so create a new name for this run.
33961    if test "x$CXX" = x; then
33962      for ac_prog in $SEARCH_LIST
33963do
33964  # Extract the first word of "$ac_prog", so it can be a program name with args.
33965set dummy $ac_prog; ac_word=$2
33966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33967$as_echo_n "checking for $ac_word... " >&6; }
33968if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33969  $as_echo_n "(cached) " >&6
33970else
33971  case $POTENTIAL_CXX in
33972  [\\/]* | ?:[\\/]*)
33973  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33974  ;;
33975  *)
33976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33977for as_dir in $PATH
33978do
33979  IFS=$as_save_IFS
33980  test -z "$as_dir" && as_dir=.
33981    for ac_exec_ext in '' $ac_executable_extensions; do
33982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33983    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33985    break 2
33986  fi
33987done
33988  done
33989IFS=$as_save_IFS
33990
33991  ;;
33992esac
33993fi
33994POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33995if test -n "$POTENTIAL_CXX"; then
33996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33997$as_echo "$POTENTIAL_CXX" >&6; }
33998else
33999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34000$as_echo "no" >&6; }
34001fi
34002
34003
34004  test -n "$POTENTIAL_CXX" && break
34005done
34006
34007      CXX=$POTENTIAL_CXX
34008    fi
34009
34010    if test "x$CXX" = x; then
34011
34012  # Print a helpful message on how to acquire the necessary build dependency.
34013  # devkit is the help tag: freetype, cups, alsa etc
34014  MISSING_DEPENDENCY=devkit
34015
34016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34017    cygwin_help $MISSING_DEPENDENCY
34018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34019    msys_help $MISSING_DEPENDENCY
34020  else
34021    PKGHANDLER_COMMAND=
34022
34023    case $PKGHANDLER in
34024      apt-get)
34025        apt_help     $MISSING_DEPENDENCY ;;
34026      yum)
34027        yum_help     $MISSING_DEPENDENCY ;;
34028      port)
34029        port_help    $MISSING_DEPENDENCY ;;
34030      pkgutil)
34031        pkgutil_help $MISSING_DEPENDENCY ;;
34032      pkgadd)
34033        pkgadd_help  $MISSING_DEPENDENCY ;;
34034    esac
34035
34036    if test "x$PKGHANDLER_COMMAND" != x; then
34037      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34038    fi
34039  fi
34040
34041      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34042    fi
34043  fi
34044
34045  # Now we have a compiler binary in CXX. Make sure it's okay.
34046
34047  # Only process if variable expands to non-empty
34048
34049  if test "x$CXX" != x; then
34050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34051
34052  # First separate the path from the arguments. This will split at the first
34053  # space.
34054  complete="$CXX"
34055  path="${complete%% *}"
34056  tmp="$complete EOL"
34057  arguments="${tmp#* }"
34058
34059  # Input might be given as Windows format, start by converting to
34060  # unix format.
34061  new_path=`$CYGPATH -u "$path"`
34062
34063  # Now try to locate executable using which
34064  new_path=`$WHICH "$new_path" 2> /dev/null`
34065  # bat and cmd files are not always considered executable in cygwin causing which
34066  # to not find them
34067  if test "x$new_path" = x \
34068      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34069      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34070    new_path=`$CYGPATH -u "$path"`
34071  fi
34072  if test "x$new_path" = x; then
34073    # Oops. Which didn't find the executable.
34074    # The splitting of arguments from the executable at a space might have been incorrect,
34075    # since paths with space are more likely in Windows. Give it another try with the whole
34076    # argument.
34077    path="$complete"
34078    arguments="EOL"
34079    new_path=`$CYGPATH -u "$path"`
34080    new_path=`$WHICH "$new_path" 2> /dev/null`
34081    # bat and cmd files are not always considered executable in cygwin causing which
34082    # to not find them
34083    if test "x$new_path" = x \
34084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34086      new_path=`$CYGPATH -u "$path"`
34087    fi
34088    if test "x$new_path" = x; then
34089      # It's still not found. Now this is an unrecoverable error.
34090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34091$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34092      has_space=`$ECHO "$complete" | $GREP " "`
34093      if test "x$has_space" != x; then
34094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34096      fi
34097      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34098    fi
34099  fi
34100
34101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34104  # "foo.exe" is OK but "foo" is an error.
34105  #
34106  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34107  # It is also a way to make sure we got the proper file name for the real test later on.
34108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34109  if test "x$test_shortpath" = x; then
34110    # Short path failed, file does not exist as specified.
34111    # Try adding .exe or .cmd
34112    if test -f "${new_path}.exe"; then
34113      input_to_shortpath="${new_path}.exe"
34114    elif test -f "${new_path}.cmd"; then
34115      input_to_shortpath="${new_path}.cmd"
34116    else
34117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34118$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34119      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34120$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34121      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34122    fi
34123  else
34124    input_to_shortpath="$new_path"
34125  fi
34126
34127  # Call helper function which possibly converts this using DOS-style short mode.
34128  # If so, the updated path is stored in $new_path.
34129  new_path="$input_to_shortpath"
34130
34131  input_path="$input_to_shortpath"
34132  # Check if we need to convert this using DOS-style short mode. If the path
34133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34134  # take no chances and rewrite it.
34135  # Note: m4 eats our [], so we need to use [ and ] instead.
34136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34137  if test "x$has_forbidden_chars" != x; then
34138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34142      # Going to short mode and back again did indeed matter. Since short mode is
34143      # case insensitive, let's make it lowercase to improve readability.
34144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34145      # Now convert it back to Unix-style (cygpath)
34146      input_path=`$CYGPATH -u "$shortmode_path"`
34147      new_path="$input_path"
34148    fi
34149  fi
34150
34151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34152  if test "x$test_cygdrive_prefix" = x; then
34153    # As a simple fix, exclude /usr/bin since it's not a real path.
34154    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34156      # a path prefixed by /cygdrive for fixpath to work.
34157      new_path="$CYGWIN_ROOT_PATH$input_path"
34158    fi
34159  fi
34160
34161  # remove trailing .exe if any
34162  new_path="${new_path/%.exe/}"
34163
34164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34165
34166  # First separate the path from the arguments. This will split at the first
34167  # space.
34168  complete="$CXX"
34169  path="${complete%% *}"
34170  tmp="$complete EOL"
34171  arguments="${tmp#* }"
34172
34173  # Input might be given as Windows format, start by converting to
34174  # unix format.
34175  new_path="$path"
34176
34177  windows_path="$new_path"
34178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34179    unix_path=`$CYGPATH -u "$windows_path"`
34180    new_path="$unix_path"
34181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34183    new_path="$unix_path"
34184  fi
34185
34186
34187  # Now try to locate executable using which
34188  new_path=`$WHICH "$new_path" 2> /dev/null`
34189
34190  if test "x$new_path" = x; then
34191    # Oops. Which didn't find the executable.
34192    # The splitting of arguments from the executable at a space might have been incorrect,
34193    # since paths with space are more likely in Windows. Give it another try with the whole
34194    # argument.
34195    path="$complete"
34196    arguments="EOL"
34197    new_path="$path"
34198
34199  windows_path="$new_path"
34200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34201    unix_path=`$CYGPATH -u "$windows_path"`
34202    new_path="$unix_path"
34203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34205    new_path="$unix_path"
34206  fi
34207
34208
34209    new_path=`$WHICH "$new_path" 2> /dev/null`
34210    # bat and cmd files are not always considered executable in MSYS causing which
34211    # to not find them
34212    if test "x$new_path" = x \
34213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34215      new_path="$path"
34216
34217  windows_path="$new_path"
34218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34219    unix_path=`$CYGPATH -u "$windows_path"`
34220    new_path="$unix_path"
34221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34223    new_path="$unix_path"
34224  fi
34225
34226    fi
34227
34228    if test "x$new_path" = x; then
34229      # It's still not found. Now this is an unrecoverable error.
34230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34231$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34232      has_space=`$ECHO "$complete" | $GREP " "`
34233      if test "x$has_space" != x; then
34234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34236      fi
34237      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34238    fi
34239  fi
34240
34241  # Now new_path has a complete unix path to the binary
34242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34243    # Keep paths in /bin as-is, but remove trailing .exe if any
34244    new_path="${new_path/%.exe/}"
34245    # Do not save /bin paths to all_fixpath_prefixes!
34246  else
34247    # Not in mixed or Windows style, start by that.
34248    new_path=`cmd //c echo $new_path`
34249
34250  input_path="$new_path"
34251  # Check if we need to convert this using DOS-style short mode. If the path
34252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34253  # take no chances and rewrite it.
34254  # Note: m4 eats our [], so we need to use [ and ] instead.
34255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34256  if test "x$has_forbidden_chars" != x; then
34257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34259  fi
34260
34261    # Output is in $new_path
34262
34263  windows_path="$new_path"
34264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34265    unix_path=`$CYGPATH -u "$windows_path"`
34266    new_path="$unix_path"
34267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34269    new_path="$unix_path"
34270  fi
34271
34272    # remove trailing .exe if any
34273    new_path="${new_path/%.exe/}"
34274
34275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34277  fi
34278
34279    else
34280      # We're on a unix platform. Hooray! :)
34281      # First separate the path from the arguments. This will split at the first
34282      # space.
34283      complete="$CXX"
34284      path="${complete%% *}"
34285      tmp="$complete EOL"
34286      arguments="${tmp#* }"
34287
34288      # Cannot rely on the command "which" here since it doesn't always work.
34289      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34290      if test -z "$is_absolute_path"; then
34291        # Path to executable is not absolute. Find it.
34292        IFS_save="$IFS"
34293        IFS=:
34294        for p in $PATH; do
34295          if test -f "$p/$path" && test -x "$p/$path"; then
34296            new_path="$p/$path"
34297            break
34298          fi
34299        done
34300        IFS="$IFS_save"
34301      else
34302        # This is an absolute path, we can use it without further modifications.
34303        new_path="$path"
34304      fi
34305
34306      if test "x$new_path" = x; then
34307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34308$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34309        has_space=`$ECHO "$complete" | $GREP " "`
34310        if test "x$has_space" != x; then
34311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34313        fi
34314        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34315      fi
34316    fi
34317
34318    # Now join together the path and the arguments once again
34319    if test "x$arguments" != xEOL; then
34320      new_complete="$new_path ${arguments% *}"
34321    else
34322      new_complete="$new_path"
34323    fi
34324
34325    if test "x$complete" != "x$new_complete"; then
34326      CXX="$new_complete"
34327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34328$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34329    fi
34330  fi
34331
34332  TEST_COMPILER="$CXX"
34333
34334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34335$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34336  SYMLINK_ORIGINAL="$TEST_COMPILER"
34337
34338  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34339    # Follow a chain of symbolic links. Use readlink
34340    # where it exists, else fall back to horribly
34341    # complicated shell code.
34342    if test "x$READLINK_TESTED" != yes; then
34343      # On MacOSX there is a readlink tool with a different
34344      # purpose than the GNU readlink tool. Check the found readlink.
34345      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34346      if test "x$ISGNU" = x; then
34347        # A readlink that we do not know how to use.
34348        # Are there other non-GNU readlinks out there?
34349        READLINK_TESTED=yes
34350        READLINK=
34351      fi
34352    fi
34353
34354    if test "x$READLINK" != x; then
34355      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34356    else
34357      # Save the current directory for restoring afterwards
34358      STARTDIR=$PWD
34359      COUNTER=0
34360      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34361      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34362      cd $sym_link_dir
34363      # Use -P flag to resolve symlinks in directories.
34364      cd `$THEPWDCMD -P`
34365      sym_link_dir=`$THEPWDCMD -P`
34366      # Resolve file symlinks
34367      while test $COUNTER -lt 20; do
34368        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34369        if test "x$ISLINK" == x; then
34370          # This is not a symbolic link! We are done!
34371          break
34372        fi
34373        # Again resolve directory symlinks since the target of the just found
34374        # link could be in a different directory
34375        cd `$DIRNAME $ISLINK`
34376        sym_link_dir=`$THEPWDCMD -P`
34377        sym_link_file=`$BASENAME $ISLINK`
34378        let COUNTER=COUNTER+1
34379      done
34380      cd $STARTDIR
34381      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34382    fi
34383  fi
34384
34385  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34387$as_echo "no symlink" >&6; }
34388  else
34389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34390$as_echo "$SYMLINK_ORIGINAL" >&6; }
34391
34392    # We can't handle ccache by gcc wrappers, since we need to know if we're
34393    # using ccache. Instead ccache usage must be controlled by a configure option.
34394    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34395    if test "x$COMPILER_BASENAME" = "xccache"; then
34396      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34397$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34398      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34399    fi
34400  fi
34401
34402
34403  COMPILER=$CXX
34404  COMPILER_NAME=$COMPILER_NAME
34405
34406  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34407    # cc -V output typically looks like
34408    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34409    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34410    # Check that this is likely to be the Solaris Studio cc.
34411    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34412    if test $? -ne 0; then
34413      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34414      { $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
34415$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34416      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34417$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34418      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34419$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34420      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34421    fi
34422    # Remove usage instructions (if present), and
34423    # collapse compiler output into a single line
34424    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34425        $SED -e 's/ *[Uu]sage:.*//'`
34426    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34427        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34428  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34429    # xlc -qversion output typically looks like
34430    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34431    #     Version: 11.01.0000.0015
34432    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34433    # Check that this is likely to be the IBM XL C compiler.
34434    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34435    if test $? -ne 0; then
34436      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34437      { $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
34438$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34439      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34440$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34441      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34442$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34443      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34444    fi
34445    # Collapse compiler output into a single line
34446    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34447    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34448        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34449  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34450    # There is no specific version flag, but all output starts with a version string.
34451    # First line typically looks something like:
34452    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34453    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34454    # Check that this is likely to be Microsoft CL.EXE.
34455    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34456    if test $? -ne 0; then
34457      { $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
34458$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34459      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34460$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34461      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34462    fi
34463    # Collapse compiler output into a single line
34464    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34465    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34466        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34467  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34468    # gcc --version output typically looks like
34469    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34470    #     Copyright (C) 2013 Free Software Foundation, Inc.
34471    #     This is free software; see the source for copying conditions.  There is NO
34472    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34473    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34474    # Check that this is likely to be GCC.
34475    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34476    if test $? -ne 0; then
34477      { $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
34478$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34479      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34480$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34481      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34482    fi
34483    # Remove Copyright and legalese from version string, and
34484    # collapse into a single line
34485    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34486        $SED -e 's/ *Copyright .*//'`
34487    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34488        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34489  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34490    # clang --version output typically looks like
34491    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34492    #    clang version 3.3 (tags/RELEASE_33/final)
34493    # or
34494    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34495    #    Target: x86_64-pc-linux-gnu
34496    #    Thread model: posix
34497    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34498    # Check that this is likely to be clang
34499    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34500    if test $? -ne 0; then
34501      { $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
34502$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34503      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34504$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34505      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34506    fi
34507    # Collapse compiler output into a single line
34508    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34509    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34510        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34511  else
34512      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34513  fi
34514  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34515  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34516  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34517  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34518
34519  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34520$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34521
34522
34523  # Now that we have resolved CXX ourself, let autoconf have its go at it
34524  ac_ext=cpp
34525ac_cpp='$CXXCPP $CPPFLAGS'
34526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34529if test -z "$CXX"; then
34530  if test -n "$CCC"; then
34531    CXX=$CCC
34532  else
34533    if test -n "$ac_tool_prefix"; then
34534  for ac_prog in $CXX
34535  do
34536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34539$as_echo_n "checking for $ac_word... " >&6; }
34540if ${ac_cv_prog_CXX+:} false; then :
34541  $as_echo_n "(cached) " >&6
34542else
34543  if test -n "$CXX"; then
34544  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34545else
34546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34547for as_dir in $PATH
34548do
34549  IFS=$as_save_IFS
34550  test -z "$as_dir" && as_dir=.
34551    for ac_exec_ext in '' $ac_executable_extensions; do
34552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34553    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34555    break 2
34556  fi
34557done
34558  done
34559IFS=$as_save_IFS
34560
34561fi
34562fi
34563CXX=$ac_cv_prog_CXX
34564if test -n "$CXX"; then
34565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34566$as_echo "$CXX" >&6; }
34567else
34568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34569$as_echo "no" >&6; }
34570fi
34571
34572
34573    test -n "$CXX" && break
34574  done
34575fi
34576if test -z "$CXX"; then
34577  ac_ct_CXX=$CXX
34578  for ac_prog in $CXX
34579do
34580  # Extract the first word of "$ac_prog", so it can be a program name with args.
34581set dummy $ac_prog; ac_word=$2
34582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34583$as_echo_n "checking for $ac_word... " >&6; }
34584if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34585  $as_echo_n "(cached) " >&6
34586else
34587  if test -n "$ac_ct_CXX"; then
34588  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34589else
34590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34591for as_dir in $PATH
34592do
34593  IFS=$as_save_IFS
34594  test -z "$as_dir" && as_dir=.
34595    for ac_exec_ext in '' $ac_executable_extensions; do
34596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34597    ac_cv_prog_ac_ct_CXX="$ac_prog"
34598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34599    break 2
34600  fi
34601done
34602  done
34603IFS=$as_save_IFS
34604
34605fi
34606fi
34607ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34608if test -n "$ac_ct_CXX"; then
34609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34610$as_echo "$ac_ct_CXX" >&6; }
34611else
34612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34613$as_echo "no" >&6; }
34614fi
34615
34616
34617  test -n "$ac_ct_CXX" && break
34618done
34619
34620  if test "x$ac_ct_CXX" = x; then
34621    CXX="g++"
34622  else
34623    case $cross_compiling:$ac_tool_warned in
34624yes:)
34625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34627ac_tool_warned=yes ;;
34628esac
34629    CXX=$ac_ct_CXX
34630  fi
34631fi
34632
34633  fi
34634fi
34635# Provide some information about the compiler.
34636$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34637set X $ac_compile
34638ac_compiler=$2
34639for ac_option in --version -v -V -qversion; do
34640  { { ac_try="$ac_compiler $ac_option >&5"
34641case "(($ac_try" in
34642  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34643  *) ac_try_echo=$ac_try;;
34644esac
34645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34646$as_echo "$ac_try_echo"; } >&5
34647  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34648  ac_status=$?
34649  if test -s conftest.err; then
34650    sed '10a\
34651... rest of stderr output deleted ...
34652         10q' conftest.err >conftest.er1
34653    cat conftest.er1 >&5
34654  fi
34655  rm -f conftest.er1 conftest.err
34656  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34657  test $ac_status = 0; }
34658done
34659
34660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34661$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34662if ${ac_cv_cxx_compiler_gnu+:} false; then :
34663  $as_echo_n "(cached) " >&6
34664else
34665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34666/* end confdefs.h.  */
34667
34668int
34669main ()
34670{
34671#ifndef __GNUC__
34672       choke me
34673#endif
34674
34675  ;
34676  return 0;
34677}
34678_ACEOF
34679if ac_fn_cxx_try_compile "$LINENO"; then :
34680  ac_compiler_gnu=yes
34681else
34682  ac_compiler_gnu=no
34683fi
34684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34685ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34686
34687fi
34688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34689$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34690if test $ac_compiler_gnu = yes; then
34691  GXX=yes
34692else
34693  GXX=
34694fi
34695ac_test_CXXFLAGS=${CXXFLAGS+set}
34696ac_save_CXXFLAGS=$CXXFLAGS
34697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34698$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34699if ${ac_cv_prog_cxx_g+:} false; then :
34700  $as_echo_n "(cached) " >&6
34701else
34702  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34703   ac_cxx_werror_flag=yes
34704   ac_cv_prog_cxx_g=no
34705   CXXFLAGS="-g"
34706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34707/* end confdefs.h.  */
34708
34709int
34710main ()
34711{
34712
34713  ;
34714  return 0;
34715}
34716_ACEOF
34717if ac_fn_cxx_try_compile "$LINENO"; then :
34718  ac_cv_prog_cxx_g=yes
34719else
34720  CXXFLAGS=""
34721      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34722/* end confdefs.h.  */
34723
34724int
34725main ()
34726{
34727
34728  ;
34729  return 0;
34730}
34731_ACEOF
34732if ac_fn_cxx_try_compile "$LINENO"; then :
34733
34734else
34735  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34736	 CXXFLAGS="-g"
34737	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34738/* end confdefs.h.  */
34739
34740int
34741main ()
34742{
34743
34744  ;
34745  return 0;
34746}
34747_ACEOF
34748if ac_fn_cxx_try_compile "$LINENO"; then :
34749  ac_cv_prog_cxx_g=yes
34750fi
34751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34752fi
34753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34754fi
34755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34756   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34757fi
34758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34759$as_echo "$ac_cv_prog_cxx_g" >&6; }
34760if test "$ac_test_CXXFLAGS" = set; then
34761  CXXFLAGS=$ac_save_CXXFLAGS
34762elif test $ac_cv_prog_cxx_g = yes; then
34763  if test "$GXX" = yes; then
34764    CXXFLAGS="-g -O2"
34765  else
34766    CXXFLAGS="-g"
34767  fi
34768else
34769  if test "$GXX" = yes; then
34770    CXXFLAGS="-O2"
34771  else
34772    CXXFLAGS=
34773  fi
34774fi
34775ac_ext=cpp
34776ac_cpp='$CXXCPP $CPPFLAGS'
34777ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34778ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34779ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34780
34781
34782  # This is the compiler version number on the form X.Y[.Z]
34783
34784
34785
34786
34787  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34788    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34789$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34790    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34791$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34792  fi
34793
34794  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34795  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34796    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34797$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34798  fi
34799
34800  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34801    { $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
34802$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34803  fi
34804
34805  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34806
34807
34808  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851    # Execute function body
34852
34853  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34854  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34855
34856  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34857    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34858  fi
34859
34860  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34861    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34862  fi
34863
34864  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34865  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34866
34867  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34868    :
34869
34870  else
34871    :
34872
34873          { $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
34874$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34875
34876
34877  fi
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890  fi
34891
34892  #
34893  # Setup the preprocessor (CPP and CXXCPP)
34894  #
34895  ac_ext=c
34896ac_cpp='$CPP $CPPFLAGS'
34897ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34898ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34899ac_compiler_gnu=$ac_cv_c_compiler_gnu
34900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34901$as_echo_n "checking how to run the C preprocessor... " >&6; }
34902# On Suns, sometimes $CPP names a directory.
34903if test -n "$CPP" && test -d "$CPP"; then
34904  CPP=
34905fi
34906if test -z "$CPP"; then
34907  if ${ac_cv_prog_CPP+:} false; then :
34908  $as_echo_n "(cached) " >&6
34909else
34910      # Double quotes because CPP needs to be expanded
34911    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34912    do
34913      ac_preproc_ok=false
34914for ac_c_preproc_warn_flag in '' yes
34915do
34916  # Use a header file that comes with gcc, so configuring glibc
34917  # with a fresh cross-compiler works.
34918  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34919  # <limits.h> exists even on freestanding compilers.
34920  # On the NeXT, cc -E runs the code through the compiler's parser,
34921  # not just through cpp. "Syntax error" is here to catch this case.
34922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34923/* end confdefs.h.  */
34924#ifdef __STDC__
34925# include <limits.h>
34926#else
34927# include <assert.h>
34928#endif
34929		     Syntax error
34930_ACEOF
34931if ac_fn_c_try_cpp "$LINENO"; then :
34932
34933else
34934  # Broken: fails on valid input.
34935continue
34936fi
34937rm -f conftest.err conftest.i conftest.$ac_ext
34938
34939  # OK, works on sane cases.  Now check whether nonexistent headers
34940  # can be detected and how.
34941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34942/* end confdefs.h.  */
34943#include <ac_nonexistent.h>
34944_ACEOF
34945if ac_fn_c_try_cpp "$LINENO"; then :
34946  # Broken: success on invalid input.
34947continue
34948else
34949  # Passes both tests.
34950ac_preproc_ok=:
34951break
34952fi
34953rm -f conftest.err conftest.i conftest.$ac_ext
34954
34955done
34956# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34957rm -f conftest.i conftest.err conftest.$ac_ext
34958if $ac_preproc_ok; then :
34959  break
34960fi
34961
34962    done
34963    ac_cv_prog_CPP=$CPP
34964
34965fi
34966  CPP=$ac_cv_prog_CPP
34967else
34968  ac_cv_prog_CPP=$CPP
34969fi
34970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34971$as_echo "$CPP" >&6; }
34972ac_preproc_ok=false
34973for ac_c_preproc_warn_flag in '' yes
34974do
34975  # Use a header file that comes with gcc, so configuring glibc
34976  # with a fresh cross-compiler works.
34977  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34978  # <limits.h> exists even on freestanding compilers.
34979  # On the NeXT, cc -E runs the code through the compiler's parser,
34980  # not just through cpp. "Syntax error" is here to catch this case.
34981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34982/* end confdefs.h.  */
34983#ifdef __STDC__
34984# include <limits.h>
34985#else
34986# include <assert.h>
34987#endif
34988		     Syntax error
34989_ACEOF
34990if ac_fn_c_try_cpp "$LINENO"; then :
34991
34992else
34993  # Broken: fails on valid input.
34994continue
34995fi
34996rm -f conftest.err conftest.i conftest.$ac_ext
34997
34998  # OK, works on sane cases.  Now check whether nonexistent headers
34999  # can be detected and how.
35000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35001/* end confdefs.h.  */
35002#include <ac_nonexistent.h>
35003_ACEOF
35004if ac_fn_c_try_cpp "$LINENO"; then :
35005  # Broken: success on invalid input.
35006continue
35007else
35008  # Passes both tests.
35009ac_preproc_ok=:
35010break
35011fi
35012rm -f conftest.err conftest.i conftest.$ac_ext
35013
35014done
35015# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35016rm -f conftest.i conftest.err conftest.$ac_ext
35017if $ac_preproc_ok; then :
35018
35019else
35020  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35022as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35023See \`config.log' for more details" "$LINENO" 5; }
35024fi
35025
35026ac_ext=cpp
35027ac_cpp='$CXXCPP $CPPFLAGS'
35028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35031
35032
35033  # Only process if variable expands to non-empty
35034
35035  if test "x$CPP" != x; then
35036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35037
35038  # First separate the path from the arguments. This will split at the first
35039  # space.
35040  complete="$CPP"
35041  path="${complete%% *}"
35042  tmp="$complete EOL"
35043  arguments="${tmp#* }"
35044
35045  # Input might be given as Windows format, start by converting to
35046  # unix format.
35047  new_path=`$CYGPATH -u "$path"`
35048
35049  # Now try to locate executable using which
35050  new_path=`$WHICH "$new_path" 2> /dev/null`
35051  # bat and cmd files are not always considered executable in cygwin causing which
35052  # to not find them
35053  if test "x$new_path" = x \
35054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35056    new_path=`$CYGPATH -u "$path"`
35057  fi
35058  if test "x$new_path" = x; then
35059    # Oops. Which didn't find the executable.
35060    # The splitting of arguments from the executable at a space might have been incorrect,
35061    # since paths with space are more likely in Windows. Give it another try with the whole
35062    # argument.
35063    path="$complete"
35064    arguments="EOL"
35065    new_path=`$CYGPATH -u "$path"`
35066    new_path=`$WHICH "$new_path" 2> /dev/null`
35067    # bat and cmd files are not always considered executable in cygwin causing which
35068    # to not find them
35069    if test "x$new_path" = x \
35070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35072      new_path=`$CYGPATH -u "$path"`
35073    fi
35074    if test "x$new_path" = x; then
35075      # It's still not found. Now this is an unrecoverable error.
35076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35077$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35078      has_space=`$ECHO "$complete" | $GREP " "`
35079      if test "x$has_space" != x; then
35080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35082      fi
35083      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35084    fi
35085  fi
35086
35087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35090  # "foo.exe" is OK but "foo" is an error.
35091  #
35092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35093  # It is also a way to make sure we got the proper file name for the real test later on.
35094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35095  if test "x$test_shortpath" = x; then
35096    # Short path failed, file does not exist as specified.
35097    # Try adding .exe or .cmd
35098    if test -f "${new_path}.exe"; then
35099      input_to_shortpath="${new_path}.exe"
35100    elif test -f "${new_path}.cmd"; then
35101      input_to_shortpath="${new_path}.cmd"
35102    else
35103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35104$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35107      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35108    fi
35109  else
35110    input_to_shortpath="$new_path"
35111  fi
35112
35113  # Call helper function which possibly converts this using DOS-style short mode.
35114  # If so, the updated path is stored in $new_path.
35115  new_path="$input_to_shortpath"
35116
35117  input_path="$input_to_shortpath"
35118  # Check if we need to convert this using DOS-style short mode. If the path
35119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35120  # take no chances and rewrite it.
35121  # Note: m4 eats our [], so we need to use [ and ] instead.
35122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35123  if test "x$has_forbidden_chars" != x; then
35124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35128      # Going to short mode and back again did indeed matter. Since short mode is
35129      # case insensitive, let's make it lowercase to improve readability.
35130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35131      # Now convert it back to Unix-style (cygpath)
35132      input_path=`$CYGPATH -u "$shortmode_path"`
35133      new_path="$input_path"
35134    fi
35135  fi
35136
35137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35138  if test "x$test_cygdrive_prefix" = x; then
35139    # As a simple fix, exclude /usr/bin since it's not a real path.
35140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35142      # a path prefixed by /cygdrive for fixpath to work.
35143      new_path="$CYGWIN_ROOT_PATH$input_path"
35144    fi
35145  fi
35146
35147  # remove trailing .exe if any
35148  new_path="${new_path/%.exe/}"
35149
35150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35151
35152  # First separate the path from the arguments. This will split at the first
35153  # space.
35154  complete="$CPP"
35155  path="${complete%% *}"
35156  tmp="$complete EOL"
35157  arguments="${tmp#* }"
35158
35159  # Input might be given as Windows format, start by converting to
35160  # unix format.
35161  new_path="$path"
35162
35163  windows_path="$new_path"
35164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35165    unix_path=`$CYGPATH -u "$windows_path"`
35166    new_path="$unix_path"
35167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35169    new_path="$unix_path"
35170  fi
35171
35172
35173  # Now try to locate executable using which
35174  new_path=`$WHICH "$new_path" 2> /dev/null`
35175
35176  if test "x$new_path" = x; then
35177    # Oops. Which didn't find the executable.
35178    # The splitting of arguments from the executable at a space might have been incorrect,
35179    # since paths with space are more likely in Windows. Give it another try with the whole
35180    # argument.
35181    path="$complete"
35182    arguments="EOL"
35183    new_path="$path"
35184
35185  windows_path="$new_path"
35186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35187    unix_path=`$CYGPATH -u "$windows_path"`
35188    new_path="$unix_path"
35189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35191    new_path="$unix_path"
35192  fi
35193
35194
35195    new_path=`$WHICH "$new_path" 2> /dev/null`
35196    # bat and cmd files are not always considered executable in MSYS causing which
35197    # to not find them
35198    if test "x$new_path" = x \
35199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35201      new_path="$path"
35202
35203  windows_path="$new_path"
35204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35205    unix_path=`$CYGPATH -u "$windows_path"`
35206    new_path="$unix_path"
35207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35209    new_path="$unix_path"
35210  fi
35211
35212    fi
35213
35214    if test "x$new_path" = x; then
35215      # It's still not found. Now this is an unrecoverable error.
35216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35217$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35218      has_space=`$ECHO "$complete" | $GREP " "`
35219      if test "x$has_space" != x; then
35220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35222      fi
35223      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35224    fi
35225  fi
35226
35227  # Now new_path has a complete unix path to the binary
35228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35229    # Keep paths in /bin as-is, but remove trailing .exe if any
35230    new_path="${new_path/%.exe/}"
35231    # Do not save /bin paths to all_fixpath_prefixes!
35232  else
35233    # Not in mixed or Windows style, start by that.
35234    new_path=`cmd //c echo $new_path`
35235
35236  input_path="$new_path"
35237  # Check if we need to convert this using DOS-style short mode. If the path
35238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35239  # take no chances and rewrite it.
35240  # Note: m4 eats our [], so we need to use [ and ] instead.
35241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35242  if test "x$has_forbidden_chars" != x; then
35243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35245  fi
35246
35247    # Output is in $new_path
35248
35249  windows_path="$new_path"
35250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35251    unix_path=`$CYGPATH -u "$windows_path"`
35252    new_path="$unix_path"
35253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35255    new_path="$unix_path"
35256  fi
35257
35258    # remove trailing .exe if any
35259    new_path="${new_path/%.exe/}"
35260
35261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35263  fi
35264
35265    else
35266      # We're on a unix platform. Hooray! :)
35267      # First separate the path from the arguments. This will split at the first
35268      # space.
35269      complete="$CPP"
35270      path="${complete%% *}"
35271      tmp="$complete EOL"
35272      arguments="${tmp#* }"
35273
35274      # Cannot rely on the command "which" here since it doesn't always work.
35275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35276      if test -z "$is_absolute_path"; then
35277        # Path to executable is not absolute. Find it.
35278        IFS_save="$IFS"
35279        IFS=:
35280        for p in $PATH; do
35281          if test -f "$p/$path" && test -x "$p/$path"; then
35282            new_path="$p/$path"
35283            break
35284          fi
35285        done
35286        IFS="$IFS_save"
35287      else
35288        # This is an absolute path, we can use it without further modifications.
35289        new_path="$path"
35290      fi
35291
35292      if test "x$new_path" = x; then
35293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35294$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35295        has_space=`$ECHO "$complete" | $GREP " "`
35296        if test "x$has_space" != x; then
35297          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35299        fi
35300        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35301      fi
35302    fi
35303
35304    # Now join together the path and the arguments once again
35305    if test "x$arguments" != xEOL; then
35306      new_complete="$new_path ${arguments% *}"
35307    else
35308      new_complete="$new_path"
35309    fi
35310
35311    if test "x$complete" != "x$new_complete"; then
35312      CPP="$new_complete"
35313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35314$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35315    fi
35316  fi
35317
35318  ac_ext=cpp
35319ac_cpp='$CXXCPP $CPPFLAGS'
35320ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35321ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35322ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35324$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35325if test -z "$CXXCPP"; then
35326  if ${ac_cv_prog_CXXCPP+:} false; then :
35327  $as_echo_n "(cached) " >&6
35328else
35329      # Double quotes because CXXCPP needs to be expanded
35330    for CXXCPP in "$CXX -E" "/lib/cpp"
35331    do
35332      ac_preproc_ok=false
35333for ac_cxx_preproc_warn_flag in '' yes
35334do
35335  # Use a header file that comes with gcc, so configuring glibc
35336  # with a fresh cross-compiler works.
35337  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35338  # <limits.h> exists even on freestanding compilers.
35339  # On the NeXT, cc -E runs the code through the compiler's parser,
35340  # not just through cpp. "Syntax error" is here to catch this case.
35341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35342/* end confdefs.h.  */
35343#ifdef __STDC__
35344# include <limits.h>
35345#else
35346# include <assert.h>
35347#endif
35348		     Syntax error
35349_ACEOF
35350if ac_fn_cxx_try_cpp "$LINENO"; then :
35351
35352else
35353  # Broken: fails on valid input.
35354continue
35355fi
35356rm -f conftest.err conftest.i conftest.$ac_ext
35357
35358  # OK, works on sane cases.  Now check whether nonexistent headers
35359  # can be detected and how.
35360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35361/* end confdefs.h.  */
35362#include <ac_nonexistent.h>
35363_ACEOF
35364if ac_fn_cxx_try_cpp "$LINENO"; then :
35365  # Broken: success on invalid input.
35366continue
35367else
35368  # Passes both tests.
35369ac_preproc_ok=:
35370break
35371fi
35372rm -f conftest.err conftest.i conftest.$ac_ext
35373
35374done
35375# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35376rm -f conftest.i conftest.err conftest.$ac_ext
35377if $ac_preproc_ok; then :
35378  break
35379fi
35380
35381    done
35382    ac_cv_prog_CXXCPP=$CXXCPP
35383
35384fi
35385  CXXCPP=$ac_cv_prog_CXXCPP
35386else
35387  ac_cv_prog_CXXCPP=$CXXCPP
35388fi
35389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35390$as_echo "$CXXCPP" >&6; }
35391ac_preproc_ok=false
35392for ac_cxx_preproc_warn_flag in '' yes
35393do
35394  # Use a header file that comes with gcc, so configuring glibc
35395  # with a fresh cross-compiler works.
35396  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35397  # <limits.h> exists even on freestanding compilers.
35398  # On the NeXT, cc -E runs the code through the compiler's parser,
35399  # not just through cpp. "Syntax error" is here to catch this case.
35400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35401/* end confdefs.h.  */
35402#ifdef __STDC__
35403# include <limits.h>
35404#else
35405# include <assert.h>
35406#endif
35407		     Syntax error
35408_ACEOF
35409if ac_fn_cxx_try_cpp "$LINENO"; then :
35410
35411else
35412  # Broken: fails on valid input.
35413continue
35414fi
35415rm -f conftest.err conftest.i conftest.$ac_ext
35416
35417  # OK, works on sane cases.  Now check whether nonexistent headers
35418  # can be detected and how.
35419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35420/* end confdefs.h.  */
35421#include <ac_nonexistent.h>
35422_ACEOF
35423if ac_fn_cxx_try_cpp "$LINENO"; then :
35424  # Broken: success on invalid input.
35425continue
35426else
35427  # Passes both tests.
35428ac_preproc_ok=:
35429break
35430fi
35431rm -f conftest.err conftest.i conftest.$ac_ext
35432
35433done
35434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35435rm -f conftest.i conftest.err conftest.$ac_ext
35436if $ac_preproc_ok; then :
35437
35438else
35439  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35441as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35442See \`config.log' for more details" "$LINENO" 5; }
35443fi
35444
35445ac_ext=cpp
35446ac_cpp='$CXXCPP $CPPFLAGS'
35447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35450
35451
35452  # Only process if variable expands to non-empty
35453
35454  if test "x$CXXCPP" != x; then
35455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35456
35457  # First separate the path from the arguments. This will split at the first
35458  # space.
35459  complete="$CXXCPP"
35460  path="${complete%% *}"
35461  tmp="$complete EOL"
35462  arguments="${tmp#* }"
35463
35464  # Input might be given as Windows format, start by converting to
35465  # unix format.
35466  new_path=`$CYGPATH -u "$path"`
35467
35468  # Now try to locate executable using which
35469  new_path=`$WHICH "$new_path" 2> /dev/null`
35470  # bat and cmd files are not always considered executable in cygwin causing which
35471  # to not find them
35472  if test "x$new_path" = x \
35473      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35474      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35475    new_path=`$CYGPATH -u "$path"`
35476  fi
35477  if test "x$new_path" = x; then
35478    # Oops. Which didn't find the executable.
35479    # The splitting of arguments from the executable at a space might have been incorrect,
35480    # since paths with space are more likely in Windows. Give it another try with the whole
35481    # argument.
35482    path="$complete"
35483    arguments="EOL"
35484    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
35495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35496$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35497      has_space=`$ECHO "$complete" | $GREP " "`
35498      if test "x$has_space" != x; then
35499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35501      fi
35502      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35503    fi
35504  fi
35505
35506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35509  # "foo.exe" is OK but "foo" is an error.
35510  #
35511  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35512  # It is also a way to make sure we got the proper file name for the real test later on.
35513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35514  if test "x$test_shortpath" = x; then
35515    # Short path failed, file does not exist as specified.
35516    # Try adding .exe or .cmd
35517    if test -f "${new_path}.exe"; then
35518      input_to_shortpath="${new_path}.exe"
35519    elif test -f "${new_path}.cmd"; then
35520      input_to_shortpath="${new_path}.cmd"
35521    else
35522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35523$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35524      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35525$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35526      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35527    fi
35528  else
35529    input_to_shortpath="$new_path"
35530  fi
35531
35532  # Call helper function which possibly converts this using DOS-style short mode.
35533  # If so, the updated path is stored in $new_path.
35534  new_path="$input_to_shortpath"
35535
35536  input_path="$input_to_shortpath"
35537  # Check if we need to convert this using DOS-style short mode. If the path
35538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35539  # take no chances and rewrite it.
35540  # Note: m4 eats our [], so we need to use [ and ] instead.
35541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35542  if test "x$has_forbidden_chars" != x; then
35543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35547      # Going to short mode and back again did indeed matter. Since short mode is
35548      # case insensitive, let's make it lowercase to improve readability.
35549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35550      # Now convert it back to Unix-style (cygpath)
35551      input_path=`$CYGPATH -u "$shortmode_path"`
35552      new_path="$input_path"
35553    fi
35554  fi
35555
35556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35557  if test "x$test_cygdrive_prefix" = x; then
35558    # As a simple fix, exclude /usr/bin since it's not a real path.
35559    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35561      # a path prefixed by /cygdrive for fixpath to work.
35562      new_path="$CYGWIN_ROOT_PATH$input_path"
35563    fi
35564  fi
35565
35566  # remove trailing .exe if any
35567  new_path="${new_path/%.exe/}"
35568
35569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35570
35571  # First separate the path from the arguments. This will split at the first
35572  # space.
35573  complete="$CXXCPP"
35574  path="${complete%% *}"
35575  tmp="$complete EOL"
35576  arguments="${tmp#* }"
35577
35578  # Input might be given as Windows format, start by converting to
35579  # unix format.
35580  new_path="$path"
35581
35582  windows_path="$new_path"
35583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35584    unix_path=`$CYGPATH -u "$windows_path"`
35585    new_path="$unix_path"
35586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35588    new_path="$unix_path"
35589  fi
35590
35591
35592  # Now try to locate executable using which
35593  new_path=`$WHICH "$new_path" 2> /dev/null`
35594
35595  if test "x$new_path" = x; then
35596    # Oops. Which didn't find the executable.
35597    # The splitting of arguments from the executable at a space might have been incorrect,
35598    # since paths with space are more likely in Windows. Give it another try with the whole
35599    # argument.
35600    path="$complete"
35601    arguments="EOL"
35602    new_path="$path"
35603
35604  windows_path="$new_path"
35605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35606    unix_path=`$CYGPATH -u "$windows_path"`
35607    new_path="$unix_path"
35608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35610    new_path="$unix_path"
35611  fi
35612
35613
35614    new_path=`$WHICH "$new_path" 2> /dev/null`
35615    # bat and cmd files are not always considered executable in MSYS causing which
35616    # to not find them
35617    if test "x$new_path" = x \
35618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35620      new_path="$path"
35621
35622  windows_path="$new_path"
35623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35624    unix_path=`$CYGPATH -u "$windows_path"`
35625    new_path="$unix_path"
35626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35628    new_path="$unix_path"
35629  fi
35630
35631    fi
35632
35633    if test "x$new_path" = x; then
35634      # It's still not found. Now this is an unrecoverable error.
35635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35636$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35637      has_space=`$ECHO "$complete" | $GREP " "`
35638      if test "x$has_space" != x; then
35639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35641      fi
35642      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35643    fi
35644  fi
35645
35646  # Now new_path has a complete unix path to the binary
35647  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35648    # Keep paths in /bin as-is, but remove trailing .exe if any
35649    new_path="${new_path/%.exe/}"
35650    # Do not save /bin paths to all_fixpath_prefixes!
35651  else
35652    # Not in mixed or Windows style, start by that.
35653    new_path=`cmd //c echo $new_path`
35654
35655  input_path="$new_path"
35656  # Check if we need to convert this using DOS-style short mode. If the path
35657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35658  # take no chances and rewrite it.
35659  # Note: m4 eats our [], so we need to use [ and ] instead.
35660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35661  if test "x$has_forbidden_chars" != x; then
35662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35664  fi
35665
35666    # Output is in $new_path
35667
35668  windows_path="$new_path"
35669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35670    unix_path=`$CYGPATH -u "$windows_path"`
35671    new_path="$unix_path"
35672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35674    new_path="$unix_path"
35675  fi
35676
35677    # remove trailing .exe if any
35678    new_path="${new_path/%.exe/}"
35679
35680    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35681    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35682  fi
35683
35684    else
35685      # We're on a unix platform. Hooray! :)
35686      # First separate the path from the arguments. This will split at the first
35687      # space.
35688      complete="$CXXCPP"
35689      path="${complete%% *}"
35690      tmp="$complete EOL"
35691      arguments="${tmp#* }"
35692
35693      # Cannot rely on the command "which" here since it doesn't always work.
35694      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35695      if test -z "$is_absolute_path"; then
35696        # Path to executable is not absolute. Find it.
35697        IFS_save="$IFS"
35698        IFS=:
35699        for p in $PATH; do
35700          if test -f "$p/$path" && test -x "$p/$path"; then
35701            new_path="$p/$path"
35702            break
35703          fi
35704        done
35705        IFS="$IFS_save"
35706      else
35707        # This is an absolute path, we can use it without further modifications.
35708        new_path="$path"
35709      fi
35710
35711      if test "x$new_path" = x; then
35712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35713$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35714        has_space=`$ECHO "$complete" | $GREP " "`
35715        if test "x$has_space" != x; then
35716          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35717$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35718        fi
35719        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35720      fi
35721    fi
35722
35723    # Now join together the path and the arguments once again
35724    if test "x$arguments" != xEOL; then
35725      new_complete="$new_path ${arguments% *}"
35726    else
35727      new_complete="$new_path"
35728    fi
35729
35730    if test "x$complete" != "x$new_complete"; then
35731      CXXCPP="$new_complete"
35732      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35733$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35734    fi
35735  fi
35736
35737
35738  #
35739  # Setup the linker (LD)
35740  #
35741  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35742    # In the Microsoft toolchain we have a separate LD command "link".
35743    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35744    # a cygwin program for something completely different.
35745    # Extract the first word of "link", so it can be a program name with args.
35746set dummy link; ac_word=$2
35747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35748$as_echo_n "checking for $ac_word... " >&6; }
35749if ${ac_cv_prog_LD+:} false; then :
35750  $as_echo_n "(cached) " >&6
35751else
35752  if test -n "$LD"; then
35753  ac_cv_prog_LD="$LD" # Let the user override the test.
35754else
35755  ac_prog_rejected=no
35756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35757for as_dir in $PATH
35758do
35759  IFS=$as_save_IFS
35760  test -z "$as_dir" && as_dir=.
35761    for ac_exec_ext in '' $ac_executable_extensions; do
35762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35763    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35764       ac_prog_rejected=yes
35765       continue
35766     fi
35767    ac_cv_prog_LD="link"
35768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35769    break 2
35770  fi
35771done
35772  done
35773IFS=$as_save_IFS
35774
35775if test $ac_prog_rejected = yes; then
35776  # We found a bogon in the path, so make sure we never use it.
35777  set dummy $ac_cv_prog_LD
35778  shift
35779  if test $# != 0; then
35780    # We chose a different compiler from the bogus one.
35781    # However, it has the same basename, so the bogon will be chosen
35782    # first if we set LD to just the basename; use the full file name.
35783    shift
35784    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35785  fi
35786fi
35787fi
35788fi
35789LD=$ac_cv_prog_LD
35790if test -n "$LD"; then
35791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35792$as_echo "$LD" >&6; }
35793else
35794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35795$as_echo "no" >&6; }
35796fi
35797
35798
35799
35800  # Only process if variable expands to non-empty
35801
35802  if test "x$LD" != x; then
35803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35804
35805  # First separate the path from the arguments. This will split at the first
35806  # space.
35807  complete="$LD"
35808  path="${complete%% *}"
35809  tmp="$complete EOL"
35810  arguments="${tmp#* }"
35811
35812  # Input might be given as Windows format, start by converting to
35813  # unix format.
35814  new_path=`$CYGPATH -u "$path"`
35815
35816  # Now try to locate executable using which
35817  new_path=`$WHICH "$new_path" 2> /dev/null`
35818  # bat and cmd files are not always considered executable in cygwin causing which
35819  # to not find them
35820  if test "x$new_path" = x \
35821      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35822      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35823    new_path=`$CYGPATH -u "$path"`
35824  fi
35825  if test "x$new_path" = x; then
35826    # Oops. Which didn't find the executable.
35827    # The splitting of arguments from the executable at a space might have been incorrect,
35828    # since paths with space are more likely in Windows. Give it another try with the whole
35829    # argument.
35830    path="$complete"
35831    arguments="EOL"
35832    new_path=`$CYGPATH -u "$path"`
35833    new_path=`$WHICH "$new_path" 2> /dev/null`
35834    # bat and cmd files are not always considered executable in cygwin causing which
35835    # to not find them
35836    if test "x$new_path" = x \
35837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35839      new_path=`$CYGPATH -u "$path"`
35840    fi
35841    if test "x$new_path" = x; then
35842      # It's still not found. Now this is an unrecoverable error.
35843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35844$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35845      has_space=`$ECHO "$complete" | $GREP " "`
35846      if test "x$has_space" != x; then
35847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35849      fi
35850      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35851    fi
35852  fi
35853
35854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35857  # "foo.exe" is OK but "foo" is an error.
35858  #
35859  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35860  # It is also a way to make sure we got the proper file name for the real test later on.
35861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35862  if test "x$test_shortpath" = x; then
35863    # Short path failed, file does not exist as specified.
35864    # Try adding .exe or .cmd
35865    if test -f "${new_path}.exe"; then
35866      input_to_shortpath="${new_path}.exe"
35867    elif test -f "${new_path}.cmd"; then
35868      input_to_shortpath="${new_path}.cmd"
35869    else
35870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35871$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35872      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35873$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35874      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35875    fi
35876  else
35877    input_to_shortpath="$new_path"
35878  fi
35879
35880  # Call helper function which possibly converts this using DOS-style short mode.
35881  # If so, the updated path is stored in $new_path.
35882  new_path="$input_to_shortpath"
35883
35884  input_path="$input_to_shortpath"
35885  # Check if we need to convert this using DOS-style short mode. If the path
35886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35887  # take no chances and rewrite it.
35888  # Note: m4 eats our [], so we need to use [ and ] instead.
35889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35890  if test "x$has_forbidden_chars" != x; then
35891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35895      # Going to short mode and back again did indeed matter. Since short mode is
35896      # case insensitive, let's make it lowercase to improve readability.
35897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35898      # Now convert it back to Unix-style (cygpath)
35899      input_path=`$CYGPATH -u "$shortmode_path"`
35900      new_path="$input_path"
35901    fi
35902  fi
35903
35904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35905  if test "x$test_cygdrive_prefix" = x; then
35906    # As a simple fix, exclude /usr/bin since it's not a real path.
35907    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35909      # a path prefixed by /cygdrive for fixpath to work.
35910      new_path="$CYGWIN_ROOT_PATH$input_path"
35911    fi
35912  fi
35913
35914  # remove trailing .exe if any
35915  new_path="${new_path/%.exe/}"
35916
35917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35918
35919  # First separate the path from the arguments. This will split at the first
35920  # space.
35921  complete="$LD"
35922  path="${complete%% *}"
35923  tmp="$complete EOL"
35924  arguments="${tmp#* }"
35925
35926  # Input might be given as Windows format, start by converting to
35927  # unix format.
35928  new_path="$path"
35929
35930  windows_path="$new_path"
35931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35932    unix_path=`$CYGPATH -u "$windows_path"`
35933    new_path="$unix_path"
35934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35936    new_path="$unix_path"
35937  fi
35938
35939
35940  # Now try to locate executable using which
35941  new_path=`$WHICH "$new_path" 2> /dev/null`
35942
35943  if test "x$new_path" = x; then
35944    # Oops. Which didn't find the executable.
35945    # The splitting of arguments from the executable at a space might have been incorrect,
35946    # since paths with space are more likely in Windows. Give it another try with the whole
35947    # argument.
35948    path="$complete"
35949    arguments="EOL"
35950    new_path="$path"
35951
35952  windows_path="$new_path"
35953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35954    unix_path=`$CYGPATH -u "$windows_path"`
35955    new_path="$unix_path"
35956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35958    new_path="$unix_path"
35959  fi
35960
35961
35962    new_path=`$WHICH "$new_path" 2> /dev/null`
35963    # bat and cmd files are not always considered executable in MSYS causing which
35964    # to not find them
35965    if test "x$new_path" = x \
35966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35968      new_path="$path"
35969
35970  windows_path="$new_path"
35971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35972    unix_path=`$CYGPATH -u "$windows_path"`
35973    new_path="$unix_path"
35974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35976    new_path="$unix_path"
35977  fi
35978
35979    fi
35980
35981    if test "x$new_path" = x; then
35982      # It's still not found. Now this is an unrecoverable error.
35983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35984$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35985      has_space=`$ECHO "$complete" | $GREP " "`
35986      if test "x$has_space" != x; then
35987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35989      fi
35990      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35991    fi
35992  fi
35993
35994  # Now new_path has a complete unix path to the binary
35995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35996    # Keep paths in /bin as-is, but remove trailing .exe if any
35997    new_path="${new_path/%.exe/}"
35998    # Do not save /bin paths to all_fixpath_prefixes!
35999  else
36000    # Not in mixed or Windows style, start by that.
36001    new_path=`cmd //c echo $new_path`
36002
36003  input_path="$new_path"
36004  # Check if we need to convert this using DOS-style short mode. If the path
36005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36006  # take no chances and rewrite it.
36007  # Note: m4 eats our [], so we need to use [ and ] instead.
36008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36009  if test "x$has_forbidden_chars" != x; then
36010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36012  fi
36013
36014    # Output is in $new_path
36015
36016  windows_path="$new_path"
36017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36018    unix_path=`$CYGPATH -u "$windows_path"`
36019    new_path="$unix_path"
36020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36022    new_path="$unix_path"
36023  fi
36024
36025    # remove trailing .exe if any
36026    new_path="${new_path/%.exe/}"
36027
36028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36030  fi
36031
36032    else
36033      # We're on a unix platform. Hooray! :)
36034      # First separate the path from the arguments. This will split at the first
36035      # space.
36036      complete="$LD"
36037      path="${complete%% *}"
36038      tmp="$complete EOL"
36039      arguments="${tmp#* }"
36040
36041      # Cannot rely on the command "which" here since it doesn't always work.
36042      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36043      if test -z "$is_absolute_path"; then
36044        # Path to executable is not absolute. Find it.
36045        IFS_save="$IFS"
36046        IFS=:
36047        for p in $PATH; do
36048          if test -f "$p/$path" && test -x "$p/$path"; then
36049            new_path="$p/$path"
36050            break
36051          fi
36052        done
36053        IFS="$IFS_save"
36054      else
36055        # This is an absolute path, we can use it without further modifications.
36056        new_path="$path"
36057      fi
36058
36059      if test "x$new_path" = x; then
36060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36061$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36062        has_space=`$ECHO "$complete" | $GREP " "`
36063        if test "x$has_space" != x; then
36064          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36066        fi
36067        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36068      fi
36069    fi
36070
36071    # Now join together the path and the arguments once again
36072    if test "x$arguments" != xEOL; then
36073      new_complete="$new_path ${arguments% *}"
36074    else
36075      new_complete="$new_path"
36076    fi
36077
36078    if test "x$complete" != "x$new_complete"; then
36079      LD="$new_complete"
36080      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36081$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36082    fi
36083  fi
36084
36085    # Verify that we indeed succeeded with this trick.
36086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36087$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36088    "$LD" --version > /dev/null
36089    if test $? -eq 0 ; then
36090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36091$as_echo "no" >&6; }
36092      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36093    else
36094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36095$as_echo "yes" >&6; }
36096    fi
36097    LDCXX="$LD"
36098  else
36099    # All other toolchains use the compiler to link.
36100    LD="$CC"
36101    LDCXX="$CXX"
36102  fi
36103
36104  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36105
36106
36107  #
36108  # Setup the assembler (AS)
36109  #
36110  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36111    # FIXME: should this really be solaris, or solstudio?
36112
36113
36114  # Publish this variable in the help.
36115
36116
36117  if [ -z "${AS+x}" ]; then
36118    # The variable is not set by user, try to locate tool using the code snippet
36119    for ac_prog in as
36120do
36121  # Extract the first word of "$ac_prog", so it can be a program name with args.
36122set dummy $ac_prog; ac_word=$2
36123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36124$as_echo_n "checking for $ac_word... " >&6; }
36125if ${ac_cv_path_AS+:} false; then :
36126  $as_echo_n "(cached) " >&6
36127else
36128  case $AS in
36129  [\\/]* | ?:[\\/]*)
36130  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36131  ;;
36132  *)
36133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36134for as_dir in $PATH
36135do
36136  IFS=$as_save_IFS
36137  test -z "$as_dir" && as_dir=.
36138    for ac_exec_ext in '' $ac_executable_extensions; do
36139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36140    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36142    break 2
36143  fi
36144done
36145  done
36146IFS=$as_save_IFS
36147
36148  ;;
36149esac
36150fi
36151AS=$ac_cv_path_AS
36152if test -n "$AS"; then
36153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36154$as_echo "$AS" >&6; }
36155else
36156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36157$as_echo "no" >&6; }
36158fi
36159
36160
36161  test -n "$AS" && break
36162done
36163
36164  else
36165    # The variable is set, but is it from the command line or the environment?
36166
36167    # Try to remove the string !AS! from our list.
36168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36170      # If it failed, the variable was not from the command line. Ignore it,
36171      # but warn the user (except for BASH, which is always set by the calling BASH).
36172      if test "xAS" != xBASH; then
36173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36174$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36175      fi
36176      # Try to locate tool using the code snippet
36177      for ac_prog in as
36178do
36179  # Extract the first word of "$ac_prog", so it can be a program name with args.
36180set dummy $ac_prog; ac_word=$2
36181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36182$as_echo_n "checking for $ac_word... " >&6; }
36183if ${ac_cv_path_AS+:} false; then :
36184  $as_echo_n "(cached) " >&6
36185else
36186  case $AS in
36187  [\\/]* | ?:[\\/]*)
36188  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36189  ;;
36190  *)
36191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36192for as_dir in $PATH
36193do
36194  IFS=$as_save_IFS
36195  test -z "$as_dir" && as_dir=.
36196    for ac_exec_ext in '' $ac_executable_extensions; do
36197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36198    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36200    break 2
36201  fi
36202done
36203  done
36204IFS=$as_save_IFS
36205
36206  ;;
36207esac
36208fi
36209AS=$ac_cv_path_AS
36210if test -n "$AS"; then
36211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36212$as_echo "$AS" >&6; }
36213else
36214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36215$as_echo "no" >&6; }
36216fi
36217
36218
36219  test -n "$AS" && break
36220done
36221
36222    else
36223      # If it succeeded, then it was overridden by the user. We will use it
36224      # for the tool.
36225
36226      # First remove it from the list of overridden variables, so we can test
36227      # for unknown variables in the end.
36228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36229
36230      # Check if we try to supply an empty value
36231      if test "x$AS" = x; then
36232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36233$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36235$as_echo_n "checking for AS... " >&6; }
36236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36237$as_echo "disabled" >&6; }
36238      else
36239        # Check if the provided tool contains a complete path.
36240        tool_specified="$AS"
36241        tool_basename="${tool_specified##*/}"
36242        if test "x$tool_basename" = "x$tool_specified"; then
36243          # A command without a complete path is provided, search $PATH.
36244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36245$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36246          # Extract the first word of "$tool_basename", so it can be a program name with args.
36247set dummy $tool_basename; ac_word=$2
36248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36249$as_echo_n "checking for $ac_word... " >&6; }
36250if ${ac_cv_path_AS+:} false; then :
36251  $as_echo_n "(cached) " >&6
36252else
36253  case $AS in
36254  [\\/]* | ?:[\\/]*)
36255  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36256  ;;
36257  *)
36258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36259for as_dir in $PATH
36260do
36261  IFS=$as_save_IFS
36262  test -z "$as_dir" && as_dir=.
36263    for ac_exec_ext in '' $ac_executable_extensions; do
36264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36265    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36267    break 2
36268  fi
36269done
36270  done
36271IFS=$as_save_IFS
36272
36273  ;;
36274esac
36275fi
36276AS=$ac_cv_path_AS
36277if test -n "$AS"; then
36278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36279$as_echo "$AS" >&6; }
36280else
36281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36282$as_echo "no" >&6; }
36283fi
36284
36285
36286          if test "x$AS" = x; then
36287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36288          fi
36289        else
36290          # Otherwise we believe it is a complete path. Use it as it is.
36291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36292$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36294$as_echo_n "checking for AS... " >&6; }
36295          if test ! -x "$tool_specified"; then
36296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36297$as_echo "not found" >&6; }
36298            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36299          fi
36300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36301$as_echo "$tool_specified" >&6; }
36302        fi
36303      fi
36304    fi
36305
36306  fi
36307
36308
36309
36310  # Only process if variable expands to non-empty
36311
36312  if test "x$AS" != x; then
36313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36314
36315  # First separate the path from the arguments. This will split at the first
36316  # space.
36317  complete="$AS"
36318  path="${complete%% *}"
36319  tmp="$complete EOL"
36320  arguments="${tmp#* }"
36321
36322  # Input might be given as Windows format, start by converting to
36323  # unix format.
36324  new_path=`$CYGPATH -u "$path"`
36325
36326  # Now try to locate executable using which
36327  new_path=`$WHICH "$new_path" 2> /dev/null`
36328  # bat and cmd files are not always considered executable in cygwin causing which
36329  # to not find them
36330  if test "x$new_path" = x \
36331      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36332      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36333    new_path=`$CYGPATH -u "$path"`
36334  fi
36335  if test "x$new_path" = x; then
36336    # Oops. Which didn't find the executable.
36337    # The splitting of arguments from the executable at a space might have been incorrect,
36338    # since paths with space are more likely in Windows. Give it another try with the whole
36339    # argument.
36340    path="$complete"
36341    arguments="EOL"
36342    new_path=`$CYGPATH -u "$path"`
36343    new_path=`$WHICH "$new_path" 2> /dev/null`
36344    # bat and cmd files are not always considered executable in cygwin causing which
36345    # to not find them
36346    if test "x$new_path" = x \
36347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36349      new_path=`$CYGPATH -u "$path"`
36350    fi
36351    if test "x$new_path" = x; then
36352      # It's still not found. Now this is an unrecoverable error.
36353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36354$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36355      has_space=`$ECHO "$complete" | $GREP " "`
36356      if test "x$has_space" != x; then
36357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36359      fi
36360      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36361    fi
36362  fi
36363
36364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36367  # "foo.exe" is OK but "foo" is an error.
36368  #
36369  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36370  # It is also a way to make sure we got the proper file name for the real test later on.
36371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36372  if test "x$test_shortpath" = x; then
36373    # Short path failed, file does not exist as specified.
36374    # Try adding .exe or .cmd
36375    if test -f "${new_path}.exe"; then
36376      input_to_shortpath="${new_path}.exe"
36377    elif test -f "${new_path}.cmd"; then
36378      input_to_shortpath="${new_path}.cmd"
36379    else
36380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36381$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36384      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36385    fi
36386  else
36387    input_to_shortpath="$new_path"
36388  fi
36389
36390  # Call helper function which possibly converts this using DOS-style short mode.
36391  # If so, the updated path is stored in $new_path.
36392  new_path="$input_to_shortpath"
36393
36394  input_path="$input_to_shortpath"
36395  # Check if we need to convert this using DOS-style short mode. If the path
36396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36397  # take no chances and rewrite it.
36398  # Note: m4 eats our [], so we need to use [ and ] instead.
36399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36400  if test "x$has_forbidden_chars" != x; then
36401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36405      # Going to short mode and back again did indeed matter. Since short mode is
36406      # case insensitive, let's make it lowercase to improve readability.
36407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36408      # Now convert it back to Unix-style (cygpath)
36409      input_path=`$CYGPATH -u "$shortmode_path"`
36410      new_path="$input_path"
36411    fi
36412  fi
36413
36414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36415  if test "x$test_cygdrive_prefix" = x; then
36416    # As a simple fix, exclude /usr/bin since it's not a real path.
36417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36419      # a path prefixed by /cygdrive for fixpath to work.
36420      new_path="$CYGWIN_ROOT_PATH$input_path"
36421    fi
36422  fi
36423
36424  # remove trailing .exe if any
36425  new_path="${new_path/%.exe/}"
36426
36427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36428
36429  # First separate the path from the arguments. This will split at the first
36430  # space.
36431  complete="$AS"
36432  path="${complete%% *}"
36433  tmp="$complete EOL"
36434  arguments="${tmp#* }"
36435
36436  # Input might be given as Windows format, start by converting to
36437  # unix format.
36438  new_path="$path"
36439
36440  windows_path="$new_path"
36441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36442    unix_path=`$CYGPATH -u "$windows_path"`
36443    new_path="$unix_path"
36444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36446    new_path="$unix_path"
36447  fi
36448
36449
36450  # Now try to locate executable using which
36451  new_path=`$WHICH "$new_path" 2> /dev/null`
36452
36453  if test "x$new_path" = x; then
36454    # Oops. Which didn't find the executable.
36455    # The splitting of arguments from the executable at a space might have been incorrect,
36456    # since paths with space are more likely in Windows. Give it another try with the whole
36457    # argument.
36458    path="$complete"
36459    arguments="EOL"
36460    new_path="$path"
36461
36462  windows_path="$new_path"
36463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36464    unix_path=`$CYGPATH -u "$windows_path"`
36465    new_path="$unix_path"
36466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36468    new_path="$unix_path"
36469  fi
36470
36471
36472    new_path=`$WHICH "$new_path" 2> /dev/null`
36473    # bat and cmd files are not always considered executable in MSYS causing which
36474    # to not find them
36475    if test "x$new_path" = x \
36476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36478      new_path="$path"
36479
36480  windows_path="$new_path"
36481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36482    unix_path=`$CYGPATH -u "$windows_path"`
36483    new_path="$unix_path"
36484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36486    new_path="$unix_path"
36487  fi
36488
36489    fi
36490
36491    if test "x$new_path" = x; then
36492      # It's still not found. Now this is an unrecoverable error.
36493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36494$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36495      has_space=`$ECHO "$complete" | $GREP " "`
36496      if test "x$has_space" != x; then
36497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36499      fi
36500      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36501    fi
36502  fi
36503
36504  # Now new_path has a complete unix path to the binary
36505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36506    # Keep paths in /bin as-is, but remove trailing .exe if any
36507    new_path="${new_path/%.exe/}"
36508    # Do not save /bin paths to all_fixpath_prefixes!
36509  else
36510    # Not in mixed or Windows style, start by that.
36511    new_path=`cmd //c echo $new_path`
36512
36513  input_path="$new_path"
36514  # Check if we need to convert this using DOS-style short mode. If the path
36515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36516  # take no chances and rewrite it.
36517  # Note: m4 eats our [], so we need to use [ and ] instead.
36518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36519  if test "x$has_forbidden_chars" != x; then
36520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36522  fi
36523
36524    # Output is in $new_path
36525
36526  windows_path="$new_path"
36527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36528    unix_path=`$CYGPATH -u "$windows_path"`
36529    new_path="$unix_path"
36530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36532    new_path="$unix_path"
36533  fi
36534
36535    # remove trailing .exe if any
36536    new_path="${new_path/%.exe/}"
36537
36538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36540  fi
36541
36542    else
36543      # We're on a unix platform. Hooray! :)
36544      # First separate the path from the arguments. This will split at the first
36545      # space.
36546      complete="$AS"
36547      path="${complete%% *}"
36548      tmp="$complete EOL"
36549      arguments="${tmp#* }"
36550
36551      # Cannot rely on the command "which" here since it doesn't always work.
36552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36553      if test -z "$is_absolute_path"; then
36554        # Path to executable is not absolute. Find it.
36555        IFS_save="$IFS"
36556        IFS=:
36557        for p in $PATH; do
36558          if test -f "$p/$path" && test -x "$p/$path"; then
36559            new_path="$p/$path"
36560            break
36561          fi
36562        done
36563        IFS="$IFS_save"
36564      else
36565        # This is an absolute path, we can use it without further modifications.
36566        new_path="$path"
36567      fi
36568
36569      if test "x$new_path" = x; then
36570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36571$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36572        has_space=`$ECHO "$complete" | $GREP " "`
36573        if test "x$has_space" != x; then
36574          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36575$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36576        fi
36577        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36578      fi
36579    fi
36580
36581    # Now join together the path and the arguments once again
36582    if test "x$arguments" != xEOL; then
36583      new_complete="$new_path ${arguments% *}"
36584    else
36585      new_complete="$new_path"
36586    fi
36587
36588    if test "x$complete" != "x$new_complete"; then
36589      AS="$new_complete"
36590      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36591$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36592    fi
36593  fi
36594
36595  else
36596    # FIXME: is this correct for microsoft?
36597    AS="$CC -c"
36598  fi
36599
36600
36601  #
36602  # Setup the archiver (AR)
36603  #
36604  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36605    # The corresponding ar tool is lib.exe (used to create static libraries)
36606    # Extract the first word of "lib", so it can be a program name with args.
36607set dummy lib; ac_word=$2
36608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36609$as_echo_n "checking for $ac_word... " >&6; }
36610if ${ac_cv_prog_AR+:} false; then :
36611  $as_echo_n "(cached) " >&6
36612else
36613  if test -n "$AR"; then
36614  ac_cv_prog_AR="$AR" # Let the user override the test.
36615else
36616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36617for as_dir in $PATH
36618do
36619  IFS=$as_save_IFS
36620  test -z "$as_dir" && as_dir=.
36621    for ac_exec_ext in '' $ac_executable_extensions; do
36622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36623    ac_cv_prog_AR="lib"
36624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36625    break 2
36626  fi
36627done
36628  done
36629IFS=$as_save_IFS
36630
36631fi
36632fi
36633AR=$ac_cv_prog_AR
36634if test -n "$AR"; then
36635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36636$as_echo "$AR" >&6; }
36637else
36638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36639$as_echo "no" >&6; }
36640fi
36641
36642
36643  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36644
36645
36646  # Publish this variable in the help.
36647
36648
36649  if [ -z "${AR+x}" ]; then
36650    # The variable is not set by user, try to locate tool using the code snippet
36651    if test -n "$ac_tool_prefix"; then
36652  for ac_prog in ar gcc-ar
36653  do
36654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36657$as_echo_n "checking for $ac_word... " >&6; }
36658if ${ac_cv_prog_AR+:} false; then :
36659  $as_echo_n "(cached) " >&6
36660else
36661  if test -n "$AR"; then
36662  ac_cv_prog_AR="$AR" # Let the user override the test.
36663else
36664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36665for as_dir in $PATH
36666do
36667  IFS=$as_save_IFS
36668  test -z "$as_dir" && as_dir=.
36669    for ac_exec_ext in '' $ac_executable_extensions; do
36670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36671    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36673    break 2
36674  fi
36675done
36676  done
36677IFS=$as_save_IFS
36678
36679fi
36680fi
36681AR=$ac_cv_prog_AR
36682if test -n "$AR"; then
36683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36684$as_echo "$AR" >&6; }
36685else
36686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36687$as_echo "no" >&6; }
36688fi
36689
36690
36691    test -n "$AR" && break
36692  done
36693fi
36694if test -z "$AR"; then
36695  ac_ct_AR=$AR
36696  for ac_prog in ar gcc-ar
36697do
36698  # Extract the first word of "$ac_prog", so it can be a program name with args.
36699set dummy $ac_prog; ac_word=$2
36700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36701$as_echo_n "checking for $ac_word... " >&6; }
36702if ${ac_cv_prog_ac_ct_AR+:} false; then :
36703  $as_echo_n "(cached) " >&6
36704else
36705  if test -n "$ac_ct_AR"; then
36706  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36707else
36708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36709for as_dir in $PATH
36710do
36711  IFS=$as_save_IFS
36712  test -z "$as_dir" && as_dir=.
36713    for ac_exec_ext in '' $ac_executable_extensions; do
36714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36715    ac_cv_prog_ac_ct_AR="$ac_prog"
36716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36717    break 2
36718  fi
36719done
36720  done
36721IFS=$as_save_IFS
36722
36723fi
36724fi
36725ac_ct_AR=$ac_cv_prog_ac_ct_AR
36726if test -n "$ac_ct_AR"; then
36727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36728$as_echo "$ac_ct_AR" >&6; }
36729else
36730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36731$as_echo "no" >&6; }
36732fi
36733
36734
36735  test -n "$ac_ct_AR" && break
36736done
36737
36738  if test "x$ac_ct_AR" = x; then
36739    AR=""
36740  else
36741    case $cross_compiling:$ac_tool_warned in
36742yes:)
36743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36745ac_tool_warned=yes ;;
36746esac
36747    AR=$ac_ct_AR
36748  fi
36749fi
36750
36751  else
36752    # The variable is set, but is it from the command line or the environment?
36753
36754    # Try to remove the string !AR! from our list.
36755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36757      # If it failed, the variable was not from the command line. Ignore it,
36758      # but warn the user (except for BASH, which is always set by the calling BASH).
36759      if test "xAR" != xBASH; then
36760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36761$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36762      fi
36763      # Try to locate tool using the code snippet
36764      if test -n "$ac_tool_prefix"; then
36765  for ac_prog in ar gcc-ar
36766  do
36767    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36770$as_echo_n "checking for $ac_word... " >&6; }
36771if ${ac_cv_prog_AR+:} false; then :
36772  $as_echo_n "(cached) " >&6
36773else
36774  if test -n "$AR"; then
36775  ac_cv_prog_AR="$AR" # Let the user override the test.
36776else
36777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36778for as_dir in $PATH
36779do
36780  IFS=$as_save_IFS
36781  test -z "$as_dir" && as_dir=.
36782    for ac_exec_ext in '' $ac_executable_extensions; do
36783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36784    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36786    break 2
36787  fi
36788done
36789  done
36790IFS=$as_save_IFS
36791
36792fi
36793fi
36794AR=$ac_cv_prog_AR
36795if test -n "$AR"; then
36796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36797$as_echo "$AR" >&6; }
36798else
36799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36800$as_echo "no" >&6; }
36801fi
36802
36803
36804    test -n "$AR" && break
36805  done
36806fi
36807if test -z "$AR"; then
36808  ac_ct_AR=$AR
36809  for ac_prog in ar gcc-ar
36810do
36811  # Extract the first word of "$ac_prog", so it can be a program name with args.
36812set dummy $ac_prog; ac_word=$2
36813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36814$as_echo_n "checking for $ac_word... " >&6; }
36815if ${ac_cv_prog_ac_ct_AR+:} false; then :
36816  $as_echo_n "(cached) " >&6
36817else
36818  if test -n "$ac_ct_AR"; then
36819  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36820else
36821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36822for as_dir in $PATH
36823do
36824  IFS=$as_save_IFS
36825  test -z "$as_dir" && as_dir=.
36826    for ac_exec_ext in '' $ac_executable_extensions; do
36827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36828    ac_cv_prog_ac_ct_AR="$ac_prog"
36829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36830    break 2
36831  fi
36832done
36833  done
36834IFS=$as_save_IFS
36835
36836fi
36837fi
36838ac_ct_AR=$ac_cv_prog_ac_ct_AR
36839if test -n "$ac_ct_AR"; then
36840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36841$as_echo "$ac_ct_AR" >&6; }
36842else
36843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36844$as_echo "no" >&6; }
36845fi
36846
36847
36848  test -n "$ac_ct_AR" && break
36849done
36850
36851  if test "x$ac_ct_AR" = x; then
36852    AR=""
36853  else
36854    case $cross_compiling:$ac_tool_warned in
36855yes:)
36856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36858ac_tool_warned=yes ;;
36859esac
36860    AR=$ac_ct_AR
36861  fi
36862fi
36863
36864    else
36865      # If it succeeded, then it was overridden by the user. We will use it
36866      # for the tool.
36867
36868      # First remove it from the list of overridden variables, so we can test
36869      # for unknown variables in the end.
36870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36871
36872      # Check if we try to supply an empty value
36873      if test "x$AR" = x; then
36874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36875$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36877$as_echo_n "checking for AR... " >&6; }
36878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36879$as_echo "disabled" >&6; }
36880      else
36881        # Check if the provided tool contains a complete path.
36882        tool_specified="$AR"
36883        tool_basename="${tool_specified##*/}"
36884        if test "x$tool_basename" = "x$tool_specified"; then
36885          # A command without a complete path is provided, search $PATH.
36886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36887$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36888          # Extract the first word of "$tool_basename", so it can be a program name with args.
36889set dummy $tool_basename; ac_word=$2
36890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36891$as_echo_n "checking for $ac_word... " >&6; }
36892if ${ac_cv_path_AR+:} false; then :
36893  $as_echo_n "(cached) " >&6
36894else
36895  case $AR in
36896  [\\/]* | ?:[\\/]*)
36897  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36898  ;;
36899  *)
36900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36901for as_dir in $PATH
36902do
36903  IFS=$as_save_IFS
36904  test -z "$as_dir" && as_dir=.
36905    for ac_exec_ext in '' $ac_executable_extensions; do
36906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36907    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36909    break 2
36910  fi
36911done
36912  done
36913IFS=$as_save_IFS
36914
36915  ;;
36916esac
36917fi
36918AR=$ac_cv_path_AR
36919if test -n "$AR"; then
36920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36921$as_echo "$AR" >&6; }
36922else
36923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36924$as_echo "no" >&6; }
36925fi
36926
36927
36928          if test "x$AR" = x; then
36929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36930          fi
36931        else
36932          # Otherwise we believe it is a complete path. Use it as it is.
36933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36934$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36936$as_echo_n "checking for AR... " >&6; }
36937          if test ! -x "$tool_specified"; then
36938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36939$as_echo "not found" >&6; }
36940            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36941          fi
36942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36943$as_echo "$tool_specified" >&6; }
36944        fi
36945      fi
36946    fi
36947
36948  fi
36949
36950
36951  else
36952
36953
36954  # Publish this variable in the help.
36955
36956
36957  if [ -z "${AR+x}" ]; then
36958    # The variable is not set by user, try to locate tool using the code snippet
36959    if test -n "$ac_tool_prefix"; then
36960  for ac_prog in ar
36961  do
36962    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36963set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36965$as_echo_n "checking for $ac_word... " >&6; }
36966if ${ac_cv_prog_AR+:} false; then :
36967  $as_echo_n "(cached) " >&6
36968else
36969  if test -n "$AR"; then
36970  ac_cv_prog_AR="$AR" # Let the user override the test.
36971else
36972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36973for as_dir in $PATH
36974do
36975  IFS=$as_save_IFS
36976  test -z "$as_dir" && as_dir=.
36977    for ac_exec_ext in '' $ac_executable_extensions; do
36978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36979    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36981    break 2
36982  fi
36983done
36984  done
36985IFS=$as_save_IFS
36986
36987fi
36988fi
36989AR=$ac_cv_prog_AR
36990if test -n "$AR"; then
36991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36992$as_echo "$AR" >&6; }
36993else
36994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36995$as_echo "no" >&6; }
36996fi
36997
36998
36999    test -n "$AR" && break
37000  done
37001fi
37002if test -z "$AR"; then
37003  ac_ct_AR=$AR
37004  for ac_prog in ar
37005do
37006  # Extract the first word of "$ac_prog", so it can be a program name with args.
37007set dummy $ac_prog; ac_word=$2
37008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37009$as_echo_n "checking for $ac_word... " >&6; }
37010if ${ac_cv_prog_ac_ct_AR+:} false; then :
37011  $as_echo_n "(cached) " >&6
37012else
37013  if test -n "$ac_ct_AR"; then
37014  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37015else
37016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37017for as_dir in $PATH
37018do
37019  IFS=$as_save_IFS
37020  test -z "$as_dir" && as_dir=.
37021    for ac_exec_ext in '' $ac_executable_extensions; do
37022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37023    ac_cv_prog_ac_ct_AR="$ac_prog"
37024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37025    break 2
37026  fi
37027done
37028  done
37029IFS=$as_save_IFS
37030
37031fi
37032fi
37033ac_ct_AR=$ac_cv_prog_ac_ct_AR
37034if test -n "$ac_ct_AR"; then
37035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37036$as_echo "$ac_ct_AR" >&6; }
37037else
37038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37039$as_echo "no" >&6; }
37040fi
37041
37042
37043  test -n "$ac_ct_AR" && break
37044done
37045
37046  if test "x$ac_ct_AR" = x; then
37047    AR=""
37048  else
37049    case $cross_compiling:$ac_tool_warned in
37050yes:)
37051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37053ac_tool_warned=yes ;;
37054esac
37055    AR=$ac_ct_AR
37056  fi
37057fi
37058
37059  else
37060    # The variable is set, but is it from the command line or the environment?
37061
37062    # Try to remove the string !AR! from our list.
37063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37065      # If it failed, the variable was not from the command line. Ignore it,
37066      # but warn the user (except for BASH, which is always set by the calling BASH).
37067      if test "xAR" != xBASH; then
37068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37069$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37070      fi
37071      # Try to locate tool using the code snippet
37072      if test -n "$ac_tool_prefix"; then
37073  for ac_prog in ar
37074  do
37075    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37078$as_echo_n "checking for $ac_word... " >&6; }
37079if ${ac_cv_prog_AR+:} false; then :
37080  $as_echo_n "(cached) " >&6
37081else
37082  if test -n "$AR"; then
37083  ac_cv_prog_AR="$AR" # Let the user override the test.
37084else
37085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37086for as_dir in $PATH
37087do
37088  IFS=$as_save_IFS
37089  test -z "$as_dir" && as_dir=.
37090    for ac_exec_ext in '' $ac_executable_extensions; do
37091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37092    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37094    break 2
37095  fi
37096done
37097  done
37098IFS=$as_save_IFS
37099
37100fi
37101fi
37102AR=$ac_cv_prog_AR
37103if test -n "$AR"; then
37104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37105$as_echo "$AR" >&6; }
37106else
37107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37108$as_echo "no" >&6; }
37109fi
37110
37111
37112    test -n "$AR" && break
37113  done
37114fi
37115if test -z "$AR"; then
37116  ac_ct_AR=$AR
37117  for ac_prog in ar
37118do
37119  # Extract the first word of "$ac_prog", so it can be a program name with args.
37120set dummy $ac_prog; ac_word=$2
37121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37122$as_echo_n "checking for $ac_word... " >&6; }
37123if ${ac_cv_prog_ac_ct_AR+:} false; then :
37124  $as_echo_n "(cached) " >&6
37125else
37126  if test -n "$ac_ct_AR"; then
37127  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37128else
37129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37130for as_dir in $PATH
37131do
37132  IFS=$as_save_IFS
37133  test -z "$as_dir" && as_dir=.
37134    for ac_exec_ext in '' $ac_executable_extensions; do
37135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37136    ac_cv_prog_ac_ct_AR="$ac_prog"
37137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37138    break 2
37139  fi
37140done
37141  done
37142IFS=$as_save_IFS
37143
37144fi
37145fi
37146ac_ct_AR=$ac_cv_prog_ac_ct_AR
37147if test -n "$ac_ct_AR"; then
37148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37149$as_echo "$ac_ct_AR" >&6; }
37150else
37151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37152$as_echo "no" >&6; }
37153fi
37154
37155
37156  test -n "$ac_ct_AR" && break
37157done
37158
37159  if test "x$ac_ct_AR" = x; then
37160    AR=""
37161  else
37162    case $cross_compiling:$ac_tool_warned in
37163yes:)
37164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37166ac_tool_warned=yes ;;
37167esac
37168    AR=$ac_ct_AR
37169  fi
37170fi
37171
37172    else
37173      # If it succeeded, then it was overridden by the user. We will use it
37174      # for the tool.
37175
37176      # First remove it from the list of overridden variables, so we can test
37177      # for unknown variables in the end.
37178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37179
37180      # Check if we try to supply an empty value
37181      if test "x$AR" = x; then
37182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37183$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37185$as_echo_n "checking for AR... " >&6; }
37186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37187$as_echo "disabled" >&6; }
37188      else
37189        # Check if the provided tool contains a complete path.
37190        tool_specified="$AR"
37191        tool_basename="${tool_specified##*/}"
37192        if test "x$tool_basename" = "x$tool_specified"; then
37193          # A command without a complete path is provided, search $PATH.
37194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37195$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37196          # Extract the first word of "$tool_basename", so it can be a program name with args.
37197set dummy $tool_basename; ac_word=$2
37198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37199$as_echo_n "checking for $ac_word... " >&6; }
37200if ${ac_cv_path_AR+:} false; then :
37201  $as_echo_n "(cached) " >&6
37202else
37203  case $AR in
37204  [\\/]* | ?:[\\/]*)
37205  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37206  ;;
37207  *)
37208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37209for as_dir in $PATH
37210do
37211  IFS=$as_save_IFS
37212  test -z "$as_dir" && as_dir=.
37213    for ac_exec_ext in '' $ac_executable_extensions; do
37214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37215    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37217    break 2
37218  fi
37219done
37220  done
37221IFS=$as_save_IFS
37222
37223  ;;
37224esac
37225fi
37226AR=$ac_cv_path_AR
37227if test -n "$AR"; then
37228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37229$as_echo "$AR" >&6; }
37230else
37231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37232$as_echo "no" >&6; }
37233fi
37234
37235
37236          if test "x$AR" = x; then
37237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37238          fi
37239        else
37240          # Otherwise we believe it is a complete path. Use it as it is.
37241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37242$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37244$as_echo_n "checking for AR... " >&6; }
37245          if test ! -x "$tool_specified"; then
37246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37247$as_echo "not found" >&6; }
37248            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37249          fi
37250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37251$as_echo "$tool_specified" >&6; }
37252        fi
37253      fi
37254    fi
37255
37256  fi
37257
37258
37259  fi
37260
37261  # Only process if variable expands to non-empty
37262
37263  if test "x$AR" != x; then
37264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37265
37266  # First separate the path from the arguments. This will split at the first
37267  # space.
37268  complete="$AR"
37269  path="${complete%% *}"
37270  tmp="$complete EOL"
37271  arguments="${tmp#* }"
37272
37273  # Input might be given as Windows format, start by converting to
37274  # unix format.
37275  new_path=`$CYGPATH -u "$path"`
37276
37277  # Now try to locate executable using which
37278  new_path=`$WHICH "$new_path" 2> /dev/null`
37279  # bat and cmd files are not always considered executable in cygwin causing which
37280  # to not find them
37281  if test "x$new_path" = x \
37282      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37283      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37284    new_path=`$CYGPATH -u "$path"`
37285  fi
37286  if test "x$new_path" = x; then
37287    # Oops. Which didn't find the executable.
37288    # The splitting of arguments from the executable at a space might have been incorrect,
37289    # since paths with space are more likely in Windows. Give it another try with the whole
37290    # argument.
37291    path="$complete"
37292    arguments="EOL"
37293    new_path=`$CYGPATH -u "$path"`
37294    new_path=`$WHICH "$new_path" 2> /dev/null`
37295    # bat and cmd files are not always considered executable in cygwin causing which
37296    # to not find them
37297    if test "x$new_path" = x \
37298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37300      new_path=`$CYGPATH -u "$path"`
37301    fi
37302    if test "x$new_path" = x; then
37303      # It's still not found. Now this is an unrecoverable error.
37304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37305$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37306      has_space=`$ECHO "$complete" | $GREP " "`
37307      if test "x$has_space" != x; then
37308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37310      fi
37311      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37312    fi
37313  fi
37314
37315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37318  # "foo.exe" is OK but "foo" is an error.
37319  #
37320  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37321  # It is also a way to make sure we got the proper file name for the real test later on.
37322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37323  if test "x$test_shortpath" = x; then
37324    # Short path failed, file does not exist as specified.
37325    # Try adding .exe or .cmd
37326    if test -f "${new_path}.exe"; then
37327      input_to_shortpath="${new_path}.exe"
37328    elif test -f "${new_path}.cmd"; then
37329      input_to_shortpath="${new_path}.cmd"
37330    else
37331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37332$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37333      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37334$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37335      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37336    fi
37337  else
37338    input_to_shortpath="$new_path"
37339  fi
37340
37341  # Call helper function which possibly converts this using DOS-style short mode.
37342  # If so, the updated path is stored in $new_path.
37343  new_path="$input_to_shortpath"
37344
37345  input_path="$input_to_shortpath"
37346  # Check if we need to convert this using DOS-style short mode. If the path
37347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37348  # take no chances and rewrite it.
37349  # Note: m4 eats our [], so we need to use [ and ] instead.
37350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37351  if test "x$has_forbidden_chars" != x; then
37352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37356      # Going to short mode and back again did indeed matter. Since short mode is
37357      # case insensitive, let's make it lowercase to improve readability.
37358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37359      # Now convert it back to Unix-style (cygpath)
37360      input_path=`$CYGPATH -u "$shortmode_path"`
37361      new_path="$input_path"
37362    fi
37363  fi
37364
37365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37366  if test "x$test_cygdrive_prefix" = x; then
37367    # As a simple fix, exclude /usr/bin since it's not a real path.
37368    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37370      # a path prefixed by /cygdrive for fixpath to work.
37371      new_path="$CYGWIN_ROOT_PATH$input_path"
37372    fi
37373  fi
37374
37375  # remove trailing .exe if any
37376  new_path="${new_path/%.exe/}"
37377
37378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37379
37380  # First separate the path from the arguments. This will split at the first
37381  # space.
37382  complete="$AR"
37383  path="${complete%% *}"
37384  tmp="$complete EOL"
37385  arguments="${tmp#* }"
37386
37387  # Input might be given as Windows format, start by converting to
37388  # unix format.
37389  new_path="$path"
37390
37391  windows_path="$new_path"
37392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37393    unix_path=`$CYGPATH -u "$windows_path"`
37394    new_path="$unix_path"
37395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37397    new_path="$unix_path"
37398  fi
37399
37400
37401  # Now try to locate executable using which
37402  new_path=`$WHICH "$new_path" 2> /dev/null`
37403
37404  if test "x$new_path" = x; then
37405    # Oops. Which didn't find the executable.
37406    # The splitting of arguments from the executable at a space might have been incorrect,
37407    # since paths with space are more likely in Windows. Give it another try with the whole
37408    # argument.
37409    path="$complete"
37410    arguments="EOL"
37411    new_path="$path"
37412
37413  windows_path="$new_path"
37414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37415    unix_path=`$CYGPATH -u "$windows_path"`
37416    new_path="$unix_path"
37417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37419    new_path="$unix_path"
37420  fi
37421
37422
37423    new_path=`$WHICH "$new_path" 2> /dev/null`
37424    # bat and cmd files are not always considered executable in MSYS causing which
37425    # to not find them
37426    if test "x$new_path" = x \
37427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37429      new_path="$path"
37430
37431  windows_path="$new_path"
37432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37433    unix_path=`$CYGPATH -u "$windows_path"`
37434    new_path="$unix_path"
37435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37437    new_path="$unix_path"
37438  fi
37439
37440    fi
37441
37442    if test "x$new_path" = x; then
37443      # It's still not found. Now this is an unrecoverable error.
37444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37445$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37446      has_space=`$ECHO "$complete" | $GREP " "`
37447      if test "x$has_space" != x; then
37448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37450      fi
37451      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37452    fi
37453  fi
37454
37455  # Now new_path has a complete unix path to the binary
37456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37457    # Keep paths in /bin as-is, but remove trailing .exe if any
37458    new_path="${new_path/%.exe/}"
37459    # Do not save /bin paths to all_fixpath_prefixes!
37460  else
37461    # Not in mixed or Windows style, start by that.
37462    new_path=`cmd //c echo $new_path`
37463
37464  input_path="$new_path"
37465  # Check if we need to convert this using DOS-style short mode. If the path
37466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37467  # take no chances and rewrite it.
37468  # Note: m4 eats our [], so we need to use [ and ] instead.
37469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37470  if test "x$has_forbidden_chars" != x; then
37471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37473  fi
37474
37475    # Output is in $new_path
37476
37477  windows_path="$new_path"
37478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37479    unix_path=`$CYGPATH -u "$windows_path"`
37480    new_path="$unix_path"
37481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37483    new_path="$unix_path"
37484  fi
37485
37486    # remove trailing .exe if any
37487    new_path="${new_path/%.exe/}"
37488
37489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37491  fi
37492
37493    else
37494      # We're on a unix platform. Hooray! :)
37495      # First separate the path from the arguments. This will split at the first
37496      # space.
37497      complete="$AR"
37498      path="${complete%% *}"
37499      tmp="$complete EOL"
37500      arguments="${tmp#* }"
37501
37502      # Cannot rely on the command "which" here since it doesn't always work.
37503      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37504      if test -z "$is_absolute_path"; then
37505        # Path to executable is not absolute. Find it.
37506        IFS_save="$IFS"
37507        IFS=:
37508        for p in $PATH; do
37509          if test -f "$p/$path" && test -x "$p/$path"; then
37510            new_path="$p/$path"
37511            break
37512          fi
37513        done
37514        IFS="$IFS_save"
37515      else
37516        # This is an absolute path, we can use it without further modifications.
37517        new_path="$path"
37518      fi
37519
37520      if test "x$new_path" = x; then
37521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37522$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37523        has_space=`$ECHO "$complete" | $GREP " "`
37524        if test "x$has_space" != x; then
37525          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37527        fi
37528        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37529      fi
37530    fi
37531
37532    # Now join together the path and the arguments once again
37533    if test "x$arguments" != xEOL; then
37534      new_complete="$new_path ${arguments% *}"
37535    else
37536      new_complete="$new_path"
37537    fi
37538
37539    if test "x$complete" != "x$new_complete"; then
37540      AR="$new_complete"
37541      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37542$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37543    fi
37544  fi
37545
37546
37547
37548  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37549
37550
37551  # Publish this variable in the help.
37552
37553
37554  if [ -z "${LIPO+x}" ]; then
37555    # The variable is not set by user, try to locate tool using the code snippet
37556    for ac_prog in lipo
37557do
37558  # Extract the first word of "$ac_prog", so it can be a program name with args.
37559set dummy $ac_prog; ac_word=$2
37560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37561$as_echo_n "checking for $ac_word... " >&6; }
37562if ${ac_cv_path_LIPO+:} false; then :
37563  $as_echo_n "(cached) " >&6
37564else
37565  case $LIPO in
37566  [\\/]* | ?:[\\/]*)
37567  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37568  ;;
37569  *)
37570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37571for as_dir in $PATH
37572do
37573  IFS=$as_save_IFS
37574  test -z "$as_dir" && as_dir=.
37575    for ac_exec_ext in '' $ac_executable_extensions; do
37576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37577    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37579    break 2
37580  fi
37581done
37582  done
37583IFS=$as_save_IFS
37584
37585  ;;
37586esac
37587fi
37588LIPO=$ac_cv_path_LIPO
37589if test -n "$LIPO"; then
37590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37591$as_echo "$LIPO" >&6; }
37592else
37593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37594$as_echo "no" >&6; }
37595fi
37596
37597
37598  test -n "$LIPO" && break
37599done
37600
37601  else
37602    # The variable is set, but is it from the command line or the environment?
37603
37604    # Try to remove the string !LIPO! from our list.
37605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37607      # If it failed, the variable was not from the command line. Ignore it,
37608      # but warn the user (except for BASH, which is always set by the calling BASH).
37609      if test "xLIPO" != xBASH; then
37610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37611$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37612      fi
37613      # Try to locate tool using the code snippet
37614      for ac_prog in lipo
37615do
37616  # Extract the first word of "$ac_prog", so it can be a program name with args.
37617set dummy $ac_prog; ac_word=$2
37618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37619$as_echo_n "checking for $ac_word... " >&6; }
37620if ${ac_cv_path_LIPO+:} false; then :
37621  $as_echo_n "(cached) " >&6
37622else
37623  case $LIPO in
37624  [\\/]* | ?:[\\/]*)
37625  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37626  ;;
37627  *)
37628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37629for as_dir in $PATH
37630do
37631  IFS=$as_save_IFS
37632  test -z "$as_dir" && as_dir=.
37633    for ac_exec_ext in '' $ac_executable_extensions; do
37634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37635    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37637    break 2
37638  fi
37639done
37640  done
37641IFS=$as_save_IFS
37642
37643  ;;
37644esac
37645fi
37646LIPO=$ac_cv_path_LIPO
37647if test -n "$LIPO"; then
37648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37649$as_echo "$LIPO" >&6; }
37650else
37651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37652$as_echo "no" >&6; }
37653fi
37654
37655
37656  test -n "$LIPO" && break
37657done
37658
37659    else
37660      # If it succeeded, then it was overridden by the user. We will use it
37661      # for the tool.
37662
37663      # First remove it from the list of overridden variables, so we can test
37664      # for unknown variables in the end.
37665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37666
37667      # Check if we try to supply an empty value
37668      if test "x$LIPO" = x; then
37669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37670$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37672$as_echo_n "checking for LIPO... " >&6; }
37673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37674$as_echo "disabled" >&6; }
37675      else
37676        # Check if the provided tool contains a complete path.
37677        tool_specified="$LIPO"
37678        tool_basename="${tool_specified##*/}"
37679        if test "x$tool_basename" = "x$tool_specified"; then
37680          # A command without a complete path is provided, search $PATH.
37681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37682$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37683          # Extract the first word of "$tool_basename", so it can be a program name with args.
37684set dummy $tool_basename; ac_word=$2
37685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37686$as_echo_n "checking for $ac_word... " >&6; }
37687if ${ac_cv_path_LIPO+:} false; then :
37688  $as_echo_n "(cached) " >&6
37689else
37690  case $LIPO in
37691  [\\/]* | ?:[\\/]*)
37692  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37693  ;;
37694  *)
37695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37696for as_dir in $PATH
37697do
37698  IFS=$as_save_IFS
37699  test -z "$as_dir" && as_dir=.
37700    for ac_exec_ext in '' $ac_executable_extensions; do
37701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37702    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37704    break 2
37705  fi
37706done
37707  done
37708IFS=$as_save_IFS
37709
37710  ;;
37711esac
37712fi
37713LIPO=$ac_cv_path_LIPO
37714if test -n "$LIPO"; then
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37716$as_echo "$LIPO" >&6; }
37717else
37718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37719$as_echo "no" >&6; }
37720fi
37721
37722
37723          if test "x$LIPO" = x; then
37724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37725          fi
37726        else
37727          # Otherwise we believe it is a complete path. Use it as it is.
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37729$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37731$as_echo_n "checking for LIPO... " >&6; }
37732          if test ! -x "$tool_specified"; then
37733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37734$as_echo "not found" >&6; }
37735            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37736          fi
37737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37738$as_echo "$tool_specified" >&6; }
37739        fi
37740      fi
37741    fi
37742
37743  fi
37744
37745
37746
37747  # Only process if variable expands to non-empty
37748
37749  if test "x$LIPO" != x; then
37750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37751
37752  # First separate the path from the arguments. This will split at the first
37753  # space.
37754  complete="$LIPO"
37755  path="${complete%% *}"
37756  tmp="$complete EOL"
37757  arguments="${tmp#* }"
37758
37759  # Input might be given as Windows format, start by converting to
37760  # unix format.
37761  new_path=`$CYGPATH -u "$path"`
37762
37763  # Now try to locate executable using which
37764  new_path=`$WHICH "$new_path" 2> /dev/null`
37765  # bat and cmd files are not always considered executable in cygwin causing which
37766  # to not find them
37767  if test "x$new_path" = x \
37768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37770    new_path=`$CYGPATH -u "$path"`
37771  fi
37772  if test "x$new_path" = x; then
37773    # Oops. Which didn't find the executable.
37774    # The splitting of arguments from the executable at a space might have been incorrect,
37775    # since paths with space are more likely in Windows. Give it another try with the whole
37776    # argument.
37777    path="$complete"
37778    arguments="EOL"
37779    new_path=`$CYGPATH -u "$path"`
37780    new_path=`$WHICH "$new_path" 2> /dev/null`
37781    # bat and cmd files are not always considered executable in cygwin causing which
37782    # to not find them
37783    if test "x$new_path" = x \
37784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37786      new_path=`$CYGPATH -u "$path"`
37787    fi
37788    if test "x$new_path" = x; then
37789      # It's still not found. Now this is an unrecoverable error.
37790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37791$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37792      has_space=`$ECHO "$complete" | $GREP " "`
37793      if test "x$has_space" != x; then
37794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37796      fi
37797      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37798    fi
37799  fi
37800
37801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37804  # "foo.exe" is OK but "foo" is an error.
37805  #
37806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37807  # It is also a way to make sure we got the proper file name for the real test later on.
37808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37809  if test "x$test_shortpath" = x; then
37810    # Short path failed, file does not exist as specified.
37811    # Try adding .exe or .cmd
37812    if test -f "${new_path}.exe"; then
37813      input_to_shortpath="${new_path}.exe"
37814    elif test -f "${new_path}.cmd"; then
37815      input_to_shortpath="${new_path}.cmd"
37816    else
37817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37818$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37821      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37822    fi
37823  else
37824    input_to_shortpath="$new_path"
37825  fi
37826
37827  # Call helper function which possibly converts this using DOS-style short mode.
37828  # If so, the updated path is stored in $new_path.
37829  new_path="$input_to_shortpath"
37830
37831  input_path="$input_to_shortpath"
37832  # Check if we need to convert this using DOS-style short mode. If the path
37833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37834  # take no chances and rewrite it.
37835  # Note: m4 eats our [], so we need to use [ and ] instead.
37836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37837  if test "x$has_forbidden_chars" != x; then
37838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37842      # Going to short mode and back again did indeed matter. Since short mode is
37843      # case insensitive, let's make it lowercase to improve readability.
37844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37845      # Now convert it back to Unix-style (cygpath)
37846      input_path=`$CYGPATH -u "$shortmode_path"`
37847      new_path="$input_path"
37848    fi
37849  fi
37850
37851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37852  if test "x$test_cygdrive_prefix" = x; then
37853    # As a simple fix, exclude /usr/bin since it's not a real path.
37854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37856      # a path prefixed by /cygdrive for fixpath to work.
37857      new_path="$CYGWIN_ROOT_PATH$input_path"
37858    fi
37859  fi
37860
37861  # remove trailing .exe if any
37862  new_path="${new_path/%.exe/}"
37863
37864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37865
37866  # First separate the path from the arguments. This will split at the first
37867  # space.
37868  complete="$LIPO"
37869  path="${complete%% *}"
37870  tmp="$complete EOL"
37871  arguments="${tmp#* }"
37872
37873  # Input might be given as Windows format, start by converting to
37874  # unix format.
37875  new_path="$path"
37876
37877  windows_path="$new_path"
37878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37879    unix_path=`$CYGPATH -u "$windows_path"`
37880    new_path="$unix_path"
37881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37883    new_path="$unix_path"
37884  fi
37885
37886
37887  # Now try to locate executable using which
37888  new_path=`$WHICH "$new_path" 2> /dev/null`
37889
37890  if test "x$new_path" = x; then
37891    # Oops. Which didn't find the executable.
37892    # The splitting of arguments from the executable at a space might have been incorrect,
37893    # since paths with space are more likely in Windows. Give it another try with the whole
37894    # argument.
37895    path="$complete"
37896    arguments="EOL"
37897    new_path="$path"
37898
37899  windows_path="$new_path"
37900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37901    unix_path=`$CYGPATH -u "$windows_path"`
37902    new_path="$unix_path"
37903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37905    new_path="$unix_path"
37906  fi
37907
37908
37909    new_path=`$WHICH "$new_path" 2> /dev/null`
37910    # bat and cmd files are not always considered executable in MSYS causing which
37911    # to not find them
37912    if test "x$new_path" = x \
37913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37915      new_path="$path"
37916
37917  windows_path="$new_path"
37918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37919    unix_path=`$CYGPATH -u "$windows_path"`
37920    new_path="$unix_path"
37921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37923    new_path="$unix_path"
37924  fi
37925
37926    fi
37927
37928    if test "x$new_path" = x; then
37929      # It's still not found. Now this is an unrecoverable error.
37930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37931$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37932      has_space=`$ECHO "$complete" | $GREP " "`
37933      if test "x$has_space" != x; then
37934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37936      fi
37937      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37938    fi
37939  fi
37940
37941  # Now new_path has a complete unix path to the binary
37942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37943    # Keep paths in /bin as-is, but remove trailing .exe if any
37944    new_path="${new_path/%.exe/}"
37945    # Do not save /bin paths to all_fixpath_prefixes!
37946  else
37947    # Not in mixed or Windows style, start by that.
37948    new_path=`cmd //c echo $new_path`
37949
37950  input_path="$new_path"
37951  # Check if we need to convert this using DOS-style short mode. If the path
37952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37953  # take no chances and rewrite it.
37954  # Note: m4 eats our [], so we need to use [ and ] instead.
37955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37956  if test "x$has_forbidden_chars" != x; then
37957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37959  fi
37960
37961    # Output is in $new_path
37962
37963  windows_path="$new_path"
37964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37965    unix_path=`$CYGPATH -u "$windows_path"`
37966    new_path="$unix_path"
37967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37969    new_path="$unix_path"
37970  fi
37971
37972    # remove trailing .exe if any
37973    new_path="${new_path/%.exe/}"
37974
37975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37977  fi
37978
37979    else
37980      # We're on a unix platform. Hooray! :)
37981      # First separate the path from the arguments. This will split at the first
37982      # space.
37983      complete="$LIPO"
37984      path="${complete%% *}"
37985      tmp="$complete EOL"
37986      arguments="${tmp#* }"
37987
37988      # Cannot rely on the command "which" here since it doesn't always work.
37989      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37990      if test -z "$is_absolute_path"; then
37991        # Path to executable is not absolute. Find it.
37992        IFS_save="$IFS"
37993        IFS=:
37994        for p in $PATH; do
37995          if test -f "$p/$path" && test -x "$p/$path"; then
37996            new_path="$p/$path"
37997            break
37998          fi
37999        done
38000        IFS="$IFS_save"
38001      else
38002        # This is an absolute path, we can use it without further modifications.
38003        new_path="$path"
38004      fi
38005
38006      if test "x$new_path" = x; then
38007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38008$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38009        has_space=`$ECHO "$complete" | $GREP " "`
38010        if test "x$has_space" != x; then
38011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38013        fi
38014        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38015      fi
38016    fi
38017
38018    # Now join together the path and the arguments once again
38019    if test "x$arguments" != xEOL; then
38020      new_complete="$new_path ${arguments% *}"
38021    else
38022      new_complete="$new_path"
38023    fi
38024
38025    if test "x$complete" != "x$new_complete"; then
38026      LIPO="$new_complete"
38027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38028$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38029    fi
38030  fi
38031
38032  fi
38033
38034  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38035    # Extract the first word of "mt", so it can be a program name with args.
38036set dummy mt; ac_word=$2
38037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38038$as_echo_n "checking for $ac_word... " >&6; }
38039if ${ac_cv_prog_MT+:} false; then :
38040  $as_echo_n "(cached) " >&6
38041else
38042  if test -n "$MT"; then
38043  ac_cv_prog_MT="$MT" # Let the user override the test.
38044else
38045  ac_prog_rejected=no
38046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38047for as_dir in $PATH
38048do
38049  IFS=$as_save_IFS
38050  test -z "$as_dir" && as_dir=.
38051    for ac_exec_ext in '' $ac_executable_extensions; do
38052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38053    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38054       ac_prog_rejected=yes
38055       continue
38056     fi
38057    ac_cv_prog_MT="mt"
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
38065if test $ac_prog_rejected = yes; then
38066  # We found a bogon in the path, so make sure we never use it.
38067  set dummy $ac_cv_prog_MT
38068  shift
38069  if test $# != 0; then
38070    # We chose a different compiler from the bogus one.
38071    # However, it has the same basename, so the bogon will be chosen
38072    # first if we set MT to just the basename; use the full file name.
38073    shift
38074    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38075  fi
38076fi
38077fi
38078fi
38079MT=$ac_cv_prog_MT
38080if test -n "$MT"; then
38081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38082$as_echo "$MT" >&6; }
38083else
38084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38085$as_echo "no" >&6; }
38086fi
38087
38088
38089
38090  # Only process if variable expands to non-empty
38091
38092  if test "x$MT" != x; then
38093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38094
38095  # First separate the path from the arguments. This will split at the first
38096  # space.
38097  complete="$MT"
38098  path="${complete%% *}"
38099  tmp="$complete EOL"
38100  arguments="${tmp#* }"
38101
38102  # Input might be given as Windows format, start by converting to
38103  # unix format.
38104  new_path=`$CYGPATH -u "$path"`
38105
38106  # Now try to locate executable using which
38107  new_path=`$WHICH "$new_path" 2> /dev/null`
38108  # bat and cmd files are not always considered executable in cygwin causing which
38109  # to not find them
38110  if test "x$new_path" = x \
38111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38113    new_path=`$CYGPATH -u "$path"`
38114  fi
38115  if test "x$new_path" = x; then
38116    # Oops. Which didn't find the executable.
38117    # The splitting of arguments from the executable at a space might have been incorrect,
38118    # since paths with space are more likely in Windows. Give it another try with the whole
38119    # argument.
38120    path="$complete"
38121    arguments="EOL"
38122    new_path=`$CYGPATH -u "$path"`
38123    new_path=`$WHICH "$new_path" 2> /dev/null`
38124    # bat and cmd files are not always considered executable in cygwin causing which
38125    # to not find them
38126    if test "x$new_path" = x \
38127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38129      new_path=`$CYGPATH -u "$path"`
38130    fi
38131    if test "x$new_path" = x; then
38132      # It's still not found. Now this is an unrecoverable error.
38133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38134$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38135      has_space=`$ECHO "$complete" | $GREP " "`
38136      if test "x$has_space" != x; then
38137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38139      fi
38140      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38141    fi
38142  fi
38143
38144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38147  # "foo.exe" is OK but "foo" is an error.
38148  #
38149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38150  # It is also a way to make sure we got the proper file name for the real test later on.
38151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38152  if test "x$test_shortpath" = x; then
38153    # Short path failed, file does not exist as specified.
38154    # Try adding .exe or .cmd
38155    if test -f "${new_path}.exe"; then
38156      input_to_shortpath="${new_path}.exe"
38157    elif test -f "${new_path}.cmd"; then
38158      input_to_shortpath="${new_path}.cmd"
38159    else
38160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38161$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38164      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38165    fi
38166  else
38167    input_to_shortpath="$new_path"
38168  fi
38169
38170  # Call helper function which possibly converts this using DOS-style short mode.
38171  # If so, the updated path is stored in $new_path.
38172  new_path="$input_to_shortpath"
38173
38174  input_path="$input_to_shortpath"
38175  # Check if we need to convert this using DOS-style short mode. If the path
38176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38177  # take no chances and rewrite it.
38178  # Note: m4 eats our [], so we need to use [ and ] instead.
38179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38180  if test "x$has_forbidden_chars" != x; then
38181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38185      # Going to short mode and back again did indeed matter. Since short mode is
38186      # case insensitive, let's make it lowercase to improve readability.
38187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38188      # Now convert it back to Unix-style (cygpath)
38189      input_path=`$CYGPATH -u "$shortmode_path"`
38190      new_path="$input_path"
38191    fi
38192  fi
38193
38194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38195  if test "x$test_cygdrive_prefix" = x; then
38196    # As a simple fix, exclude /usr/bin since it's not a real path.
38197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38199      # a path prefixed by /cygdrive for fixpath to work.
38200      new_path="$CYGWIN_ROOT_PATH$input_path"
38201    fi
38202  fi
38203
38204  # remove trailing .exe if any
38205  new_path="${new_path/%.exe/}"
38206
38207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38208
38209  # First separate the path from the arguments. This will split at the first
38210  # space.
38211  complete="$MT"
38212  path="${complete%% *}"
38213  tmp="$complete EOL"
38214  arguments="${tmp#* }"
38215
38216  # Input might be given as Windows format, start by converting to
38217  # unix format.
38218  new_path="$path"
38219
38220  windows_path="$new_path"
38221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38222    unix_path=`$CYGPATH -u "$windows_path"`
38223    new_path="$unix_path"
38224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38226    new_path="$unix_path"
38227  fi
38228
38229
38230  # Now try to locate executable using which
38231  new_path=`$WHICH "$new_path" 2> /dev/null`
38232
38233  if test "x$new_path" = x; then
38234    # Oops. Which didn't find the executable.
38235    # The splitting of arguments from the executable at a space might have been incorrect,
38236    # since paths with space are more likely in Windows. Give it another try with the whole
38237    # argument.
38238    path="$complete"
38239    arguments="EOL"
38240    new_path="$path"
38241
38242  windows_path="$new_path"
38243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38244    unix_path=`$CYGPATH -u "$windows_path"`
38245    new_path="$unix_path"
38246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38248    new_path="$unix_path"
38249  fi
38250
38251
38252    new_path=`$WHICH "$new_path" 2> /dev/null`
38253    # bat and cmd files are not always considered executable in MSYS causing which
38254    # to not find them
38255    if test "x$new_path" = x \
38256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38258      new_path="$path"
38259
38260  windows_path="$new_path"
38261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38262    unix_path=`$CYGPATH -u "$windows_path"`
38263    new_path="$unix_path"
38264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38266    new_path="$unix_path"
38267  fi
38268
38269    fi
38270
38271    if test "x$new_path" = x; then
38272      # It's still not found. Now this is an unrecoverable error.
38273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38274$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38275      has_space=`$ECHO "$complete" | $GREP " "`
38276      if test "x$has_space" != x; then
38277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38279      fi
38280      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38281    fi
38282  fi
38283
38284  # Now new_path has a complete unix path to the binary
38285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38286    # Keep paths in /bin as-is, but remove trailing .exe if any
38287    new_path="${new_path/%.exe/}"
38288    # Do not save /bin paths to all_fixpath_prefixes!
38289  else
38290    # Not in mixed or Windows style, start by that.
38291    new_path=`cmd //c echo $new_path`
38292
38293  input_path="$new_path"
38294  # Check if we need to convert this using DOS-style short mode. If the path
38295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38296  # take no chances and rewrite it.
38297  # Note: m4 eats our [], so we need to use [ and ] instead.
38298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38299  if test "x$has_forbidden_chars" != x; then
38300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38302  fi
38303
38304    # Output is in $new_path
38305
38306  windows_path="$new_path"
38307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38308    unix_path=`$CYGPATH -u "$windows_path"`
38309    new_path="$unix_path"
38310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38312    new_path="$unix_path"
38313  fi
38314
38315    # remove trailing .exe if any
38316    new_path="${new_path/%.exe/}"
38317
38318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38320  fi
38321
38322    else
38323      # We're on a unix platform. Hooray! :)
38324      # First separate the path from the arguments. This will split at the first
38325      # space.
38326      complete="$MT"
38327      path="${complete%% *}"
38328      tmp="$complete EOL"
38329      arguments="${tmp#* }"
38330
38331      # Cannot rely on the command "which" here since it doesn't always work.
38332      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38333      if test -z "$is_absolute_path"; then
38334        # Path to executable is not absolute. Find it.
38335        IFS_save="$IFS"
38336        IFS=:
38337        for p in $PATH; do
38338          if test -f "$p/$path" && test -x "$p/$path"; then
38339            new_path="$p/$path"
38340            break
38341          fi
38342        done
38343        IFS="$IFS_save"
38344      else
38345        # This is an absolute path, we can use it without further modifications.
38346        new_path="$path"
38347      fi
38348
38349      if test "x$new_path" = x; then
38350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38351$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38352        has_space=`$ECHO "$complete" | $GREP " "`
38353        if test "x$has_space" != x; then
38354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38356        fi
38357        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38358      fi
38359    fi
38360
38361    # Now join together the path and the arguments once again
38362    if test "x$arguments" != xEOL; then
38363      new_complete="$new_path ${arguments% *}"
38364    else
38365      new_complete="$new_path"
38366    fi
38367
38368    if test "x$complete" != "x$new_complete"; then
38369      MT="$new_complete"
38370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38371$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38372    fi
38373  fi
38374
38375    # Setup the resource compiler (RC)
38376    # Extract the first word of "rc", so it can be a program name with args.
38377set dummy rc; ac_word=$2
38378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38379$as_echo_n "checking for $ac_word... " >&6; }
38380if ${ac_cv_prog_RC+:} false; then :
38381  $as_echo_n "(cached) " >&6
38382else
38383  if test -n "$RC"; then
38384  ac_cv_prog_RC="$RC" # Let the user override the test.
38385else
38386  ac_prog_rejected=no
38387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38388for as_dir in $PATH
38389do
38390  IFS=$as_save_IFS
38391  test -z "$as_dir" && as_dir=.
38392    for ac_exec_ext in '' $ac_executable_extensions; do
38393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38394    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38395       ac_prog_rejected=yes
38396       continue
38397     fi
38398    ac_cv_prog_RC="rc"
38399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38400    break 2
38401  fi
38402done
38403  done
38404IFS=$as_save_IFS
38405
38406if test $ac_prog_rejected = yes; then
38407  # We found a bogon in the path, so make sure we never use it.
38408  set dummy $ac_cv_prog_RC
38409  shift
38410  if test $# != 0; then
38411    # We chose a different compiler from the bogus one.
38412    # However, it has the same basename, so the bogon will be chosen
38413    # first if we set RC to just the basename; use the full file name.
38414    shift
38415    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38416  fi
38417fi
38418fi
38419fi
38420RC=$ac_cv_prog_RC
38421if test -n "$RC"; then
38422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38423$as_echo "$RC" >&6; }
38424else
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38426$as_echo "no" >&6; }
38427fi
38428
38429
38430
38431  # Only process if variable expands to non-empty
38432
38433  if test "x$RC" != x; then
38434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38435
38436  # First separate the path from the arguments. This will split at the first
38437  # space.
38438  complete="$RC"
38439  path="${complete%% *}"
38440  tmp="$complete EOL"
38441  arguments="${tmp#* }"
38442
38443  # Input might be given as Windows format, start by converting to
38444  # unix format.
38445  new_path=`$CYGPATH -u "$path"`
38446
38447  # Now try to locate executable using which
38448  new_path=`$WHICH "$new_path" 2> /dev/null`
38449  # bat and cmd files are not always considered executable in cygwin causing which
38450  # to not find them
38451  if test "x$new_path" = x \
38452      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38453      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38454    new_path=`$CYGPATH -u "$path"`
38455  fi
38456  if test "x$new_path" = x; then
38457    # Oops. Which didn't find the executable.
38458    # The splitting of arguments from the executable at a space might have been incorrect,
38459    # since paths with space are more likely in Windows. Give it another try with the whole
38460    # argument.
38461    path="$complete"
38462    arguments="EOL"
38463    new_path=`$CYGPATH -u "$path"`
38464    new_path=`$WHICH "$new_path" 2> /dev/null`
38465    # bat and cmd files are not always considered executable in cygwin causing which
38466    # to not find them
38467    if test "x$new_path" = x \
38468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38470      new_path=`$CYGPATH -u "$path"`
38471    fi
38472    if test "x$new_path" = x; then
38473      # It's still not found. Now this is an unrecoverable error.
38474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38475$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38476      has_space=`$ECHO "$complete" | $GREP " "`
38477      if test "x$has_space" != x; then
38478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38480      fi
38481      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38482    fi
38483  fi
38484
38485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38488  # "foo.exe" is OK but "foo" is an error.
38489  #
38490  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38491  # It is also a way to make sure we got the proper file name for the real test later on.
38492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38493  if test "x$test_shortpath" = x; then
38494    # Short path failed, file does not exist as specified.
38495    # Try adding .exe or .cmd
38496    if test -f "${new_path}.exe"; then
38497      input_to_shortpath="${new_path}.exe"
38498    elif test -f "${new_path}.cmd"; then
38499      input_to_shortpath="${new_path}.cmd"
38500    else
38501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38502$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38503      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38504$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38505      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38506    fi
38507  else
38508    input_to_shortpath="$new_path"
38509  fi
38510
38511  # Call helper function which possibly converts this using DOS-style short mode.
38512  # If so, the updated path is stored in $new_path.
38513  new_path="$input_to_shortpath"
38514
38515  input_path="$input_to_shortpath"
38516  # Check if we need to convert this using DOS-style short mode. If the path
38517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38518  # take no chances and rewrite it.
38519  # Note: m4 eats our [], so we need to use [ and ] instead.
38520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38521  if test "x$has_forbidden_chars" != x; then
38522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38526      # Going to short mode and back again did indeed matter. Since short mode is
38527      # case insensitive, let's make it lowercase to improve readability.
38528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38529      # Now convert it back to Unix-style (cygpath)
38530      input_path=`$CYGPATH -u "$shortmode_path"`
38531      new_path="$input_path"
38532    fi
38533  fi
38534
38535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38536  if test "x$test_cygdrive_prefix" = x; then
38537    # As a simple fix, exclude /usr/bin since it's not a real path.
38538    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38540      # a path prefixed by /cygdrive for fixpath to work.
38541      new_path="$CYGWIN_ROOT_PATH$input_path"
38542    fi
38543  fi
38544
38545  # remove trailing .exe if any
38546  new_path="${new_path/%.exe/}"
38547
38548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38549
38550  # First separate the path from the arguments. This will split at the first
38551  # space.
38552  complete="$RC"
38553  path="${complete%% *}"
38554  tmp="$complete EOL"
38555  arguments="${tmp#* }"
38556
38557  # Input might be given as Windows format, start by converting to
38558  # unix format.
38559  new_path="$path"
38560
38561  windows_path="$new_path"
38562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38563    unix_path=`$CYGPATH -u "$windows_path"`
38564    new_path="$unix_path"
38565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38567    new_path="$unix_path"
38568  fi
38569
38570
38571  # Now try to locate executable using which
38572  new_path=`$WHICH "$new_path" 2> /dev/null`
38573
38574  if test "x$new_path" = x; then
38575    # Oops. Which didn't find the executable.
38576    # The splitting of arguments from the executable at a space might have been incorrect,
38577    # since paths with space are more likely in Windows. Give it another try with the whole
38578    # argument.
38579    path="$complete"
38580    arguments="EOL"
38581    new_path="$path"
38582
38583  windows_path="$new_path"
38584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38585    unix_path=`$CYGPATH -u "$windows_path"`
38586    new_path="$unix_path"
38587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38589    new_path="$unix_path"
38590  fi
38591
38592
38593    new_path=`$WHICH "$new_path" 2> /dev/null`
38594    # bat and cmd files are not always considered executable in MSYS causing which
38595    # to not find them
38596    if test "x$new_path" = x \
38597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38599      new_path="$path"
38600
38601  windows_path="$new_path"
38602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38603    unix_path=`$CYGPATH -u "$windows_path"`
38604    new_path="$unix_path"
38605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38607    new_path="$unix_path"
38608  fi
38609
38610    fi
38611
38612    if test "x$new_path" = x; then
38613      # It's still not found. Now this is an unrecoverable error.
38614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38615$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38616      has_space=`$ECHO "$complete" | $GREP " "`
38617      if test "x$has_space" != x; then
38618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38620      fi
38621      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38622    fi
38623  fi
38624
38625  # Now new_path has a complete unix path to the binary
38626  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38627    # Keep paths in /bin as-is, but remove trailing .exe if any
38628    new_path="${new_path/%.exe/}"
38629    # Do not save /bin paths to all_fixpath_prefixes!
38630  else
38631    # Not in mixed or Windows style, start by that.
38632    new_path=`cmd //c echo $new_path`
38633
38634  input_path="$new_path"
38635  # Check if we need to convert this using DOS-style short mode. If the path
38636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38637  # take no chances and rewrite it.
38638  # Note: m4 eats our [], so we need to use [ and ] instead.
38639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38640  if test "x$has_forbidden_chars" != x; then
38641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38643  fi
38644
38645    # Output is in $new_path
38646
38647  windows_path="$new_path"
38648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38649    unix_path=`$CYGPATH -u "$windows_path"`
38650    new_path="$unix_path"
38651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38653    new_path="$unix_path"
38654  fi
38655
38656    # remove trailing .exe if any
38657    new_path="${new_path/%.exe/}"
38658
38659    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38660    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38661  fi
38662
38663    else
38664      # We're on a unix platform. Hooray! :)
38665      # First separate the path from the arguments. This will split at the first
38666      # space.
38667      complete="$RC"
38668      path="${complete%% *}"
38669      tmp="$complete EOL"
38670      arguments="${tmp#* }"
38671
38672      # Cannot rely on the command "which" here since it doesn't always work.
38673      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38674      if test -z "$is_absolute_path"; then
38675        # Path to executable is not absolute. Find it.
38676        IFS_save="$IFS"
38677        IFS=:
38678        for p in $PATH; do
38679          if test -f "$p/$path" && test -x "$p/$path"; then
38680            new_path="$p/$path"
38681            break
38682          fi
38683        done
38684        IFS="$IFS_save"
38685      else
38686        # This is an absolute path, we can use it without further modifications.
38687        new_path="$path"
38688      fi
38689
38690      if test "x$new_path" = x; then
38691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38692$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38693        has_space=`$ECHO "$complete" | $GREP " "`
38694        if test "x$has_space" != x; then
38695          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38696$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38697        fi
38698        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38699      fi
38700    fi
38701
38702    # Now join together the path and the arguments once again
38703    if test "x$arguments" != xEOL; then
38704      new_complete="$new_path ${arguments% *}"
38705    else
38706      new_complete="$new_path"
38707    fi
38708
38709    if test "x$complete" != "x$new_complete"; then
38710      RC="$new_complete"
38711      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38712$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38713    fi
38714  fi
38715
38716    # Extract the first word of "dumpbin", so it can be a program name with args.
38717set dummy dumpbin; ac_word=$2
38718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38719$as_echo_n "checking for $ac_word... " >&6; }
38720if ${ac_cv_prog_DUMPBIN+:} false; then :
38721  $as_echo_n "(cached) " >&6
38722else
38723  if test -n "$DUMPBIN"; then
38724  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38725else
38726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38727for as_dir in $PATH
38728do
38729  IFS=$as_save_IFS
38730  test -z "$as_dir" && as_dir=.
38731    for ac_exec_ext in '' $ac_executable_extensions; do
38732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38733    ac_cv_prog_DUMPBIN="dumpbin"
38734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38735    break 2
38736  fi
38737done
38738  done
38739IFS=$as_save_IFS
38740
38741fi
38742fi
38743DUMPBIN=$ac_cv_prog_DUMPBIN
38744if test -n "$DUMPBIN"; then
38745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38746$as_echo "$DUMPBIN" >&6; }
38747else
38748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38749$as_echo "no" >&6; }
38750fi
38751
38752
38753
38754  # Only process if variable expands to non-empty
38755
38756  if test "x$DUMPBIN" != x; then
38757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38758
38759  # First separate the path from the arguments. This will split at the first
38760  # space.
38761  complete="$DUMPBIN"
38762  path="${complete%% *}"
38763  tmp="$complete EOL"
38764  arguments="${tmp#* }"
38765
38766  # Input might be given as Windows format, start by converting to
38767  # unix format.
38768  new_path=`$CYGPATH -u "$path"`
38769
38770  # Now try to locate executable using which
38771  new_path=`$WHICH "$new_path" 2> /dev/null`
38772  # bat and cmd files are not always considered executable in cygwin causing which
38773  # to not find them
38774  if test "x$new_path" = x \
38775      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38776      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38777    new_path=`$CYGPATH -u "$path"`
38778  fi
38779  if test "x$new_path" = x; then
38780    # Oops. Which didn't find the executable.
38781    # The splitting of arguments from the executable at a space might have been incorrect,
38782    # since paths with space are more likely in Windows. Give it another try with the whole
38783    # argument.
38784    path="$complete"
38785    arguments="EOL"
38786    new_path=`$CYGPATH -u "$path"`
38787    new_path=`$WHICH "$new_path" 2> /dev/null`
38788    # bat and cmd files are not always considered executable in cygwin causing which
38789    # to not find them
38790    if test "x$new_path" = x \
38791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38793      new_path=`$CYGPATH -u "$path"`
38794    fi
38795    if test "x$new_path" = x; then
38796      # It's still not found. Now this is an unrecoverable error.
38797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38798$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38799      has_space=`$ECHO "$complete" | $GREP " "`
38800      if test "x$has_space" != x; then
38801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38803      fi
38804      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38805    fi
38806  fi
38807
38808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38811  # "foo.exe" is OK but "foo" is an error.
38812  #
38813  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38814  # It is also a way to make sure we got the proper file name for the real test later on.
38815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38816  if test "x$test_shortpath" = x; then
38817    # Short path failed, file does not exist as specified.
38818    # Try adding .exe or .cmd
38819    if test -f "${new_path}.exe"; then
38820      input_to_shortpath="${new_path}.exe"
38821    elif test -f "${new_path}.cmd"; then
38822      input_to_shortpath="${new_path}.cmd"
38823    else
38824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38825$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38826      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38828      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38829    fi
38830  else
38831    input_to_shortpath="$new_path"
38832  fi
38833
38834  # Call helper function which possibly converts this using DOS-style short mode.
38835  # If so, the updated path is stored in $new_path.
38836  new_path="$input_to_shortpath"
38837
38838  input_path="$input_to_shortpath"
38839  # Check if we need to convert this using DOS-style short mode. If the path
38840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38841  # take no chances and rewrite it.
38842  # Note: m4 eats our [], so we need to use [ and ] instead.
38843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38844  if test "x$has_forbidden_chars" != x; then
38845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38849      # Going to short mode and back again did indeed matter. Since short mode is
38850      # case insensitive, let's make it lowercase to improve readability.
38851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38852      # Now convert it back to Unix-style (cygpath)
38853      input_path=`$CYGPATH -u "$shortmode_path"`
38854      new_path="$input_path"
38855    fi
38856  fi
38857
38858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38859  if test "x$test_cygdrive_prefix" = x; then
38860    # As a simple fix, exclude /usr/bin since it's not a real path.
38861    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38863      # a path prefixed by /cygdrive for fixpath to work.
38864      new_path="$CYGWIN_ROOT_PATH$input_path"
38865    fi
38866  fi
38867
38868  # remove trailing .exe if any
38869  new_path="${new_path/%.exe/}"
38870
38871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38872
38873  # First separate the path from the arguments. This will split at the first
38874  # space.
38875  complete="$DUMPBIN"
38876  path="${complete%% *}"
38877  tmp="$complete EOL"
38878  arguments="${tmp#* }"
38879
38880  # Input might be given as Windows format, start by converting to
38881  # unix format.
38882  new_path="$path"
38883
38884  windows_path="$new_path"
38885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38886    unix_path=`$CYGPATH -u "$windows_path"`
38887    new_path="$unix_path"
38888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38890    new_path="$unix_path"
38891  fi
38892
38893
38894  # Now try to locate executable using which
38895  new_path=`$WHICH "$new_path" 2> /dev/null`
38896
38897  if test "x$new_path" = x; then
38898    # Oops. Which didn't find the executable.
38899    # The splitting of arguments from the executable at a space might have been incorrect,
38900    # since paths with space are more likely in Windows. Give it another try with the whole
38901    # argument.
38902    path="$complete"
38903    arguments="EOL"
38904    new_path="$path"
38905
38906  windows_path="$new_path"
38907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38908    unix_path=`$CYGPATH -u "$windows_path"`
38909    new_path="$unix_path"
38910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38912    new_path="$unix_path"
38913  fi
38914
38915
38916    new_path=`$WHICH "$new_path" 2> /dev/null`
38917    # bat and cmd files are not always considered executable in MSYS causing which
38918    # to not find them
38919    if test "x$new_path" = x \
38920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38922      new_path="$path"
38923
38924  windows_path="$new_path"
38925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38926    unix_path=`$CYGPATH -u "$windows_path"`
38927    new_path="$unix_path"
38928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38930    new_path="$unix_path"
38931  fi
38932
38933    fi
38934
38935    if test "x$new_path" = x; then
38936      # It's still not found. Now this is an unrecoverable error.
38937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38938$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38939      has_space=`$ECHO "$complete" | $GREP " "`
38940      if test "x$has_space" != x; then
38941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38943      fi
38944      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38945    fi
38946  fi
38947
38948  # Now new_path has a complete unix path to the binary
38949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38950    # Keep paths in /bin as-is, but remove trailing .exe if any
38951    new_path="${new_path/%.exe/}"
38952    # Do not save /bin paths to all_fixpath_prefixes!
38953  else
38954    # Not in mixed or Windows style, start by that.
38955    new_path=`cmd //c echo $new_path`
38956
38957  input_path="$new_path"
38958  # Check if we need to convert this using DOS-style short mode. If the path
38959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38960  # take no chances and rewrite it.
38961  # Note: m4 eats our [], so we need to use [ and ] instead.
38962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38963  if test "x$has_forbidden_chars" != x; then
38964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38966  fi
38967
38968    # Output is in $new_path
38969
38970  windows_path="$new_path"
38971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38972    unix_path=`$CYGPATH -u "$windows_path"`
38973    new_path="$unix_path"
38974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38976    new_path="$unix_path"
38977  fi
38978
38979    # remove trailing .exe if any
38980    new_path="${new_path/%.exe/}"
38981
38982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38984  fi
38985
38986    else
38987      # We're on a unix platform. Hooray! :)
38988      # First separate the path from the arguments. This will split at the first
38989      # space.
38990      complete="$DUMPBIN"
38991      path="${complete%% *}"
38992      tmp="$complete EOL"
38993      arguments="${tmp#* }"
38994
38995      # Cannot rely on the command "which" here since it doesn't always work.
38996      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38997      if test -z "$is_absolute_path"; then
38998        # Path to executable is not absolute. Find it.
38999        IFS_save="$IFS"
39000        IFS=:
39001        for p in $PATH; do
39002          if test -f "$p/$path" && test -x "$p/$path"; then
39003            new_path="$p/$path"
39004            break
39005          fi
39006        done
39007        IFS="$IFS_save"
39008      else
39009        # This is an absolute path, we can use it without further modifications.
39010        new_path="$path"
39011      fi
39012
39013      if test "x$new_path" = x; then
39014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39015$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39016        has_space=`$ECHO "$complete" | $GREP " "`
39017        if test "x$has_space" != x; then
39018          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39020        fi
39021        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39022      fi
39023    fi
39024
39025    # Now join together the path and the arguments once again
39026    if test "x$arguments" != xEOL; then
39027      new_complete="$new_path ${arguments% *}"
39028    else
39029      new_complete="$new_path"
39030    fi
39031
39032    if test "x$complete" != "x$new_complete"; then
39033      DUMPBIN="$new_complete"
39034      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39035$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39036    fi
39037  fi
39038
39039    # We need to check for 'msbuild.exe' because at the place where we expect to
39040    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39041    # won't find the 'msbuild.exe' executable in that case (and the
39042    # 'ac_executable_extensions' is unusable due to performance reasons).
39043    # Notice that we intentionally don't fix up the path to MSBUILD because we
39044    # will call it in a DOS shell during freetype detection on Windows (see
39045    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39046    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39047set dummy msbuild.exe; ac_word=$2
39048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39049$as_echo_n "checking for $ac_word... " >&6; }
39050if ${ac_cv_prog_MSBUILD+:} false; then :
39051  $as_echo_n "(cached) " >&6
39052else
39053  if test -n "$MSBUILD"; then
39054  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39055else
39056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39057for as_dir in $PATH
39058do
39059  IFS=$as_save_IFS
39060  test -z "$as_dir" && as_dir=.
39061    for ac_exec_ext in '' $ac_executable_extensions; do
39062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39063    ac_cv_prog_MSBUILD="msbuild.exe"
39064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39065    break 2
39066  fi
39067done
39068  done
39069IFS=$as_save_IFS
39070
39071fi
39072fi
39073MSBUILD=$ac_cv_prog_MSBUILD
39074if test -n "$MSBUILD"; then
39075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39076$as_echo "$MSBUILD" >&6; }
39077else
39078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39079$as_echo "no" >&6; }
39080fi
39081
39082
39083  fi
39084
39085  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39086
39087
39088  # Publish this variable in the help.
39089
39090
39091  if [ -z "${STRIP+x}" ]; then
39092    # The variable is not set by user, try to locate tool using the code snippet
39093    for ac_prog in strip
39094do
39095  # Extract the first word of "$ac_prog", so it can be a program name with args.
39096set dummy $ac_prog; ac_word=$2
39097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39098$as_echo_n "checking for $ac_word... " >&6; }
39099if ${ac_cv_path_STRIP+:} false; then :
39100  $as_echo_n "(cached) " >&6
39101else
39102  case $STRIP in
39103  [\\/]* | ?:[\\/]*)
39104  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39105  ;;
39106  *)
39107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39108for as_dir in $PATH
39109do
39110  IFS=$as_save_IFS
39111  test -z "$as_dir" && as_dir=.
39112    for ac_exec_ext in '' $ac_executable_extensions; do
39113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39114    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39116    break 2
39117  fi
39118done
39119  done
39120IFS=$as_save_IFS
39121
39122  ;;
39123esac
39124fi
39125STRIP=$ac_cv_path_STRIP
39126if test -n "$STRIP"; then
39127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39128$as_echo "$STRIP" >&6; }
39129else
39130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39131$as_echo "no" >&6; }
39132fi
39133
39134
39135  test -n "$STRIP" && break
39136done
39137
39138  else
39139    # The variable is set, but is it from the command line or the environment?
39140
39141    # Try to remove the string !STRIP! from our list.
39142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39144      # If it failed, the variable was not from the command line. Ignore it,
39145      # but warn the user (except for BASH, which is always set by the calling BASH).
39146      if test "xSTRIP" != xBASH; then
39147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39148$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39149      fi
39150      # Try to locate tool using the code snippet
39151      for ac_prog in strip
39152do
39153  # Extract the first word of "$ac_prog", so it can be a program name with args.
39154set dummy $ac_prog; ac_word=$2
39155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39156$as_echo_n "checking for $ac_word... " >&6; }
39157if ${ac_cv_path_STRIP+:} false; then :
39158  $as_echo_n "(cached) " >&6
39159else
39160  case $STRIP in
39161  [\\/]* | ?:[\\/]*)
39162  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39163  ;;
39164  *)
39165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39166for as_dir in $PATH
39167do
39168  IFS=$as_save_IFS
39169  test -z "$as_dir" && as_dir=.
39170    for ac_exec_ext in '' $ac_executable_extensions; do
39171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39172    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39174    break 2
39175  fi
39176done
39177  done
39178IFS=$as_save_IFS
39179
39180  ;;
39181esac
39182fi
39183STRIP=$ac_cv_path_STRIP
39184if test -n "$STRIP"; then
39185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39186$as_echo "$STRIP" >&6; }
39187else
39188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39189$as_echo "no" >&6; }
39190fi
39191
39192
39193  test -n "$STRIP" && break
39194done
39195
39196    else
39197      # If it succeeded, then it was overridden by the user. We will use it
39198      # for the tool.
39199
39200      # First remove it from the list of overridden variables, so we can test
39201      # for unknown variables in the end.
39202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39203
39204      # Check if we try to supply an empty value
39205      if test "x$STRIP" = x; then
39206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39207$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39209$as_echo_n "checking for STRIP... " >&6; }
39210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39211$as_echo "disabled" >&6; }
39212      else
39213        # Check if the provided tool contains a complete path.
39214        tool_specified="$STRIP"
39215        tool_basename="${tool_specified##*/}"
39216        if test "x$tool_basename" = "x$tool_specified"; then
39217          # A command without a complete path is provided, search $PATH.
39218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39219$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39220          # Extract the first word of "$tool_basename", so it can be a program name with args.
39221set dummy $tool_basename; ac_word=$2
39222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39223$as_echo_n "checking for $ac_word... " >&6; }
39224if ${ac_cv_path_STRIP+:} false; then :
39225  $as_echo_n "(cached) " >&6
39226else
39227  case $STRIP in
39228  [\\/]* | ?:[\\/]*)
39229  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39230  ;;
39231  *)
39232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39233for as_dir in $PATH
39234do
39235  IFS=$as_save_IFS
39236  test -z "$as_dir" && as_dir=.
39237    for ac_exec_ext in '' $ac_executable_extensions; do
39238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39239    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39241    break 2
39242  fi
39243done
39244  done
39245IFS=$as_save_IFS
39246
39247  ;;
39248esac
39249fi
39250STRIP=$ac_cv_path_STRIP
39251if test -n "$STRIP"; then
39252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39253$as_echo "$STRIP" >&6; }
39254else
39255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39256$as_echo "no" >&6; }
39257fi
39258
39259
39260          if test "x$STRIP" = x; then
39261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39262          fi
39263        else
39264          # Otherwise we believe it is a complete path. Use it as it is.
39265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39266$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39268$as_echo_n "checking for STRIP... " >&6; }
39269          if test ! -x "$tool_specified"; then
39270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39271$as_echo "not found" >&6; }
39272            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39273          fi
39274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39275$as_echo "$tool_specified" >&6; }
39276        fi
39277      fi
39278    fi
39279
39280  fi
39281
39282
39283
39284  # Only process if variable expands to non-empty
39285
39286  if test "x$STRIP" != x; then
39287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39288
39289  # First separate the path from the arguments. This will split at the first
39290  # space.
39291  complete="$STRIP"
39292  path="${complete%% *}"
39293  tmp="$complete EOL"
39294  arguments="${tmp#* }"
39295
39296  # Input might be given as Windows format, start by converting to
39297  # unix format.
39298  new_path=`$CYGPATH -u "$path"`
39299
39300  # Now try to locate executable using which
39301  new_path=`$WHICH "$new_path" 2> /dev/null`
39302  # bat and cmd files are not always considered executable in cygwin causing which
39303  # to not find them
39304  if test "x$new_path" = x \
39305      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39306      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39307    new_path=`$CYGPATH -u "$path"`
39308  fi
39309  if test "x$new_path" = x; then
39310    # Oops. Which didn't find the executable.
39311    # The splitting of arguments from the executable at a space might have been incorrect,
39312    # since paths with space are more likely in Windows. Give it another try with the whole
39313    # argument.
39314    path="$complete"
39315    arguments="EOL"
39316    new_path=`$CYGPATH -u "$path"`
39317    new_path=`$WHICH "$new_path" 2> /dev/null`
39318    # bat and cmd files are not always considered executable in cygwin causing which
39319    # to not find them
39320    if test "x$new_path" = x \
39321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39323      new_path=`$CYGPATH -u "$path"`
39324    fi
39325    if test "x$new_path" = x; then
39326      # It's still not found. Now this is an unrecoverable error.
39327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39328$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39329      has_space=`$ECHO "$complete" | $GREP " "`
39330      if test "x$has_space" != x; then
39331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39333      fi
39334      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39335    fi
39336  fi
39337
39338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39341  # "foo.exe" is OK but "foo" is an error.
39342  #
39343  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39344  # It is also a way to make sure we got the proper file name for the real test later on.
39345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39346  if test "x$test_shortpath" = x; then
39347    # Short path failed, file does not exist as specified.
39348    # Try adding .exe or .cmd
39349    if test -f "${new_path}.exe"; then
39350      input_to_shortpath="${new_path}.exe"
39351    elif test -f "${new_path}.cmd"; then
39352      input_to_shortpath="${new_path}.cmd"
39353    else
39354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39355$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39358      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39359    fi
39360  else
39361    input_to_shortpath="$new_path"
39362  fi
39363
39364  # Call helper function which possibly converts this using DOS-style short mode.
39365  # If so, the updated path is stored in $new_path.
39366  new_path="$input_to_shortpath"
39367
39368  input_path="$input_to_shortpath"
39369  # Check if we need to convert this using DOS-style short mode. If the path
39370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39371  # take no chances and rewrite it.
39372  # Note: m4 eats our [], so we need to use [ and ] instead.
39373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39374  if test "x$has_forbidden_chars" != x; then
39375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39379      # Going to short mode and back again did indeed matter. Since short mode is
39380      # case insensitive, let's make it lowercase to improve readability.
39381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39382      # Now convert it back to Unix-style (cygpath)
39383      input_path=`$CYGPATH -u "$shortmode_path"`
39384      new_path="$input_path"
39385    fi
39386  fi
39387
39388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39389  if test "x$test_cygdrive_prefix" = x; then
39390    # As a simple fix, exclude /usr/bin since it's not a real path.
39391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39393      # a path prefixed by /cygdrive for fixpath to work.
39394      new_path="$CYGWIN_ROOT_PATH$input_path"
39395    fi
39396  fi
39397
39398  # remove trailing .exe if any
39399  new_path="${new_path/%.exe/}"
39400
39401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402
39403  # First separate the path from the arguments. This will split at the first
39404  # space.
39405  complete="$STRIP"
39406  path="${complete%% *}"
39407  tmp="$complete EOL"
39408  arguments="${tmp#* }"
39409
39410  # Input might be given as Windows format, start by converting to
39411  # unix format.
39412  new_path="$path"
39413
39414  windows_path="$new_path"
39415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39416    unix_path=`$CYGPATH -u "$windows_path"`
39417    new_path="$unix_path"
39418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39420    new_path="$unix_path"
39421  fi
39422
39423
39424  # Now try to locate executable using which
39425  new_path=`$WHICH "$new_path" 2> /dev/null`
39426
39427  if test "x$new_path" = x; then
39428    # Oops. Which didn't find the executable.
39429    # The splitting of arguments from the executable at a space might have been incorrect,
39430    # since paths with space are more likely in Windows. Give it another try with the whole
39431    # argument.
39432    path="$complete"
39433    arguments="EOL"
39434    new_path="$path"
39435
39436  windows_path="$new_path"
39437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39438    unix_path=`$CYGPATH -u "$windows_path"`
39439    new_path="$unix_path"
39440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39442    new_path="$unix_path"
39443  fi
39444
39445
39446    new_path=`$WHICH "$new_path" 2> /dev/null`
39447    # bat and cmd files are not always considered executable in MSYS causing which
39448    # to not find them
39449    if test "x$new_path" = x \
39450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39452      new_path="$path"
39453
39454  windows_path="$new_path"
39455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39456    unix_path=`$CYGPATH -u "$windows_path"`
39457    new_path="$unix_path"
39458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39460    new_path="$unix_path"
39461  fi
39462
39463    fi
39464
39465    if test "x$new_path" = x; then
39466      # It's still not found. Now this is an unrecoverable error.
39467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39468$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39469      has_space=`$ECHO "$complete" | $GREP " "`
39470      if test "x$has_space" != x; then
39471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39473      fi
39474      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39475    fi
39476  fi
39477
39478  # Now new_path has a complete unix path to the binary
39479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39480    # Keep paths in /bin as-is, but remove trailing .exe if any
39481    new_path="${new_path/%.exe/}"
39482    # Do not save /bin paths to all_fixpath_prefixes!
39483  else
39484    # Not in mixed or Windows style, start by that.
39485    new_path=`cmd //c echo $new_path`
39486
39487  input_path="$new_path"
39488  # Check if we need to convert this using DOS-style short mode. If the path
39489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39490  # take no chances and rewrite it.
39491  # Note: m4 eats our [], so we need to use [ and ] instead.
39492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39493  if test "x$has_forbidden_chars" != x; then
39494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39496  fi
39497
39498    # Output is in $new_path
39499
39500  windows_path="$new_path"
39501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39502    unix_path=`$CYGPATH -u "$windows_path"`
39503    new_path="$unix_path"
39504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39506    new_path="$unix_path"
39507  fi
39508
39509    # remove trailing .exe if any
39510    new_path="${new_path/%.exe/}"
39511
39512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39514  fi
39515
39516    else
39517      # We're on a unix platform. Hooray! :)
39518      # First separate the path from the arguments. This will split at the first
39519      # space.
39520      complete="$STRIP"
39521      path="${complete%% *}"
39522      tmp="$complete EOL"
39523      arguments="${tmp#* }"
39524
39525      # Cannot rely on the command "which" here since it doesn't always work.
39526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39527      if test -z "$is_absolute_path"; then
39528        # Path to executable is not absolute. Find it.
39529        IFS_save="$IFS"
39530        IFS=:
39531        for p in $PATH; do
39532          if test -f "$p/$path" && test -x "$p/$path"; then
39533            new_path="$p/$path"
39534            break
39535          fi
39536        done
39537        IFS="$IFS_save"
39538      else
39539        # This is an absolute path, we can use it without further modifications.
39540        new_path="$path"
39541      fi
39542
39543      if test "x$new_path" = x; then
39544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39545$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39546        has_space=`$ECHO "$complete" | $GREP " "`
39547        if test "x$has_space" != x; then
39548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39550        fi
39551        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39552      fi
39553    fi
39554
39555    # Now join together the path and the arguments once again
39556    if test "x$arguments" != xEOL; then
39557      new_complete="$new_path ${arguments% *}"
39558    else
39559      new_complete="$new_path"
39560    fi
39561
39562    if test "x$complete" != "x$new_complete"; then
39563      STRIP="$new_complete"
39564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39565$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39566    fi
39567  fi
39568
39569
39570
39571  # Publish this variable in the help.
39572
39573
39574  if [ -z "${NM+x}" ]; then
39575    # The variable is not set by user, try to locate tool using the code snippet
39576    for ac_prog in nm
39577do
39578  # Extract the first word of "$ac_prog", so it can be a program name with args.
39579set dummy $ac_prog; ac_word=$2
39580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39581$as_echo_n "checking for $ac_word... " >&6; }
39582if ${ac_cv_path_NM+:} false; then :
39583  $as_echo_n "(cached) " >&6
39584else
39585  case $NM in
39586  [\\/]* | ?:[\\/]*)
39587  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39588  ;;
39589  *)
39590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39591for as_dir in $PATH
39592do
39593  IFS=$as_save_IFS
39594  test -z "$as_dir" && as_dir=.
39595    for ac_exec_ext in '' $ac_executable_extensions; do
39596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39597    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39599    break 2
39600  fi
39601done
39602  done
39603IFS=$as_save_IFS
39604
39605  ;;
39606esac
39607fi
39608NM=$ac_cv_path_NM
39609if test -n "$NM"; then
39610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39611$as_echo "$NM" >&6; }
39612else
39613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39614$as_echo "no" >&6; }
39615fi
39616
39617
39618  test -n "$NM" && break
39619done
39620
39621  else
39622    # The variable is set, but is it from the command line or the environment?
39623
39624    # Try to remove the string !NM! from our list.
39625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39627      # If it failed, the variable was not from the command line. Ignore it,
39628      # but warn the user (except for BASH, which is always set by the calling BASH).
39629      if test "xNM" != xBASH; then
39630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39631$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39632      fi
39633      # Try to locate tool using the code snippet
39634      for ac_prog in nm
39635do
39636  # Extract the first word of "$ac_prog", so it can be a program name with args.
39637set dummy $ac_prog; ac_word=$2
39638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39639$as_echo_n "checking for $ac_word... " >&6; }
39640if ${ac_cv_path_NM+:} false; then :
39641  $as_echo_n "(cached) " >&6
39642else
39643  case $NM in
39644  [\\/]* | ?:[\\/]*)
39645  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39646  ;;
39647  *)
39648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39649for as_dir in $PATH
39650do
39651  IFS=$as_save_IFS
39652  test -z "$as_dir" && as_dir=.
39653    for ac_exec_ext in '' $ac_executable_extensions; do
39654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39655    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39657    break 2
39658  fi
39659done
39660  done
39661IFS=$as_save_IFS
39662
39663  ;;
39664esac
39665fi
39666NM=$ac_cv_path_NM
39667if test -n "$NM"; then
39668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39669$as_echo "$NM" >&6; }
39670else
39671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39672$as_echo "no" >&6; }
39673fi
39674
39675
39676  test -n "$NM" && break
39677done
39678
39679    else
39680      # If it succeeded, then it was overridden by the user. We will use it
39681      # for the tool.
39682
39683      # First remove it from the list of overridden variables, so we can test
39684      # for unknown variables in the end.
39685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39686
39687      # Check if we try to supply an empty value
39688      if test "x$NM" = x; then
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39690$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39692$as_echo_n "checking for NM... " >&6; }
39693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39694$as_echo "disabled" >&6; }
39695      else
39696        # Check if the provided tool contains a complete path.
39697        tool_specified="$NM"
39698        tool_basename="${tool_specified##*/}"
39699        if test "x$tool_basename" = "x$tool_specified"; then
39700          # A command without a complete path is provided, search $PATH.
39701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39702$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39703          # Extract the first word of "$tool_basename", so it can be a program name with args.
39704set dummy $tool_basename; ac_word=$2
39705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39706$as_echo_n "checking for $ac_word... " >&6; }
39707if ${ac_cv_path_NM+:} false; then :
39708  $as_echo_n "(cached) " >&6
39709else
39710  case $NM in
39711  [\\/]* | ?:[\\/]*)
39712  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39713  ;;
39714  *)
39715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39716for as_dir in $PATH
39717do
39718  IFS=$as_save_IFS
39719  test -z "$as_dir" && as_dir=.
39720    for ac_exec_ext in '' $ac_executable_extensions; do
39721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39722    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39724    break 2
39725  fi
39726done
39727  done
39728IFS=$as_save_IFS
39729
39730  ;;
39731esac
39732fi
39733NM=$ac_cv_path_NM
39734if test -n "$NM"; then
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39736$as_echo "$NM" >&6; }
39737else
39738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39739$as_echo "no" >&6; }
39740fi
39741
39742
39743          if test "x$NM" = x; then
39744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39745          fi
39746        else
39747          # Otherwise we believe it is a complete path. Use it as it is.
39748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39749$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39751$as_echo_n "checking for NM... " >&6; }
39752          if test ! -x "$tool_specified"; then
39753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39754$as_echo "not found" >&6; }
39755            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39756          fi
39757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39758$as_echo "$tool_specified" >&6; }
39759        fi
39760      fi
39761    fi
39762
39763  fi
39764
39765
39766
39767  # Only process if variable expands to non-empty
39768
39769  if test "x$NM" != x; then
39770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39771
39772  # First separate the path from the arguments. This will split at the first
39773  # space.
39774  complete="$NM"
39775  path="${complete%% *}"
39776  tmp="$complete EOL"
39777  arguments="${tmp#* }"
39778
39779  # Input might be given as Windows format, start by converting to
39780  # unix format.
39781  new_path=`$CYGPATH -u "$path"`
39782
39783  # Now try to locate executable using which
39784  new_path=`$WHICH "$new_path" 2> /dev/null`
39785  # bat and cmd files are not always considered executable in cygwin causing which
39786  # to not find them
39787  if test "x$new_path" = x \
39788      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39789      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39790    new_path=`$CYGPATH -u "$path"`
39791  fi
39792  if test "x$new_path" = x; then
39793    # Oops. Which didn't find the executable.
39794    # The splitting of arguments from the executable at a space might have been incorrect,
39795    # since paths with space are more likely in Windows. Give it another try with the whole
39796    # argument.
39797    path="$complete"
39798    arguments="EOL"
39799    new_path=`$CYGPATH -u "$path"`
39800    new_path=`$WHICH "$new_path" 2> /dev/null`
39801    # bat and cmd files are not always considered executable in cygwin causing which
39802    # to not find them
39803    if test "x$new_path" = x \
39804        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39805        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39806      new_path=`$CYGPATH -u "$path"`
39807    fi
39808    if test "x$new_path" = x; then
39809      # It's still not found. Now this is an unrecoverable error.
39810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39811$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39812      has_space=`$ECHO "$complete" | $GREP " "`
39813      if test "x$has_space" != x; then
39814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39816      fi
39817      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39818    fi
39819  fi
39820
39821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39824  # "foo.exe" is OK but "foo" is an error.
39825  #
39826  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39827  # It is also a way to make sure we got the proper file name for the real test later on.
39828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39829  if test "x$test_shortpath" = x; then
39830    # Short path failed, file does not exist as specified.
39831    # Try adding .exe or .cmd
39832    if test -f "${new_path}.exe"; then
39833      input_to_shortpath="${new_path}.exe"
39834    elif test -f "${new_path}.cmd"; then
39835      input_to_shortpath="${new_path}.cmd"
39836    else
39837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39838$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39839      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39840$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39841      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39842    fi
39843  else
39844    input_to_shortpath="$new_path"
39845  fi
39846
39847  # Call helper function which possibly converts this using DOS-style short mode.
39848  # If so, the updated path is stored in $new_path.
39849  new_path="$input_to_shortpath"
39850
39851  input_path="$input_to_shortpath"
39852  # Check if we need to convert this using DOS-style short mode. If the path
39853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39854  # take no chances and rewrite it.
39855  # Note: m4 eats our [], so we need to use [ and ] instead.
39856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39857  if test "x$has_forbidden_chars" != x; then
39858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39862      # Going to short mode and back again did indeed matter. Since short mode is
39863      # case insensitive, let's make it lowercase to improve readability.
39864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39865      # Now convert it back to Unix-style (cygpath)
39866      input_path=`$CYGPATH -u "$shortmode_path"`
39867      new_path="$input_path"
39868    fi
39869  fi
39870
39871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39872  if test "x$test_cygdrive_prefix" = x; then
39873    # As a simple fix, exclude /usr/bin since it's not a real path.
39874    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39876      # a path prefixed by /cygdrive for fixpath to work.
39877      new_path="$CYGWIN_ROOT_PATH$input_path"
39878    fi
39879  fi
39880
39881  # remove trailing .exe if any
39882  new_path="${new_path/%.exe/}"
39883
39884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39885
39886  # First separate the path from the arguments. This will split at the first
39887  # space.
39888  complete="$NM"
39889  path="${complete%% *}"
39890  tmp="$complete EOL"
39891  arguments="${tmp#* }"
39892
39893  # Input might be given as Windows format, start by converting to
39894  # unix format.
39895  new_path="$path"
39896
39897  windows_path="$new_path"
39898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39899    unix_path=`$CYGPATH -u "$windows_path"`
39900    new_path="$unix_path"
39901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39903    new_path="$unix_path"
39904  fi
39905
39906
39907  # Now try to locate executable using which
39908  new_path=`$WHICH "$new_path" 2> /dev/null`
39909
39910  if test "x$new_path" = x; then
39911    # Oops. Which didn't find the executable.
39912    # The splitting of arguments from the executable at a space might have been incorrect,
39913    # since paths with space are more likely in Windows. Give it another try with the whole
39914    # argument.
39915    path="$complete"
39916    arguments="EOL"
39917    new_path="$path"
39918
39919  windows_path="$new_path"
39920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39921    unix_path=`$CYGPATH -u "$windows_path"`
39922    new_path="$unix_path"
39923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39925    new_path="$unix_path"
39926  fi
39927
39928
39929    new_path=`$WHICH "$new_path" 2> /dev/null`
39930    # bat and cmd files are not always considered executable in MSYS causing which
39931    # to not find them
39932    if test "x$new_path" = x \
39933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39935      new_path="$path"
39936
39937  windows_path="$new_path"
39938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39939    unix_path=`$CYGPATH -u "$windows_path"`
39940    new_path="$unix_path"
39941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39943    new_path="$unix_path"
39944  fi
39945
39946    fi
39947
39948    if test "x$new_path" = x; then
39949      # It's still not found. Now this is an unrecoverable error.
39950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39951$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39952      has_space=`$ECHO "$complete" | $GREP " "`
39953      if test "x$has_space" != x; then
39954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39956      fi
39957      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39958    fi
39959  fi
39960
39961  # Now new_path has a complete unix path to the binary
39962  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39963    # Keep paths in /bin as-is, but remove trailing .exe if any
39964    new_path="${new_path/%.exe/}"
39965    # Do not save /bin paths to all_fixpath_prefixes!
39966  else
39967    # Not in mixed or Windows style, start by that.
39968    new_path=`cmd //c echo $new_path`
39969
39970  input_path="$new_path"
39971  # Check if we need to convert this using DOS-style short mode. If the path
39972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39973  # take no chances and rewrite it.
39974  # Note: m4 eats our [], so we need to use [ and ] instead.
39975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39976  if test "x$has_forbidden_chars" != x; then
39977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39979  fi
39980
39981    # Output is in $new_path
39982
39983  windows_path="$new_path"
39984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39985    unix_path=`$CYGPATH -u "$windows_path"`
39986    new_path="$unix_path"
39987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39989    new_path="$unix_path"
39990  fi
39991
39992    # remove trailing .exe if any
39993    new_path="${new_path/%.exe/}"
39994
39995    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39996    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39997  fi
39998
39999    else
40000      # We're on a unix platform. Hooray! :)
40001      # First separate the path from the arguments. This will split at the first
40002      # space.
40003      complete="$NM"
40004      path="${complete%% *}"
40005      tmp="$complete EOL"
40006      arguments="${tmp#* }"
40007
40008      # Cannot rely on the command "which" here since it doesn't always work.
40009      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40010      if test -z "$is_absolute_path"; then
40011        # Path to executable is not absolute. Find it.
40012        IFS_save="$IFS"
40013        IFS=:
40014        for p in $PATH; do
40015          if test -f "$p/$path" && test -x "$p/$path"; then
40016            new_path="$p/$path"
40017            break
40018          fi
40019        done
40020        IFS="$IFS_save"
40021      else
40022        # This is an absolute path, we can use it without further modifications.
40023        new_path="$path"
40024      fi
40025
40026      if test "x$new_path" = x; then
40027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40028$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40029        has_space=`$ECHO "$complete" | $GREP " "`
40030        if test "x$has_space" != x; then
40031          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40032$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40033        fi
40034        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40035      fi
40036    fi
40037
40038    # Now join together the path and the arguments once again
40039    if test "x$arguments" != xEOL; then
40040      new_complete="$new_path ${arguments% *}"
40041    else
40042      new_complete="$new_path"
40043    fi
40044
40045    if test "x$complete" != "x$new_complete"; then
40046      NM="$new_complete"
40047      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40048$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40049    fi
40050  fi
40051
40052
40053
40054  # Publish this variable in the help.
40055
40056
40057  if [ -z "${GNM+x}" ]; then
40058    # The variable is not set by user, try to locate tool using the code snippet
40059    for ac_prog in gnm
40060do
40061  # Extract the first word of "$ac_prog", so it can be a program name with args.
40062set dummy $ac_prog; ac_word=$2
40063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40064$as_echo_n "checking for $ac_word... " >&6; }
40065if ${ac_cv_path_GNM+:} false; then :
40066  $as_echo_n "(cached) " >&6
40067else
40068  case $GNM in
40069  [\\/]* | ?:[\\/]*)
40070  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40071  ;;
40072  *)
40073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40074for as_dir in $PATH
40075do
40076  IFS=$as_save_IFS
40077  test -z "$as_dir" && as_dir=.
40078    for ac_exec_ext in '' $ac_executable_extensions; do
40079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40080    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40082    break 2
40083  fi
40084done
40085  done
40086IFS=$as_save_IFS
40087
40088  ;;
40089esac
40090fi
40091GNM=$ac_cv_path_GNM
40092if test -n "$GNM"; then
40093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40094$as_echo "$GNM" >&6; }
40095else
40096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40097$as_echo "no" >&6; }
40098fi
40099
40100
40101  test -n "$GNM" && break
40102done
40103
40104  else
40105    # The variable is set, but is it from the command line or the environment?
40106
40107    # Try to remove the string !GNM! from our list.
40108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40110      # If it failed, the variable was not from the command line. Ignore it,
40111      # but warn the user (except for BASH, which is always set by the calling BASH).
40112      if test "xGNM" != xBASH; then
40113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40114$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40115      fi
40116      # Try to locate tool using the code snippet
40117      for ac_prog in gnm
40118do
40119  # Extract the first word of "$ac_prog", so it can be a program name with args.
40120set dummy $ac_prog; ac_word=$2
40121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40122$as_echo_n "checking for $ac_word... " >&6; }
40123if ${ac_cv_path_GNM+:} false; then :
40124  $as_echo_n "(cached) " >&6
40125else
40126  case $GNM in
40127  [\\/]* | ?:[\\/]*)
40128  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40129  ;;
40130  *)
40131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40132for as_dir in $PATH
40133do
40134  IFS=$as_save_IFS
40135  test -z "$as_dir" && as_dir=.
40136    for ac_exec_ext in '' $ac_executable_extensions; do
40137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40138    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40140    break 2
40141  fi
40142done
40143  done
40144IFS=$as_save_IFS
40145
40146  ;;
40147esac
40148fi
40149GNM=$ac_cv_path_GNM
40150if test -n "$GNM"; then
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40152$as_echo "$GNM" >&6; }
40153else
40154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40155$as_echo "no" >&6; }
40156fi
40157
40158
40159  test -n "$GNM" && break
40160done
40161
40162    else
40163      # If it succeeded, then it was overridden by the user. We will use it
40164      # for the tool.
40165
40166      # First remove it from the list of overridden variables, so we can test
40167      # for unknown variables in the end.
40168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40169
40170      # Check if we try to supply an empty value
40171      if test "x$GNM" = x; then
40172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40173$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40175$as_echo_n "checking for GNM... " >&6; }
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40177$as_echo "disabled" >&6; }
40178      else
40179        # Check if the provided tool contains a complete path.
40180        tool_specified="$GNM"
40181        tool_basename="${tool_specified##*/}"
40182        if test "x$tool_basename" = "x$tool_specified"; then
40183          # A command without a complete path is provided, search $PATH.
40184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40185$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40186          # Extract the first word of "$tool_basename", so it can be a program name with args.
40187set dummy $tool_basename; ac_word=$2
40188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40189$as_echo_n "checking for $ac_word... " >&6; }
40190if ${ac_cv_path_GNM+:} false; then :
40191  $as_echo_n "(cached) " >&6
40192else
40193  case $GNM in
40194  [\\/]* | ?:[\\/]*)
40195  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40196  ;;
40197  *)
40198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40199for as_dir in $PATH
40200do
40201  IFS=$as_save_IFS
40202  test -z "$as_dir" && as_dir=.
40203    for ac_exec_ext in '' $ac_executable_extensions; do
40204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40205    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40207    break 2
40208  fi
40209done
40210  done
40211IFS=$as_save_IFS
40212
40213  ;;
40214esac
40215fi
40216GNM=$ac_cv_path_GNM
40217if test -n "$GNM"; then
40218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40219$as_echo "$GNM" >&6; }
40220else
40221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40222$as_echo "no" >&6; }
40223fi
40224
40225
40226          if test "x$GNM" = x; then
40227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40228          fi
40229        else
40230          # Otherwise we believe it is a complete path. Use it as it is.
40231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40232$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40234$as_echo_n "checking for GNM... " >&6; }
40235          if test ! -x "$tool_specified"; then
40236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40237$as_echo "not found" >&6; }
40238            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40239          fi
40240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40241$as_echo "$tool_specified" >&6; }
40242        fi
40243      fi
40244    fi
40245
40246  fi
40247
40248
40249
40250  # Only process if variable expands to non-empty
40251
40252  if test "x$GNM" != x; then
40253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40254
40255  # First separate the path from the arguments. This will split at the first
40256  # space.
40257  complete="$GNM"
40258  path="${complete%% *}"
40259  tmp="$complete EOL"
40260  arguments="${tmp#* }"
40261
40262  # Input might be given as Windows format, start by converting to
40263  # unix format.
40264  new_path=`$CYGPATH -u "$path"`
40265
40266  # Now try to locate executable using which
40267  new_path=`$WHICH "$new_path" 2> /dev/null`
40268  # bat and cmd files are not always considered executable in cygwin causing which
40269  # to not find them
40270  if test "x$new_path" = x \
40271      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40272      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40273    new_path=`$CYGPATH -u "$path"`
40274  fi
40275  if test "x$new_path" = x; then
40276    # Oops. Which didn't find the executable.
40277    # The splitting of arguments from the executable at a space might have been incorrect,
40278    # since paths with space are more likely in Windows. Give it another try with the whole
40279    # argument.
40280    path="$complete"
40281    arguments="EOL"
40282    new_path=`$CYGPATH -u "$path"`
40283    new_path=`$WHICH "$new_path" 2> /dev/null`
40284    # bat and cmd files are not always considered executable in cygwin causing which
40285    # to not find them
40286    if test "x$new_path" = x \
40287        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40288        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40289      new_path=`$CYGPATH -u "$path"`
40290    fi
40291    if test "x$new_path" = x; then
40292      # It's still not found. Now this is an unrecoverable error.
40293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40294$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40295      has_space=`$ECHO "$complete" | $GREP " "`
40296      if test "x$has_space" != x; then
40297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40299      fi
40300      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40301    fi
40302  fi
40303
40304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40307  # "foo.exe" is OK but "foo" is an error.
40308  #
40309  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40310  # It is also a way to make sure we got the proper file name for the real test later on.
40311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40312  if test "x$test_shortpath" = x; then
40313    # Short path failed, file does not exist as specified.
40314    # Try adding .exe or .cmd
40315    if test -f "${new_path}.exe"; then
40316      input_to_shortpath="${new_path}.exe"
40317    elif test -f "${new_path}.cmd"; then
40318      input_to_shortpath="${new_path}.cmd"
40319    else
40320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40321$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40324      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40325    fi
40326  else
40327    input_to_shortpath="$new_path"
40328  fi
40329
40330  # Call helper function which possibly converts this using DOS-style short mode.
40331  # If so, the updated path is stored in $new_path.
40332  new_path="$input_to_shortpath"
40333
40334  input_path="$input_to_shortpath"
40335  # Check if we need to convert this using DOS-style short mode. If the path
40336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40337  # take no chances and rewrite it.
40338  # Note: m4 eats our [], so we need to use [ and ] instead.
40339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40340  if test "x$has_forbidden_chars" != x; then
40341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40345      # Going to short mode and back again did indeed matter. Since short mode is
40346      # case insensitive, let's make it lowercase to improve readability.
40347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40348      # Now convert it back to Unix-style (cygpath)
40349      input_path=`$CYGPATH -u "$shortmode_path"`
40350      new_path="$input_path"
40351    fi
40352  fi
40353
40354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40355  if test "x$test_cygdrive_prefix" = x; then
40356    # As a simple fix, exclude /usr/bin since it's not a real path.
40357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40359      # a path prefixed by /cygdrive for fixpath to work.
40360      new_path="$CYGWIN_ROOT_PATH$input_path"
40361    fi
40362  fi
40363
40364  # remove trailing .exe if any
40365  new_path="${new_path/%.exe/}"
40366
40367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40368
40369  # First separate the path from the arguments. This will split at the first
40370  # space.
40371  complete="$GNM"
40372  path="${complete%% *}"
40373  tmp="$complete EOL"
40374  arguments="${tmp#* }"
40375
40376  # Input might be given as Windows format, start by converting to
40377  # unix format.
40378  new_path="$path"
40379
40380  windows_path="$new_path"
40381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40382    unix_path=`$CYGPATH -u "$windows_path"`
40383    new_path="$unix_path"
40384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40386    new_path="$unix_path"
40387  fi
40388
40389
40390  # Now try to locate executable using which
40391  new_path=`$WHICH "$new_path" 2> /dev/null`
40392
40393  if test "x$new_path" = x; then
40394    # Oops. Which didn't find the executable.
40395    # The splitting of arguments from the executable at a space might have been incorrect,
40396    # since paths with space are more likely in Windows. Give it another try with the whole
40397    # argument.
40398    path="$complete"
40399    arguments="EOL"
40400    new_path="$path"
40401
40402  windows_path="$new_path"
40403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40404    unix_path=`$CYGPATH -u "$windows_path"`
40405    new_path="$unix_path"
40406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40408    new_path="$unix_path"
40409  fi
40410
40411
40412    new_path=`$WHICH "$new_path" 2> /dev/null`
40413    # bat and cmd files are not always considered executable in MSYS causing which
40414    # to not find them
40415    if test "x$new_path" = x \
40416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40418      new_path="$path"
40419
40420  windows_path="$new_path"
40421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40422    unix_path=`$CYGPATH -u "$windows_path"`
40423    new_path="$unix_path"
40424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40426    new_path="$unix_path"
40427  fi
40428
40429    fi
40430
40431    if test "x$new_path" = x; then
40432      # It's still not found. Now this is an unrecoverable error.
40433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40434$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40435      has_space=`$ECHO "$complete" | $GREP " "`
40436      if test "x$has_space" != x; then
40437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40439      fi
40440      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40441    fi
40442  fi
40443
40444  # Now new_path has a complete unix path to the binary
40445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40446    # Keep paths in /bin as-is, but remove trailing .exe if any
40447    new_path="${new_path/%.exe/}"
40448    # Do not save /bin paths to all_fixpath_prefixes!
40449  else
40450    # Not in mixed or Windows style, start by that.
40451    new_path=`cmd //c echo $new_path`
40452
40453  input_path="$new_path"
40454  # Check if we need to convert this using DOS-style short mode. If the path
40455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40456  # take no chances and rewrite it.
40457  # Note: m4 eats our [], so we need to use [ and ] instead.
40458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40459  if test "x$has_forbidden_chars" != x; then
40460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40462  fi
40463
40464    # Output is in $new_path
40465
40466  windows_path="$new_path"
40467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40468    unix_path=`$CYGPATH -u "$windows_path"`
40469    new_path="$unix_path"
40470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40472    new_path="$unix_path"
40473  fi
40474
40475    # remove trailing .exe if any
40476    new_path="${new_path/%.exe/}"
40477
40478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40480  fi
40481
40482    else
40483      # We're on a unix platform. Hooray! :)
40484      # First separate the path from the arguments. This will split at the first
40485      # space.
40486      complete="$GNM"
40487      path="${complete%% *}"
40488      tmp="$complete EOL"
40489      arguments="${tmp#* }"
40490
40491      # Cannot rely on the command "which" here since it doesn't always work.
40492      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40493      if test -z "$is_absolute_path"; then
40494        # Path to executable is not absolute. Find it.
40495        IFS_save="$IFS"
40496        IFS=:
40497        for p in $PATH; do
40498          if test -f "$p/$path" && test -x "$p/$path"; then
40499            new_path="$p/$path"
40500            break
40501          fi
40502        done
40503        IFS="$IFS_save"
40504      else
40505        # This is an absolute path, we can use it without further modifications.
40506        new_path="$path"
40507      fi
40508
40509      if test "x$new_path" = x; then
40510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40511$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40512        has_space=`$ECHO "$complete" | $GREP " "`
40513        if test "x$has_space" != x; then
40514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40516        fi
40517        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40518      fi
40519    fi
40520
40521    # Now join together the path and the arguments once again
40522    if test "x$arguments" != xEOL; then
40523      new_complete="$new_path ${arguments% *}"
40524    else
40525      new_complete="$new_path"
40526    fi
40527
40528    if test "x$complete" != "x$new_complete"; then
40529      GNM="$new_complete"
40530      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40531$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40532    fi
40533  fi
40534
40535  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40536    # FIXME: we should unify this with the solaris case above.
40537
40538
40539  # Publish this variable in the help.
40540
40541
40542  if [ -z "${STRIP+x}" ]; then
40543    # The variable is not set by user, try to locate tool using the code snippet
40544    if test -n "$ac_tool_prefix"; then
40545  for ac_prog in strip
40546  do
40547    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40548set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40550$as_echo_n "checking for $ac_word... " >&6; }
40551if ${ac_cv_prog_STRIP+:} false; then :
40552  $as_echo_n "(cached) " >&6
40553else
40554  if test -n "$STRIP"; then
40555  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40556else
40557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40558for as_dir in $PATH
40559do
40560  IFS=$as_save_IFS
40561  test -z "$as_dir" && as_dir=.
40562    for ac_exec_ext in '' $ac_executable_extensions; do
40563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40564    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40566    break 2
40567  fi
40568done
40569  done
40570IFS=$as_save_IFS
40571
40572fi
40573fi
40574STRIP=$ac_cv_prog_STRIP
40575if test -n "$STRIP"; then
40576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40577$as_echo "$STRIP" >&6; }
40578else
40579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40580$as_echo "no" >&6; }
40581fi
40582
40583
40584    test -n "$STRIP" && break
40585  done
40586fi
40587if test -z "$STRIP"; then
40588  ac_ct_STRIP=$STRIP
40589  for ac_prog in strip
40590do
40591  # Extract the first word of "$ac_prog", so it can be a program name with args.
40592set dummy $ac_prog; ac_word=$2
40593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40594$as_echo_n "checking for $ac_word... " >&6; }
40595if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40596  $as_echo_n "(cached) " >&6
40597else
40598  if test -n "$ac_ct_STRIP"; then
40599  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40600else
40601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40602for as_dir in $PATH
40603do
40604  IFS=$as_save_IFS
40605  test -z "$as_dir" && as_dir=.
40606    for ac_exec_ext in '' $ac_executable_extensions; do
40607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40608    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40610    break 2
40611  fi
40612done
40613  done
40614IFS=$as_save_IFS
40615
40616fi
40617fi
40618ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40619if test -n "$ac_ct_STRIP"; then
40620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40621$as_echo "$ac_ct_STRIP" >&6; }
40622else
40623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40624$as_echo "no" >&6; }
40625fi
40626
40627
40628  test -n "$ac_ct_STRIP" && break
40629done
40630
40631  if test "x$ac_ct_STRIP" = x; then
40632    STRIP=""
40633  else
40634    case $cross_compiling:$ac_tool_warned in
40635yes:)
40636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40638ac_tool_warned=yes ;;
40639esac
40640    STRIP=$ac_ct_STRIP
40641  fi
40642fi
40643
40644  else
40645    # The variable is set, but is it from the command line or the environment?
40646
40647    # Try to remove the string !STRIP! from our list.
40648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40650      # If it failed, the variable was not from the command line. Ignore it,
40651      # but warn the user (except for BASH, which is always set by the calling BASH).
40652      if test "xSTRIP" != xBASH; then
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40654$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40655      fi
40656      # Try to locate tool using the code snippet
40657      if test -n "$ac_tool_prefix"; then
40658  for ac_prog in strip
40659  do
40660    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40663$as_echo_n "checking for $ac_word... " >&6; }
40664if ${ac_cv_prog_STRIP+:} false; then :
40665  $as_echo_n "(cached) " >&6
40666else
40667  if test -n "$STRIP"; then
40668  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40669else
40670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40671for as_dir in $PATH
40672do
40673  IFS=$as_save_IFS
40674  test -z "$as_dir" && as_dir=.
40675    for ac_exec_ext in '' $ac_executable_extensions; do
40676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40677    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40679    break 2
40680  fi
40681done
40682  done
40683IFS=$as_save_IFS
40684
40685fi
40686fi
40687STRIP=$ac_cv_prog_STRIP
40688if test -n "$STRIP"; then
40689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40690$as_echo "$STRIP" >&6; }
40691else
40692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40693$as_echo "no" >&6; }
40694fi
40695
40696
40697    test -n "$STRIP" && break
40698  done
40699fi
40700if test -z "$STRIP"; then
40701  ac_ct_STRIP=$STRIP
40702  for ac_prog in strip
40703do
40704  # Extract the first word of "$ac_prog", so it can be a program name with args.
40705set dummy $ac_prog; ac_word=$2
40706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40707$as_echo_n "checking for $ac_word... " >&6; }
40708if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40709  $as_echo_n "(cached) " >&6
40710else
40711  if test -n "$ac_ct_STRIP"; then
40712  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40713else
40714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40715for as_dir in $PATH
40716do
40717  IFS=$as_save_IFS
40718  test -z "$as_dir" && as_dir=.
40719    for ac_exec_ext in '' $ac_executable_extensions; do
40720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40721    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40723    break 2
40724  fi
40725done
40726  done
40727IFS=$as_save_IFS
40728
40729fi
40730fi
40731ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40732if test -n "$ac_ct_STRIP"; then
40733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40734$as_echo "$ac_ct_STRIP" >&6; }
40735else
40736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40737$as_echo "no" >&6; }
40738fi
40739
40740
40741  test -n "$ac_ct_STRIP" && break
40742done
40743
40744  if test "x$ac_ct_STRIP" = x; then
40745    STRIP=""
40746  else
40747    case $cross_compiling:$ac_tool_warned in
40748yes:)
40749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40751ac_tool_warned=yes ;;
40752esac
40753    STRIP=$ac_ct_STRIP
40754  fi
40755fi
40756
40757    else
40758      # If it succeeded, then it was overridden by the user. We will use it
40759      # for the tool.
40760
40761      # First remove it from the list of overridden variables, so we can test
40762      # for unknown variables in the end.
40763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40764
40765      # Check if we try to supply an empty value
40766      if test "x$STRIP" = x; then
40767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40768$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40770$as_echo_n "checking for STRIP... " >&6; }
40771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40772$as_echo "disabled" >&6; }
40773      else
40774        # Check if the provided tool contains a complete path.
40775        tool_specified="$STRIP"
40776        tool_basename="${tool_specified##*/}"
40777        if test "x$tool_basename" = "x$tool_specified"; then
40778          # A command without a complete path is provided, search $PATH.
40779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40780$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40781          # Extract the first word of "$tool_basename", so it can be a program name with args.
40782set dummy $tool_basename; ac_word=$2
40783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40784$as_echo_n "checking for $ac_word... " >&6; }
40785if ${ac_cv_path_STRIP+:} false; then :
40786  $as_echo_n "(cached) " >&6
40787else
40788  case $STRIP in
40789  [\\/]* | ?:[\\/]*)
40790  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40791  ;;
40792  *)
40793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40794for as_dir in $PATH
40795do
40796  IFS=$as_save_IFS
40797  test -z "$as_dir" && as_dir=.
40798    for ac_exec_ext in '' $ac_executable_extensions; do
40799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40800    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40802    break 2
40803  fi
40804done
40805  done
40806IFS=$as_save_IFS
40807
40808  ;;
40809esac
40810fi
40811STRIP=$ac_cv_path_STRIP
40812if test -n "$STRIP"; then
40813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40814$as_echo "$STRIP" >&6; }
40815else
40816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40817$as_echo "no" >&6; }
40818fi
40819
40820
40821          if test "x$STRIP" = x; then
40822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40823          fi
40824        else
40825          # Otherwise we believe it is a complete path. Use it as it is.
40826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40827$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40829$as_echo_n "checking for STRIP... " >&6; }
40830          if test ! -x "$tool_specified"; then
40831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40832$as_echo "not found" >&6; }
40833            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40834          fi
40835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40836$as_echo "$tool_specified" >&6; }
40837        fi
40838      fi
40839    fi
40840
40841  fi
40842
40843
40844
40845  # Only process if variable expands to non-empty
40846
40847  if test "x$STRIP" != x; then
40848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849
40850  # First separate the path from the arguments. This will split at the first
40851  # space.
40852  complete="$STRIP"
40853  path="${complete%% *}"
40854  tmp="$complete EOL"
40855  arguments="${tmp#* }"
40856
40857  # Input might be given as Windows format, start by converting to
40858  # unix format.
40859  new_path=`$CYGPATH -u "$path"`
40860
40861  # Now try to locate executable using which
40862  new_path=`$WHICH "$new_path" 2> /dev/null`
40863  # bat and cmd files are not always considered executable in cygwin causing which
40864  # to not find them
40865  if test "x$new_path" = x \
40866      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40867      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40868    new_path=`$CYGPATH -u "$path"`
40869  fi
40870  if test "x$new_path" = x; then
40871    # Oops. Which didn't find the executable.
40872    # The splitting of arguments from the executable at a space might have been incorrect,
40873    # since paths with space are more likely in Windows. Give it another try with the whole
40874    # argument.
40875    path="$complete"
40876    arguments="EOL"
40877    new_path=`$CYGPATH -u "$path"`
40878    new_path=`$WHICH "$new_path" 2> /dev/null`
40879    # bat and cmd files are not always considered executable in cygwin causing which
40880    # to not find them
40881    if test "x$new_path" = x \
40882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40884      new_path=`$CYGPATH -u "$path"`
40885    fi
40886    if test "x$new_path" = x; then
40887      # It's still not found. Now this is an unrecoverable error.
40888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40889$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40890      has_space=`$ECHO "$complete" | $GREP " "`
40891      if test "x$has_space" != x; then
40892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40894      fi
40895      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40896    fi
40897  fi
40898
40899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40902  # "foo.exe" is OK but "foo" is an error.
40903  #
40904  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40905  # It is also a way to make sure we got the proper file name for the real test later on.
40906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40907  if test "x$test_shortpath" = x; then
40908    # Short path failed, file does not exist as specified.
40909    # Try adding .exe or .cmd
40910    if test -f "${new_path}.exe"; then
40911      input_to_shortpath="${new_path}.exe"
40912    elif test -f "${new_path}.cmd"; then
40913      input_to_shortpath="${new_path}.cmd"
40914    else
40915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40916$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40919      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40920    fi
40921  else
40922    input_to_shortpath="$new_path"
40923  fi
40924
40925  # Call helper function which possibly converts this using DOS-style short mode.
40926  # If so, the updated path is stored in $new_path.
40927  new_path="$input_to_shortpath"
40928
40929  input_path="$input_to_shortpath"
40930  # Check if we need to convert this using DOS-style short mode. If the path
40931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40932  # take no chances and rewrite it.
40933  # Note: m4 eats our [], so we need to use [ and ] instead.
40934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40935  if test "x$has_forbidden_chars" != x; then
40936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40940      # Going to short mode and back again did indeed matter. Since short mode is
40941      # case insensitive, let's make it lowercase to improve readability.
40942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40943      # Now convert it back to Unix-style (cygpath)
40944      input_path=`$CYGPATH -u "$shortmode_path"`
40945      new_path="$input_path"
40946    fi
40947  fi
40948
40949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40950  if test "x$test_cygdrive_prefix" = x; then
40951    # As a simple fix, exclude /usr/bin since it's not a real path.
40952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40954      # a path prefixed by /cygdrive for fixpath to work.
40955      new_path="$CYGWIN_ROOT_PATH$input_path"
40956    fi
40957  fi
40958
40959  # remove trailing .exe if any
40960  new_path="${new_path/%.exe/}"
40961
40962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963
40964  # First separate the path from the arguments. This will split at the first
40965  # space.
40966  complete="$STRIP"
40967  path="${complete%% *}"
40968  tmp="$complete EOL"
40969  arguments="${tmp#* }"
40970
40971  # Input might be given as Windows format, start by converting to
40972  # unix format.
40973  new_path="$path"
40974
40975  windows_path="$new_path"
40976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40977    unix_path=`$CYGPATH -u "$windows_path"`
40978    new_path="$unix_path"
40979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40981    new_path="$unix_path"
40982  fi
40983
40984
40985  # Now try to locate executable using which
40986  new_path=`$WHICH "$new_path" 2> /dev/null`
40987
40988  if test "x$new_path" = x; then
40989    # Oops. Which didn't find the executable.
40990    # The splitting of arguments from the executable at a space might have been incorrect,
40991    # since paths with space are more likely in Windows. Give it another try with the whole
40992    # argument.
40993    path="$complete"
40994    arguments="EOL"
40995    new_path="$path"
40996
40997  windows_path="$new_path"
40998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40999    unix_path=`$CYGPATH -u "$windows_path"`
41000    new_path="$unix_path"
41001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41003    new_path="$unix_path"
41004  fi
41005
41006
41007    new_path=`$WHICH "$new_path" 2> /dev/null`
41008    # bat and cmd files are not always considered executable in MSYS causing which
41009    # to not find them
41010    if test "x$new_path" = x \
41011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41013      new_path="$path"
41014
41015  windows_path="$new_path"
41016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41017    unix_path=`$CYGPATH -u "$windows_path"`
41018    new_path="$unix_path"
41019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41021    new_path="$unix_path"
41022  fi
41023
41024    fi
41025
41026    if test "x$new_path" = x; then
41027      # It's still not found. Now this is an unrecoverable error.
41028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41029$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41030      has_space=`$ECHO "$complete" | $GREP " "`
41031      if test "x$has_space" != x; then
41032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41034      fi
41035      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41036    fi
41037  fi
41038
41039  # Now new_path has a complete unix path to the binary
41040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41041    # Keep paths in /bin as-is, but remove trailing .exe if any
41042    new_path="${new_path/%.exe/}"
41043    # Do not save /bin paths to all_fixpath_prefixes!
41044  else
41045    # Not in mixed or Windows style, start by that.
41046    new_path=`cmd //c echo $new_path`
41047
41048  input_path="$new_path"
41049  # Check if we need to convert this using DOS-style short mode. If the path
41050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41051  # take no chances and rewrite it.
41052  # Note: m4 eats our [], so we need to use [ and ] instead.
41053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41054  if test "x$has_forbidden_chars" != x; then
41055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41057  fi
41058
41059    # Output is in $new_path
41060
41061  windows_path="$new_path"
41062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41063    unix_path=`$CYGPATH -u "$windows_path"`
41064    new_path="$unix_path"
41065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41067    new_path="$unix_path"
41068  fi
41069
41070    # remove trailing .exe if any
41071    new_path="${new_path/%.exe/}"
41072
41073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41075  fi
41076
41077    else
41078      # We're on a unix platform. Hooray! :)
41079      # First separate the path from the arguments. This will split at the first
41080      # space.
41081      complete="$STRIP"
41082      path="${complete%% *}"
41083      tmp="$complete EOL"
41084      arguments="${tmp#* }"
41085
41086      # Cannot rely on the command "which" here since it doesn't always work.
41087      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41088      if test -z "$is_absolute_path"; then
41089        # Path to executable is not absolute. Find it.
41090        IFS_save="$IFS"
41091        IFS=:
41092        for p in $PATH; do
41093          if test -f "$p/$path" && test -x "$p/$path"; then
41094            new_path="$p/$path"
41095            break
41096          fi
41097        done
41098        IFS="$IFS_save"
41099      else
41100        # This is an absolute path, we can use it without further modifications.
41101        new_path="$path"
41102      fi
41103
41104      if test "x$new_path" = x; then
41105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41106$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41107        has_space=`$ECHO "$complete" | $GREP " "`
41108        if test "x$has_space" != x; then
41109          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41111        fi
41112        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41113      fi
41114    fi
41115
41116    # Now join together the path and the arguments once again
41117    if test "x$arguments" != xEOL; then
41118      new_complete="$new_path ${arguments% *}"
41119    else
41120      new_complete="$new_path"
41121    fi
41122
41123    if test "x$complete" != "x$new_complete"; then
41124      STRIP="$new_complete"
41125      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41126$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41127    fi
41128  fi
41129
41130    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41131
41132
41133  # Publish this variable in the help.
41134
41135
41136  if [ -z "${NM+x}" ]; then
41137    # The variable is not set by user, try to locate tool using the code snippet
41138    if test -n "$ac_tool_prefix"; then
41139  for ac_prog in nm gcc-nm
41140  do
41141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41144$as_echo_n "checking for $ac_word... " >&6; }
41145if ${ac_cv_prog_NM+:} false; then :
41146  $as_echo_n "(cached) " >&6
41147else
41148  if test -n "$NM"; then
41149  ac_cv_prog_NM="$NM" # Let the user override the test.
41150else
41151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41152for as_dir in $PATH
41153do
41154  IFS=$as_save_IFS
41155  test -z "$as_dir" && as_dir=.
41156    for ac_exec_ext in '' $ac_executable_extensions; do
41157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41158    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41160    break 2
41161  fi
41162done
41163  done
41164IFS=$as_save_IFS
41165
41166fi
41167fi
41168NM=$ac_cv_prog_NM
41169if test -n "$NM"; then
41170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41171$as_echo "$NM" >&6; }
41172else
41173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41174$as_echo "no" >&6; }
41175fi
41176
41177
41178    test -n "$NM" && break
41179  done
41180fi
41181if test -z "$NM"; then
41182  ac_ct_NM=$NM
41183  for ac_prog in nm gcc-nm
41184do
41185  # Extract the first word of "$ac_prog", so it can be a program name with args.
41186set dummy $ac_prog; ac_word=$2
41187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41188$as_echo_n "checking for $ac_word... " >&6; }
41189if ${ac_cv_prog_ac_ct_NM+:} false; then :
41190  $as_echo_n "(cached) " >&6
41191else
41192  if test -n "$ac_ct_NM"; then
41193  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41194else
41195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41196for as_dir in $PATH
41197do
41198  IFS=$as_save_IFS
41199  test -z "$as_dir" && as_dir=.
41200    for ac_exec_ext in '' $ac_executable_extensions; do
41201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41202    ac_cv_prog_ac_ct_NM="$ac_prog"
41203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41204    break 2
41205  fi
41206done
41207  done
41208IFS=$as_save_IFS
41209
41210fi
41211fi
41212ac_ct_NM=$ac_cv_prog_ac_ct_NM
41213if test -n "$ac_ct_NM"; then
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41215$as_echo "$ac_ct_NM" >&6; }
41216else
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41218$as_echo "no" >&6; }
41219fi
41220
41221
41222  test -n "$ac_ct_NM" && break
41223done
41224
41225  if test "x$ac_ct_NM" = x; then
41226    NM=""
41227  else
41228    case $cross_compiling:$ac_tool_warned in
41229yes:)
41230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41232ac_tool_warned=yes ;;
41233esac
41234    NM=$ac_ct_NM
41235  fi
41236fi
41237
41238  else
41239    # The variable is set, but is it from the command line or the environment?
41240
41241    # Try to remove the string !NM! from our list.
41242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41244      # If it failed, the variable was not from the command line. Ignore it,
41245      # but warn the user (except for BASH, which is always set by the calling BASH).
41246      if test "xNM" != xBASH; then
41247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41248$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41249      fi
41250      # Try to locate tool using the code snippet
41251      if test -n "$ac_tool_prefix"; then
41252  for ac_prog in nm gcc-nm
41253  do
41254    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41255set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41257$as_echo_n "checking for $ac_word... " >&6; }
41258if ${ac_cv_prog_NM+:} false; then :
41259  $as_echo_n "(cached) " >&6
41260else
41261  if test -n "$NM"; then
41262  ac_cv_prog_NM="$NM" # Let the user override the test.
41263else
41264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41265for as_dir in $PATH
41266do
41267  IFS=$as_save_IFS
41268  test -z "$as_dir" && as_dir=.
41269    for ac_exec_ext in '' $ac_executable_extensions; do
41270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41271    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41273    break 2
41274  fi
41275done
41276  done
41277IFS=$as_save_IFS
41278
41279fi
41280fi
41281NM=$ac_cv_prog_NM
41282if test -n "$NM"; then
41283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41284$as_echo "$NM" >&6; }
41285else
41286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41287$as_echo "no" >&6; }
41288fi
41289
41290
41291    test -n "$NM" && break
41292  done
41293fi
41294if test -z "$NM"; then
41295  ac_ct_NM=$NM
41296  for ac_prog in nm gcc-nm
41297do
41298  # Extract the first word of "$ac_prog", so it can be a program name with args.
41299set dummy $ac_prog; ac_word=$2
41300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41301$as_echo_n "checking for $ac_word... " >&6; }
41302if ${ac_cv_prog_ac_ct_NM+:} false; then :
41303  $as_echo_n "(cached) " >&6
41304else
41305  if test -n "$ac_ct_NM"; then
41306  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41307else
41308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41309for as_dir in $PATH
41310do
41311  IFS=$as_save_IFS
41312  test -z "$as_dir" && as_dir=.
41313    for ac_exec_ext in '' $ac_executable_extensions; do
41314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41315    ac_cv_prog_ac_ct_NM="$ac_prog"
41316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41317    break 2
41318  fi
41319done
41320  done
41321IFS=$as_save_IFS
41322
41323fi
41324fi
41325ac_ct_NM=$ac_cv_prog_ac_ct_NM
41326if test -n "$ac_ct_NM"; then
41327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41328$as_echo "$ac_ct_NM" >&6; }
41329else
41330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41331$as_echo "no" >&6; }
41332fi
41333
41334
41335  test -n "$ac_ct_NM" && break
41336done
41337
41338  if test "x$ac_ct_NM" = x; then
41339    NM=""
41340  else
41341    case $cross_compiling:$ac_tool_warned in
41342yes:)
41343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41345ac_tool_warned=yes ;;
41346esac
41347    NM=$ac_ct_NM
41348  fi
41349fi
41350
41351    else
41352      # If it succeeded, then it was overridden by the user. We will use it
41353      # for the tool.
41354
41355      # First remove it from the list of overridden variables, so we can test
41356      # for unknown variables in the end.
41357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41358
41359      # Check if we try to supply an empty value
41360      if test "x$NM" = x; then
41361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41362$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41364$as_echo_n "checking for NM... " >&6; }
41365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41366$as_echo "disabled" >&6; }
41367      else
41368        # Check if the provided tool contains a complete path.
41369        tool_specified="$NM"
41370        tool_basename="${tool_specified##*/}"
41371        if test "x$tool_basename" = "x$tool_specified"; then
41372          # A command without a complete path is provided, search $PATH.
41373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41374$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41375          # Extract the first word of "$tool_basename", so it can be a program name with args.
41376set dummy $tool_basename; ac_word=$2
41377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41378$as_echo_n "checking for $ac_word... " >&6; }
41379if ${ac_cv_path_NM+:} false; then :
41380  $as_echo_n "(cached) " >&6
41381else
41382  case $NM in
41383  [\\/]* | ?:[\\/]*)
41384  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41385  ;;
41386  *)
41387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41388for as_dir in $PATH
41389do
41390  IFS=$as_save_IFS
41391  test -z "$as_dir" && as_dir=.
41392    for ac_exec_ext in '' $ac_executable_extensions; do
41393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41394    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41396    break 2
41397  fi
41398done
41399  done
41400IFS=$as_save_IFS
41401
41402  ;;
41403esac
41404fi
41405NM=$ac_cv_path_NM
41406if test -n "$NM"; then
41407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41408$as_echo "$NM" >&6; }
41409else
41410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41411$as_echo "no" >&6; }
41412fi
41413
41414
41415          if test "x$NM" = x; then
41416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41417          fi
41418        else
41419          # Otherwise we believe it is a complete path. Use it as it is.
41420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41421$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41423$as_echo_n "checking for NM... " >&6; }
41424          if test ! -x "$tool_specified"; then
41425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41426$as_echo "not found" >&6; }
41427            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41428          fi
41429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41430$as_echo "$tool_specified" >&6; }
41431        fi
41432      fi
41433    fi
41434
41435  fi
41436
41437
41438    else
41439
41440
41441  # Publish this variable in the help.
41442
41443
41444  if [ -z "${NM+x}" ]; then
41445    # The variable is not set by user, try to locate tool using the code snippet
41446    if test -n "$ac_tool_prefix"; then
41447  for ac_prog in nm
41448  do
41449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41452$as_echo_n "checking for $ac_word... " >&6; }
41453if ${ac_cv_prog_NM+:} false; then :
41454  $as_echo_n "(cached) " >&6
41455else
41456  if test -n "$NM"; then
41457  ac_cv_prog_NM="$NM" # Let the user override the test.
41458else
41459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41460for as_dir in $PATH
41461do
41462  IFS=$as_save_IFS
41463  test -z "$as_dir" && as_dir=.
41464    for ac_exec_ext in '' $ac_executable_extensions; do
41465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41466    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41468    break 2
41469  fi
41470done
41471  done
41472IFS=$as_save_IFS
41473
41474fi
41475fi
41476NM=$ac_cv_prog_NM
41477if test -n "$NM"; then
41478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41479$as_echo "$NM" >&6; }
41480else
41481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41482$as_echo "no" >&6; }
41483fi
41484
41485
41486    test -n "$NM" && break
41487  done
41488fi
41489if test -z "$NM"; then
41490  ac_ct_NM=$NM
41491  for ac_prog in nm
41492do
41493  # Extract the first word of "$ac_prog", so it can be a program name with args.
41494set dummy $ac_prog; ac_word=$2
41495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41496$as_echo_n "checking for $ac_word... " >&6; }
41497if ${ac_cv_prog_ac_ct_NM+:} false; then :
41498  $as_echo_n "(cached) " >&6
41499else
41500  if test -n "$ac_ct_NM"; then
41501  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41502else
41503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41504for as_dir in $PATH
41505do
41506  IFS=$as_save_IFS
41507  test -z "$as_dir" && as_dir=.
41508    for ac_exec_ext in '' $ac_executable_extensions; do
41509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41510    ac_cv_prog_ac_ct_NM="$ac_prog"
41511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41512    break 2
41513  fi
41514done
41515  done
41516IFS=$as_save_IFS
41517
41518fi
41519fi
41520ac_ct_NM=$ac_cv_prog_ac_ct_NM
41521if test -n "$ac_ct_NM"; then
41522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41523$as_echo "$ac_ct_NM" >&6; }
41524else
41525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41526$as_echo "no" >&6; }
41527fi
41528
41529
41530  test -n "$ac_ct_NM" && break
41531done
41532
41533  if test "x$ac_ct_NM" = x; then
41534    NM=""
41535  else
41536    case $cross_compiling:$ac_tool_warned in
41537yes:)
41538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41540ac_tool_warned=yes ;;
41541esac
41542    NM=$ac_ct_NM
41543  fi
41544fi
41545
41546  else
41547    # The variable is set, but is it from the command line or the environment?
41548
41549    # Try to remove the string !NM! from our list.
41550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41552      # If it failed, the variable was not from the command line. Ignore it,
41553      # but warn the user (except for BASH, which is always set by the calling BASH).
41554      if test "xNM" != xBASH; then
41555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41556$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41557      fi
41558      # Try to locate tool using the code snippet
41559      if test -n "$ac_tool_prefix"; then
41560  for ac_prog in nm
41561  do
41562    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41563set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41565$as_echo_n "checking for $ac_word... " >&6; }
41566if ${ac_cv_prog_NM+:} false; then :
41567  $as_echo_n "(cached) " >&6
41568else
41569  if test -n "$NM"; then
41570  ac_cv_prog_NM="$NM" # Let the user override the test.
41571else
41572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41573for as_dir in $PATH
41574do
41575  IFS=$as_save_IFS
41576  test -z "$as_dir" && as_dir=.
41577    for ac_exec_ext in '' $ac_executable_extensions; do
41578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41579    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41581    break 2
41582  fi
41583done
41584  done
41585IFS=$as_save_IFS
41586
41587fi
41588fi
41589NM=$ac_cv_prog_NM
41590if test -n "$NM"; then
41591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41592$as_echo "$NM" >&6; }
41593else
41594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41595$as_echo "no" >&6; }
41596fi
41597
41598
41599    test -n "$NM" && break
41600  done
41601fi
41602if test -z "$NM"; then
41603  ac_ct_NM=$NM
41604  for ac_prog in nm
41605do
41606  # Extract the first word of "$ac_prog", so it can be a program name with args.
41607set dummy $ac_prog; ac_word=$2
41608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41609$as_echo_n "checking for $ac_word... " >&6; }
41610if ${ac_cv_prog_ac_ct_NM+:} false; then :
41611  $as_echo_n "(cached) " >&6
41612else
41613  if test -n "$ac_ct_NM"; then
41614  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41615else
41616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41617for as_dir in $PATH
41618do
41619  IFS=$as_save_IFS
41620  test -z "$as_dir" && as_dir=.
41621    for ac_exec_ext in '' $ac_executable_extensions; do
41622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41623    ac_cv_prog_ac_ct_NM="$ac_prog"
41624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41625    break 2
41626  fi
41627done
41628  done
41629IFS=$as_save_IFS
41630
41631fi
41632fi
41633ac_ct_NM=$ac_cv_prog_ac_ct_NM
41634if test -n "$ac_ct_NM"; then
41635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41636$as_echo "$ac_ct_NM" >&6; }
41637else
41638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41639$as_echo "no" >&6; }
41640fi
41641
41642
41643  test -n "$ac_ct_NM" && break
41644done
41645
41646  if test "x$ac_ct_NM" = x; then
41647    NM=""
41648  else
41649    case $cross_compiling:$ac_tool_warned in
41650yes:)
41651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41653ac_tool_warned=yes ;;
41654esac
41655    NM=$ac_ct_NM
41656  fi
41657fi
41658
41659    else
41660      # If it succeeded, then it was overridden by the user. We will use it
41661      # for the tool.
41662
41663      # First remove it from the list of overridden variables, so we can test
41664      # for unknown variables in the end.
41665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41666
41667      # Check if we try to supply an empty value
41668      if test "x$NM" = x; then
41669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41670$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41672$as_echo_n "checking for NM... " >&6; }
41673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41674$as_echo "disabled" >&6; }
41675      else
41676        # Check if the provided tool contains a complete path.
41677        tool_specified="$NM"
41678        tool_basename="${tool_specified##*/}"
41679        if test "x$tool_basename" = "x$tool_specified"; then
41680          # A command without a complete path is provided, search $PATH.
41681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41682$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41683          # Extract the first word of "$tool_basename", so it can be a program name with args.
41684set dummy $tool_basename; ac_word=$2
41685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41686$as_echo_n "checking for $ac_word... " >&6; }
41687if ${ac_cv_path_NM+:} false; then :
41688  $as_echo_n "(cached) " >&6
41689else
41690  case $NM in
41691  [\\/]* | ?:[\\/]*)
41692  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41693  ;;
41694  *)
41695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41696for as_dir in $PATH
41697do
41698  IFS=$as_save_IFS
41699  test -z "$as_dir" && as_dir=.
41700    for ac_exec_ext in '' $ac_executable_extensions; do
41701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41702    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41704    break 2
41705  fi
41706done
41707  done
41708IFS=$as_save_IFS
41709
41710  ;;
41711esac
41712fi
41713NM=$ac_cv_path_NM
41714if test -n "$NM"; then
41715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41716$as_echo "$NM" >&6; }
41717else
41718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41719$as_echo "no" >&6; }
41720fi
41721
41722
41723          if test "x$NM" = x; then
41724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41725          fi
41726        else
41727          # Otherwise we believe it is a complete path. Use it as it is.
41728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41729$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41731$as_echo_n "checking for NM... " >&6; }
41732          if test ! -x "$tool_specified"; then
41733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41734$as_echo "not found" >&6; }
41735            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41736          fi
41737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41738$as_echo "$tool_specified" >&6; }
41739        fi
41740      fi
41741    fi
41742
41743  fi
41744
41745
41746    fi
41747
41748  # Only process if variable expands to non-empty
41749
41750  if test "x$NM" != x; then
41751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41752
41753  # First separate the path from the arguments. This will split at the first
41754  # space.
41755  complete="$NM"
41756  path="${complete%% *}"
41757  tmp="$complete EOL"
41758  arguments="${tmp#* }"
41759
41760  # Input might be given as Windows format, start by converting to
41761  # unix format.
41762  new_path=`$CYGPATH -u "$path"`
41763
41764  # Now try to locate executable using which
41765  new_path=`$WHICH "$new_path" 2> /dev/null`
41766  # bat and cmd files are not always considered executable in cygwin causing which
41767  # to not find them
41768  if test "x$new_path" = x \
41769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41771    new_path=`$CYGPATH -u "$path"`
41772  fi
41773  if test "x$new_path" = x; then
41774    # Oops. Which didn't find the executable.
41775    # The splitting of arguments from the executable at a space might have been incorrect,
41776    # since paths with space are more likely in Windows. Give it another try with the whole
41777    # argument.
41778    path="$complete"
41779    arguments="EOL"
41780    new_path=`$CYGPATH -u "$path"`
41781    new_path=`$WHICH "$new_path" 2> /dev/null`
41782    # bat and cmd files are not always considered executable in cygwin causing which
41783    # to not find them
41784    if test "x$new_path" = x \
41785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41787      new_path=`$CYGPATH -u "$path"`
41788    fi
41789    if test "x$new_path" = x; then
41790      # It's still not found. Now this is an unrecoverable error.
41791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41792$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41793      has_space=`$ECHO "$complete" | $GREP " "`
41794      if test "x$has_space" != x; then
41795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41797      fi
41798      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41799    fi
41800  fi
41801
41802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41805  # "foo.exe" is OK but "foo" is an error.
41806  #
41807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41808  # It is also a way to make sure we got the proper file name for the real test later on.
41809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41810  if test "x$test_shortpath" = x; then
41811    # Short path failed, file does not exist as specified.
41812    # Try adding .exe or .cmd
41813    if test -f "${new_path}.exe"; then
41814      input_to_shortpath="${new_path}.exe"
41815    elif test -f "${new_path}.cmd"; then
41816      input_to_shortpath="${new_path}.cmd"
41817    else
41818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41819$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41822      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41823    fi
41824  else
41825    input_to_shortpath="$new_path"
41826  fi
41827
41828  # Call helper function which possibly converts this using DOS-style short mode.
41829  # If so, the updated path is stored in $new_path.
41830  new_path="$input_to_shortpath"
41831
41832  input_path="$input_to_shortpath"
41833  # Check if we need to convert this using DOS-style short mode. If the path
41834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41835  # take no chances and rewrite it.
41836  # Note: m4 eats our [], so we need to use [ and ] instead.
41837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41838  if test "x$has_forbidden_chars" != x; then
41839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41843      # Going to short mode and back again did indeed matter. Since short mode is
41844      # case insensitive, let's make it lowercase to improve readability.
41845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41846      # Now convert it back to Unix-style (cygpath)
41847      input_path=`$CYGPATH -u "$shortmode_path"`
41848      new_path="$input_path"
41849    fi
41850  fi
41851
41852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41853  if test "x$test_cygdrive_prefix" = x; then
41854    # As a simple fix, exclude /usr/bin since it's not a real path.
41855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41857      # a path prefixed by /cygdrive for fixpath to work.
41858      new_path="$CYGWIN_ROOT_PATH$input_path"
41859    fi
41860  fi
41861
41862  # remove trailing .exe if any
41863  new_path="${new_path/%.exe/}"
41864
41865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41866
41867  # First separate the path from the arguments. This will split at the first
41868  # space.
41869  complete="$NM"
41870  path="${complete%% *}"
41871  tmp="$complete EOL"
41872  arguments="${tmp#* }"
41873
41874  # Input might be given as Windows format, start by converting to
41875  # unix format.
41876  new_path="$path"
41877
41878  windows_path="$new_path"
41879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41880    unix_path=`$CYGPATH -u "$windows_path"`
41881    new_path="$unix_path"
41882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41884    new_path="$unix_path"
41885  fi
41886
41887
41888  # Now try to locate executable using which
41889  new_path=`$WHICH "$new_path" 2> /dev/null`
41890
41891  if test "x$new_path" = x; then
41892    # Oops. Which didn't find the executable.
41893    # The splitting of arguments from the executable at a space might have been incorrect,
41894    # since paths with space are more likely in Windows. Give it another try with the whole
41895    # argument.
41896    path="$complete"
41897    arguments="EOL"
41898    new_path="$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
41910    new_path=`$WHICH "$new_path" 2> /dev/null`
41911    # bat and cmd files are not always considered executable in MSYS causing which
41912    # to not find them
41913    if test "x$new_path" = x \
41914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41916      new_path="$path"
41917
41918  windows_path="$new_path"
41919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41920    unix_path=`$CYGPATH -u "$windows_path"`
41921    new_path="$unix_path"
41922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41924    new_path="$unix_path"
41925  fi
41926
41927    fi
41928
41929    if test "x$new_path" = x; then
41930      # It's still not found. Now this is an unrecoverable error.
41931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41932$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41933      has_space=`$ECHO "$complete" | $GREP " "`
41934      if test "x$has_space" != x; then
41935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41937      fi
41938      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41939    fi
41940  fi
41941
41942  # Now new_path has a complete unix path to the binary
41943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41944    # Keep paths in /bin as-is, but remove trailing .exe if any
41945    new_path="${new_path/%.exe/}"
41946    # Do not save /bin paths to all_fixpath_prefixes!
41947  else
41948    # Not in mixed or Windows style, start by that.
41949    new_path=`cmd //c echo $new_path`
41950
41951  input_path="$new_path"
41952  # Check if we need to convert this using DOS-style short mode. If the path
41953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41954  # take no chances and rewrite it.
41955  # Note: m4 eats our [], so we need to use [ and ] instead.
41956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41957  if test "x$has_forbidden_chars" != x; then
41958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41960  fi
41961
41962    # Output is in $new_path
41963
41964  windows_path="$new_path"
41965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41966    unix_path=`$CYGPATH -u "$windows_path"`
41967    new_path="$unix_path"
41968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41970    new_path="$unix_path"
41971  fi
41972
41973    # remove trailing .exe if any
41974    new_path="${new_path/%.exe/}"
41975
41976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41978  fi
41979
41980    else
41981      # We're on a unix platform. Hooray! :)
41982      # First separate the path from the arguments. This will split at the first
41983      # space.
41984      complete="$NM"
41985      path="${complete%% *}"
41986      tmp="$complete EOL"
41987      arguments="${tmp#* }"
41988
41989      # Cannot rely on the command "which" here since it doesn't always work.
41990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41991      if test -z "$is_absolute_path"; then
41992        # Path to executable is not absolute. Find it.
41993        IFS_save="$IFS"
41994        IFS=:
41995        for p in $PATH; do
41996          if test -f "$p/$path" && test -x "$p/$path"; then
41997            new_path="$p/$path"
41998            break
41999          fi
42000        done
42001        IFS="$IFS_save"
42002      else
42003        # This is an absolute path, we can use it without further modifications.
42004        new_path="$path"
42005      fi
42006
42007      if test "x$new_path" = x; then
42008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42009$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42010        has_space=`$ECHO "$complete" | $GREP " "`
42011        if test "x$has_space" != x; then
42012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42014        fi
42015        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42016      fi
42017    fi
42018
42019    # Now join together the path and the arguments once again
42020    if test "x$arguments" != xEOL; then
42021      new_complete="$new_path ${arguments% *}"
42022    else
42023      new_complete="$new_path"
42024    fi
42025
42026    if test "x$complete" != "x$new_complete"; then
42027      NM="$new_complete"
42028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42029$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42030    fi
42031  fi
42032
42033    GNM="$NM"
42034
42035  fi
42036
42037  # objcopy is used for moving debug symbols to separate files when
42038  # full debug symbols are enabled.
42039  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42040
42041
42042  # Publish this variable in the help.
42043
42044
42045  if [ -z "${OBJCOPY+x}" ]; then
42046    # The variable is not set by user, try to locate tool using the code snippet
42047    if test -n "$ac_tool_prefix"; then
42048  for ac_prog in gobjcopy objcopy
42049  do
42050    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42053$as_echo_n "checking for $ac_word... " >&6; }
42054if ${ac_cv_prog_OBJCOPY+:} false; then :
42055  $as_echo_n "(cached) " >&6
42056else
42057  if test -n "$OBJCOPY"; then
42058  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42059else
42060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42061for as_dir in $PATH
42062do
42063  IFS=$as_save_IFS
42064  test -z "$as_dir" && as_dir=.
42065    for ac_exec_ext in '' $ac_executable_extensions; do
42066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42067    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42069    break 2
42070  fi
42071done
42072  done
42073IFS=$as_save_IFS
42074
42075fi
42076fi
42077OBJCOPY=$ac_cv_prog_OBJCOPY
42078if test -n "$OBJCOPY"; then
42079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42080$as_echo "$OBJCOPY" >&6; }
42081else
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42083$as_echo "no" >&6; }
42084fi
42085
42086
42087    test -n "$OBJCOPY" && break
42088  done
42089fi
42090if test -z "$OBJCOPY"; then
42091  ac_ct_OBJCOPY=$OBJCOPY
42092  for ac_prog in gobjcopy objcopy
42093do
42094  # Extract the first word of "$ac_prog", so it can be a program name with args.
42095set dummy $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_ac_ct_OBJCOPY+:} false; then :
42099  $as_echo_n "(cached) " >&6
42100else
42101  if test -n "$ac_ct_OBJCOPY"; then
42102  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # 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_ac_ct_OBJCOPY="$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
42121ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42122if test -n "$ac_ct_OBJCOPY"; then
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42124$as_echo "$ac_ct_OBJCOPY" >&6; }
42125else
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42127$as_echo "no" >&6; }
42128fi
42129
42130
42131  test -n "$ac_ct_OBJCOPY" && break
42132done
42133
42134  if test "x$ac_ct_OBJCOPY" = x; then
42135    OBJCOPY=""
42136  else
42137    case $cross_compiling:$ac_tool_warned in
42138yes:)
42139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42141ac_tool_warned=yes ;;
42142esac
42143    OBJCOPY=$ac_ct_OBJCOPY
42144  fi
42145fi
42146
42147  else
42148    # The variable is set, but is it from the command line or the environment?
42149
42150    # Try to remove the string !OBJCOPY! from our list.
42151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42153      # If it failed, the variable was not from the command line. Ignore it,
42154      # but warn the user (except for BASH, which is always set by the calling BASH).
42155      if test "xOBJCOPY" != xBASH; then
42156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42157$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42158      fi
42159      # Try to locate tool using the code snippet
42160      if test -n "$ac_tool_prefix"; then
42161  for ac_prog in gobjcopy objcopy
42162  do
42163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42166$as_echo_n "checking for $ac_word... " >&6; }
42167if ${ac_cv_prog_OBJCOPY+:} false; then :
42168  $as_echo_n "(cached) " >&6
42169else
42170  if test -n "$OBJCOPY"; then
42171  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42172else
42173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42174for as_dir in $PATH
42175do
42176  IFS=$as_save_IFS
42177  test -z "$as_dir" && as_dir=.
42178    for ac_exec_ext in '' $ac_executable_extensions; do
42179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42180    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42182    break 2
42183  fi
42184done
42185  done
42186IFS=$as_save_IFS
42187
42188fi
42189fi
42190OBJCOPY=$ac_cv_prog_OBJCOPY
42191if test -n "$OBJCOPY"; then
42192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42193$as_echo "$OBJCOPY" >&6; }
42194else
42195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42196$as_echo "no" >&6; }
42197fi
42198
42199
42200    test -n "$OBJCOPY" && break
42201  done
42202fi
42203if test -z "$OBJCOPY"; then
42204  ac_ct_OBJCOPY=$OBJCOPY
42205  for ac_prog in gobjcopy objcopy
42206do
42207  # Extract the first word of "$ac_prog", so it can be a program name with args.
42208set dummy $ac_prog; ac_word=$2
42209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42210$as_echo_n "checking for $ac_word... " >&6; }
42211if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42212  $as_echo_n "(cached) " >&6
42213else
42214  if test -n "$ac_ct_OBJCOPY"; then
42215  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42216else
42217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42218for as_dir in $PATH
42219do
42220  IFS=$as_save_IFS
42221  test -z "$as_dir" && as_dir=.
42222    for ac_exec_ext in '' $ac_executable_extensions; do
42223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42224    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42226    break 2
42227  fi
42228done
42229  done
42230IFS=$as_save_IFS
42231
42232fi
42233fi
42234ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42235if test -n "$ac_ct_OBJCOPY"; then
42236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42237$as_echo "$ac_ct_OBJCOPY" >&6; }
42238else
42239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42240$as_echo "no" >&6; }
42241fi
42242
42243
42244  test -n "$ac_ct_OBJCOPY" && break
42245done
42246
42247  if test "x$ac_ct_OBJCOPY" = x; then
42248    OBJCOPY=""
42249  else
42250    case $cross_compiling:$ac_tool_warned in
42251yes:)
42252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42254ac_tool_warned=yes ;;
42255esac
42256    OBJCOPY=$ac_ct_OBJCOPY
42257  fi
42258fi
42259
42260    else
42261      # If it succeeded, then it was overridden by the user. We will use it
42262      # for the tool.
42263
42264      # First remove it from the list of overridden variables, so we can test
42265      # for unknown variables in the end.
42266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42267
42268      # Check if we try to supply an empty value
42269      if test "x$OBJCOPY" = x; then
42270        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42271$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42272        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42273$as_echo_n "checking for OBJCOPY... " >&6; }
42274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42275$as_echo "disabled" >&6; }
42276      else
42277        # Check if the provided tool contains a complete path.
42278        tool_specified="$OBJCOPY"
42279        tool_basename="${tool_specified##*/}"
42280        if test "x$tool_basename" = "x$tool_specified"; then
42281          # A command without a complete path is provided, search $PATH.
42282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42283$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42284          # Extract the first word of "$tool_basename", so it can be a program name with args.
42285set dummy $tool_basename; ac_word=$2
42286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42287$as_echo_n "checking for $ac_word... " >&6; }
42288if ${ac_cv_path_OBJCOPY+:} false; then :
42289  $as_echo_n "(cached) " >&6
42290else
42291  case $OBJCOPY in
42292  [\\/]* | ?:[\\/]*)
42293  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42294  ;;
42295  *)
42296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42297for as_dir in $PATH
42298do
42299  IFS=$as_save_IFS
42300  test -z "$as_dir" && as_dir=.
42301    for ac_exec_ext in '' $ac_executable_extensions; do
42302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42303    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42305    break 2
42306  fi
42307done
42308  done
42309IFS=$as_save_IFS
42310
42311  ;;
42312esac
42313fi
42314OBJCOPY=$ac_cv_path_OBJCOPY
42315if test -n "$OBJCOPY"; then
42316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42317$as_echo "$OBJCOPY" >&6; }
42318else
42319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42320$as_echo "no" >&6; }
42321fi
42322
42323
42324          if test "x$OBJCOPY" = x; then
42325            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42326          fi
42327        else
42328          # Otherwise we believe it is a complete path. Use it as it is.
42329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42330$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42331          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42332$as_echo_n "checking for OBJCOPY... " >&6; }
42333          if test ! -x "$tool_specified"; then
42334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42335$as_echo "not found" >&6; }
42336            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42337          fi
42338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42339$as_echo "$tool_specified" >&6; }
42340        fi
42341      fi
42342    fi
42343
42344  fi
42345
42346
42347    # Only call fixup if objcopy was found.
42348    if test -n "$OBJCOPY"; then
42349
42350  # Only process if variable expands to non-empty
42351
42352  if test "x$OBJCOPY" != x; then
42353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42354
42355  # First separate the path from the arguments. This will split at the first
42356  # space.
42357  complete="$OBJCOPY"
42358  path="${complete%% *}"
42359  tmp="$complete EOL"
42360  arguments="${tmp#* }"
42361
42362  # Input might be given as Windows format, start by converting to
42363  # unix format.
42364  new_path=`$CYGPATH -u "$path"`
42365
42366  # Now try to locate executable using which
42367  new_path=`$WHICH "$new_path" 2> /dev/null`
42368  # bat and cmd files are not always considered executable in cygwin causing which
42369  # to not find them
42370  if test "x$new_path" = x \
42371      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42372      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42373    new_path=`$CYGPATH -u "$path"`
42374  fi
42375  if test "x$new_path" = x; then
42376    # Oops. Which didn't find the executable.
42377    # The splitting of arguments from the executable at a space might have been incorrect,
42378    # since paths with space are more likely in Windows. Give it another try with the whole
42379    # argument.
42380    path="$complete"
42381    arguments="EOL"
42382    new_path=`$CYGPATH -u "$path"`
42383    new_path=`$WHICH "$new_path" 2> /dev/null`
42384    # bat and cmd files are not always considered executable in cygwin causing which
42385    # to not find them
42386    if test "x$new_path" = x \
42387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42389      new_path=`$CYGPATH -u "$path"`
42390    fi
42391    if test "x$new_path" = x; then
42392      # It's still not found. Now this is an unrecoverable error.
42393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42394$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42395      has_space=`$ECHO "$complete" | $GREP " "`
42396      if test "x$has_space" != x; then
42397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42399      fi
42400      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42401    fi
42402  fi
42403
42404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42407  # "foo.exe" is OK but "foo" is an error.
42408  #
42409  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42410  # It is also a way to make sure we got the proper file name for the real test later on.
42411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42412  if test "x$test_shortpath" = x; then
42413    # Short path failed, file does not exist as specified.
42414    # Try adding .exe or .cmd
42415    if test -f "${new_path}.exe"; then
42416      input_to_shortpath="${new_path}.exe"
42417    elif test -f "${new_path}.cmd"; then
42418      input_to_shortpath="${new_path}.cmd"
42419    else
42420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42421$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42424      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42425    fi
42426  else
42427    input_to_shortpath="$new_path"
42428  fi
42429
42430  # Call helper function which possibly converts this using DOS-style short mode.
42431  # If so, the updated path is stored in $new_path.
42432  new_path="$input_to_shortpath"
42433
42434  input_path="$input_to_shortpath"
42435  # Check if we need to convert this using DOS-style short mode. If the path
42436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42437  # take no chances and rewrite it.
42438  # Note: m4 eats our [], so we need to use [ and ] instead.
42439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42440  if test "x$has_forbidden_chars" != x; then
42441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42445      # Going to short mode and back again did indeed matter. Since short mode is
42446      # case insensitive, let's make it lowercase to improve readability.
42447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42448      # Now convert it back to Unix-style (cygpath)
42449      input_path=`$CYGPATH -u "$shortmode_path"`
42450      new_path="$input_path"
42451    fi
42452  fi
42453
42454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42455  if test "x$test_cygdrive_prefix" = x; then
42456    # As a simple fix, exclude /usr/bin since it's not a real path.
42457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42459      # a path prefixed by /cygdrive for fixpath to work.
42460      new_path="$CYGWIN_ROOT_PATH$input_path"
42461    fi
42462  fi
42463
42464  # remove trailing .exe if any
42465  new_path="${new_path/%.exe/}"
42466
42467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42468
42469  # First separate the path from the arguments. This will split at the first
42470  # space.
42471  complete="$OBJCOPY"
42472  path="${complete%% *}"
42473  tmp="$complete EOL"
42474  arguments="${tmp#* }"
42475
42476  # Input might be given as Windows format, start by converting to
42477  # unix format.
42478  new_path="$path"
42479
42480  windows_path="$new_path"
42481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42482    unix_path=`$CYGPATH -u "$windows_path"`
42483    new_path="$unix_path"
42484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42486    new_path="$unix_path"
42487  fi
42488
42489
42490  # Now try to locate executable using which
42491  new_path=`$WHICH "$new_path" 2> /dev/null`
42492
42493  if test "x$new_path" = x; then
42494    # Oops. Which didn't find the executable.
42495    # The splitting of arguments from the executable at a space might have been incorrect,
42496    # since paths with space are more likely in Windows. Give it another try with the whole
42497    # argument.
42498    path="$complete"
42499    arguments="EOL"
42500    new_path="$path"
42501
42502  windows_path="$new_path"
42503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42504    unix_path=`$CYGPATH -u "$windows_path"`
42505    new_path="$unix_path"
42506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42508    new_path="$unix_path"
42509  fi
42510
42511
42512    new_path=`$WHICH "$new_path" 2> /dev/null`
42513    # bat and cmd files are not always considered executable in MSYS causing which
42514    # to not find them
42515    if test "x$new_path" = x \
42516        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42517        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42518      new_path="$path"
42519
42520  windows_path="$new_path"
42521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42522    unix_path=`$CYGPATH -u "$windows_path"`
42523    new_path="$unix_path"
42524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42526    new_path="$unix_path"
42527  fi
42528
42529    fi
42530
42531    if test "x$new_path" = x; then
42532      # It's still not found. Now this is an unrecoverable error.
42533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42534$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42535      has_space=`$ECHO "$complete" | $GREP " "`
42536      if test "x$has_space" != x; then
42537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42539      fi
42540      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42541    fi
42542  fi
42543
42544  # Now new_path has a complete unix path to the binary
42545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42546    # Keep paths in /bin as-is, but remove trailing .exe if any
42547    new_path="${new_path/%.exe/}"
42548    # Do not save /bin paths to all_fixpath_prefixes!
42549  else
42550    # Not in mixed or Windows style, start by that.
42551    new_path=`cmd //c echo $new_path`
42552
42553  input_path="$new_path"
42554  # Check if we need to convert this using DOS-style short mode. If the path
42555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42556  # take no chances and rewrite it.
42557  # Note: m4 eats our [], so we need to use [ and ] instead.
42558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42559  if test "x$has_forbidden_chars" != x; then
42560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42562  fi
42563
42564    # Output is in $new_path
42565
42566  windows_path="$new_path"
42567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42568    unix_path=`$CYGPATH -u "$windows_path"`
42569    new_path="$unix_path"
42570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42572    new_path="$unix_path"
42573  fi
42574
42575    # remove trailing .exe if any
42576    new_path="${new_path/%.exe/}"
42577
42578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42580  fi
42581
42582    else
42583      # We're on a unix platform. Hooray! :)
42584      # First separate the path from the arguments. This will split at the first
42585      # space.
42586      complete="$OBJCOPY"
42587      path="${complete%% *}"
42588      tmp="$complete EOL"
42589      arguments="${tmp#* }"
42590
42591      # Cannot rely on the command "which" here since it doesn't always work.
42592      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42593      if test -z "$is_absolute_path"; then
42594        # Path to executable is not absolute. Find it.
42595        IFS_save="$IFS"
42596        IFS=:
42597        for p in $PATH; do
42598          if test -f "$p/$path" && test -x "$p/$path"; then
42599            new_path="$p/$path"
42600            break
42601          fi
42602        done
42603        IFS="$IFS_save"
42604      else
42605        # This is an absolute path, we can use it without further modifications.
42606        new_path="$path"
42607      fi
42608
42609      if test "x$new_path" = x; then
42610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42611$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42612        has_space=`$ECHO "$complete" | $GREP " "`
42613        if test "x$has_space" != x; then
42614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42616        fi
42617        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42618      fi
42619    fi
42620
42621    # Now join together the path and the arguments once again
42622    if test "x$arguments" != xEOL; then
42623      new_complete="$new_path ${arguments% *}"
42624    else
42625      new_complete="$new_path"
42626    fi
42627
42628    if test "x$complete" != "x$new_complete"; then
42629      OBJCOPY="$new_complete"
42630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42631$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42632    fi
42633  fi
42634
42635      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42636        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42637        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42638        # - version number is last blank separate word on first line
42639        # - version number formats that have been seen:
42640        #   - <major>.<minor>
42641        #   - <major>.<minor>.<micro>
42642        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42643        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42644         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42645              -e 's/.* //' \
42646              -e '/^[01]\./b bad' \
42647              -e '/^2\./{' \
42648              -e '  s/^2\.//' \
42649              -e '  /^[0-9]$/b bad' \
42650              -e '  /^[0-9]\./b bad' \
42651              -e '  /^1[0-9]$/b bad' \
42652              -e '  /^1[0-9]\./b bad' \
42653              -e '  /^20\./b bad' \
42654              -e '  /^21\.0$/b bad' \
42655              -e '  /^21\.0\./b bad' \
42656              -e '}' \
42657              -e ':good' \
42658              -e 's/.*/VALID_VERSION/p' \
42659              -e 'q' \
42660              -e ':bad' \
42661              -e 's/.*/BAD_VERSION/p' \
42662              -e 'q'`
42663        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42664          OBJCOPY=
42665          { $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
42666$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42667          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42668$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42669          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42670$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42671          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42672$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42673          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42674$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42675        fi
42676      fi
42677    fi
42678  fi
42679
42680
42681
42682  # Publish this variable in the help.
42683
42684
42685  if [ -z "${OBJDUMP+x}" ]; then
42686    # The variable is not set by user, try to locate tool using the code snippet
42687    if test -n "$ac_tool_prefix"; then
42688  for ac_prog in gobjdump objdump
42689  do
42690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42693$as_echo_n "checking for $ac_word... " >&6; }
42694if ${ac_cv_prog_OBJDUMP+:} false; then :
42695  $as_echo_n "(cached) " >&6
42696else
42697  if test -n "$OBJDUMP"; then
42698  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42699else
42700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42701for as_dir in $PATH
42702do
42703  IFS=$as_save_IFS
42704  test -z "$as_dir" && as_dir=.
42705    for ac_exec_ext in '' $ac_executable_extensions; do
42706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42707    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42709    break 2
42710  fi
42711done
42712  done
42713IFS=$as_save_IFS
42714
42715fi
42716fi
42717OBJDUMP=$ac_cv_prog_OBJDUMP
42718if test -n "$OBJDUMP"; then
42719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42720$as_echo "$OBJDUMP" >&6; }
42721else
42722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42723$as_echo "no" >&6; }
42724fi
42725
42726
42727    test -n "$OBJDUMP" && break
42728  done
42729fi
42730if test -z "$OBJDUMP"; then
42731  ac_ct_OBJDUMP=$OBJDUMP
42732  for ac_prog in gobjdump objdump
42733do
42734  # Extract the first word of "$ac_prog", so it can be a program name with args.
42735set dummy $ac_prog; ac_word=$2
42736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42737$as_echo_n "checking for $ac_word... " >&6; }
42738if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42739  $as_echo_n "(cached) " >&6
42740else
42741  if test -n "$ac_ct_OBJDUMP"; then
42742  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42743else
42744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42745for as_dir in $PATH
42746do
42747  IFS=$as_save_IFS
42748  test -z "$as_dir" && as_dir=.
42749    for ac_exec_ext in '' $ac_executable_extensions; do
42750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42751    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42753    break 2
42754  fi
42755done
42756  done
42757IFS=$as_save_IFS
42758
42759fi
42760fi
42761ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42762if test -n "$ac_ct_OBJDUMP"; then
42763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42764$as_echo "$ac_ct_OBJDUMP" >&6; }
42765else
42766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42767$as_echo "no" >&6; }
42768fi
42769
42770
42771  test -n "$ac_ct_OBJDUMP" && break
42772done
42773
42774  if test "x$ac_ct_OBJDUMP" = x; then
42775    OBJDUMP=""
42776  else
42777    case $cross_compiling:$ac_tool_warned in
42778yes:)
42779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42781ac_tool_warned=yes ;;
42782esac
42783    OBJDUMP=$ac_ct_OBJDUMP
42784  fi
42785fi
42786
42787  else
42788    # The variable is set, but is it from the command line or the environment?
42789
42790    # Try to remove the string !OBJDUMP! from our list.
42791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42793      # If it failed, the variable was not from the command line. Ignore it,
42794      # but warn the user (except for BASH, which is always set by the calling BASH).
42795      if test "xOBJDUMP" != xBASH; then
42796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42797$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42798      fi
42799      # Try to locate tool using the code snippet
42800      if test -n "$ac_tool_prefix"; then
42801  for ac_prog in gobjdump objdump
42802  do
42803    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42806$as_echo_n "checking for $ac_word... " >&6; }
42807if ${ac_cv_prog_OBJDUMP+:} false; then :
42808  $as_echo_n "(cached) " >&6
42809else
42810  if test -n "$OBJDUMP"; then
42811  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42812else
42813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42814for as_dir in $PATH
42815do
42816  IFS=$as_save_IFS
42817  test -z "$as_dir" && as_dir=.
42818    for ac_exec_ext in '' $ac_executable_extensions; do
42819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42820    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42822    break 2
42823  fi
42824done
42825  done
42826IFS=$as_save_IFS
42827
42828fi
42829fi
42830OBJDUMP=$ac_cv_prog_OBJDUMP
42831if test -n "$OBJDUMP"; then
42832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42833$as_echo "$OBJDUMP" >&6; }
42834else
42835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42836$as_echo "no" >&6; }
42837fi
42838
42839
42840    test -n "$OBJDUMP" && break
42841  done
42842fi
42843if test -z "$OBJDUMP"; then
42844  ac_ct_OBJDUMP=$OBJDUMP
42845  for ac_prog in gobjdump objdump
42846do
42847  # Extract the first word of "$ac_prog", so it can be a program name with args.
42848set dummy $ac_prog; ac_word=$2
42849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42850$as_echo_n "checking for $ac_word... " >&6; }
42851if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42852  $as_echo_n "(cached) " >&6
42853else
42854  if test -n "$ac_ct_OBJDUMP"; then
42855  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42856else
42857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42858for as_dir in $PATH
42859do
42860  IFS=$as_save_IFS
42861  test -z "$as_dir" && as_dir=.
42862    for ac_exec_ext in '' $ac_executable_extensions; do
42863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42864    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42866    break 2
42867  fi
42868done
42869  done
42870IFS=$as_save_IFS
42871
42872fi
42873fi
42874ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42875if test -n "$ac_ct_OBJDUMP"; then
42876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42877$as_echo "$ac_ct_OBJDUMP" >&6; }
42878else
42879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42880$as_echo "no" >&6; }
42881fi
42882
42883
42884  test -n "$ac_ct_OBJDUMP" && break
42885done
42886
42887  if test "x$ac_ct_OBJDUMP" = x; then
42888    OBJDUMP=""
42889  else
42890    case $cross_compiling:$ac_tool_warned in
42891yes:)
42892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42894ac_tool_warned=yes ;;
42895esac
42896    OBJDUMP=$ac_ct_OBJDUMP
42897  fi
42898fi
42899
42900    else
42901      # If it succeeded, then it was overridden by the user. We will use it
42902      # for the tool.
42903
42904      # First remove it from the list of overridden variables, so we can test
42905      # for unknown variables in the end.
42906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42907
42908      # Check if we try to supply an empty value
42909      if test "x$OBJDUMP" = x; then
42910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42911$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42913$as_echo_n "checking for OBJDUMP... " >&6; }
42914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42915$as_echo "disabled" >&6; }
42916      else
42917        # Check if the provided tool contains a complete path.
42918        tool_specified="$OBJDUMP"
42919        tool_basename="${tool_specified##*/}"
42920        if test "x$tool_basename" = "x$tool_specified"; then
42921          # A command without a complete path is provided, search $PATH.
42922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42923$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42924          # Extract the first word of "$tool_basename", so it can be a program name with args.
42925set dummy $tool_basename; ac_word=$2
42926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42927$as_echo_n "checking for $ac_word... " >&6; }
42928if ${ac_cv_path_OBJDUMP+:} false; then :
42929  $as_echo_n "(cached) " >&6
42930else
42931  case $OBJDUMP in
42932  [\\/]* | ?:[\\/]*)
42933  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42934  ;;
42935  *)
42936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42937for as_dir in $PATH
42938do
42939  IFS=$as_save_IFS
42940  test -z "$as_dir" && as_dir=.
42941    for ac_exec_ext in '' $ac_executable_extensions; do
42942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42943    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42945    break 2
42946  fi
42947done
42948  done
42949IFS=$as_save_IFS
42950
42951  ;;
42952esac
42953fi
42954OBJDUMP=$ac_cv_path_OBJDUMP
42955if test -n "$OBJDUMP"; then
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42957$as_echo "$OBJDUMP" >&6; }
42958else
42959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42960$as_echo "no" >&6; }
42961fi
42962
42963
42964          if test "x$OBJDUMP" = x; then
42965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42966          fi
42967        else
42968          # Otherwise we believe it is a complete path. Use it as it is.
42969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42970$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42972$as_echo_n "checking for OBJDUMP... " >&6; }
42973          if test ! -x "$tool_specified"; then
42974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42975$as_echo "not found" >&6; }
42976            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42977          fi
42978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42979$as_echo "$tool_specified" >&6; }
42980        fi
42981      fi
42982    fi
42983
42984  fi
42985
42986
42987  if test "x$OBJDUMP" != x; then
42988    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42989    # bails if argument is missing.
42990
42991  # Only process if variable expands to non-empty
42992
42993  if test "x$OBJDUMP" != x; then
42994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42995
42996  # First separate the path from the arguments. This will split at the first
42997  # space.
42998  complete="$OBJDUMP"
42999  path="${complete%% *}"
43000  tmp="$complete EOL"
43001  arguments="${tmp#* }"
43002
43003  # Input might be given as Windows format, start by converting to
43004  # unix format.
43005  new_path=`$CYGPATH -u "$path"`
43006
43007  # Now try to locate executable using which
43008  new_path=`$WHICH "$new_path" 2> /dev/null`
43009  # bat and cmd files are not always considered executable in cygwin causing which
43010  # to not find them
43011  if test "x$new_path" = x \
43012      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43013      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43014    new_path=`$CYGPATH -u "$path"`
43015  fi
43016  if test "x$new_path" = x; then
43017    # Oops. Which didn't find the executable.
43018    # The splitting of arguments from the executable at a space might have been incorrect,
43019    # since paths with space are more likely in Windows. Give it another try with the whole
43020    # argument.
43021    path="$complete"
43022    arguments="EOL"
43023    new_path=`$CYGPATH -u "$path"`
43024    new_path=`$WHICH "$new_path" 2> /dev/null`
43025    # bat and cmd files are not always considered executable in cygwin causing which
43026    # to not find them
43027    if test "x$new_path" = x \
43028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43030      new_path=`$CYGPATH -u "$path"`
43031    fi
43032    if test "x$new_path" = x; then
43033      # It's still not found. Now this is an unrecoverable error.
43034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43035$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43036      has_space=`$ECHO "$complete" | $GREP " "`
43037      if test "x$has_space" != x; then
43038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43040      fi
43041      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43042    fi
43043  fi
43044
43045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43048  # "foo.exe" is OK but "foo" is an error.
43049  #
43050  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43051  # It is also a way to make sure we got the proper file name for the real test later on.
43052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43053  if test "x$test_shortpath" = x; then
43054    # Short path failed, file does not exist as specified.
43055    # Try adding .exe or .cmd
43056    if test -f "${new_path}.exe"; then
43057      input_to_shortpath="${new_path}.exe"
43058    elif test -f "${new_path}.cmd"; then
43059      input_to_shortpath="${new_path}.cmd"
43060    else
43061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43062$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43063      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43065      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43066    fi
43067  else
43068    input_to_shortpath="$new_path"
43069  fi
43070
43071  # Call helper function which possibly converts this using DOS-style short mode.
43072  # If so, the updated path is stored in $new_path.
43073  new_path="$input_to_shortpath"
43074
43075  input_path="$input_to_shortpath"
43076  # Check if we need to convert this using DOS-style short mode. If the path
43077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43078  # take no chances and rewrite it.
43079  # Note: m4 eats our [], so we need to use [ and ] instead.
43080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43081  if test "x$has_forbidden_chars" != x; then
43082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43086      # Going to short mode and back again did indeed matter. Since short mode is
43087      # case insensitive, let's make it lowercase to improve readability.
43088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43089      # Now convert it back to Unix-style (cygpath)
43090      input_path=`$CYGPATH -u "$shortmode_path"`
43091      new_path="$input_path"
43092    fi
43093  fi
43094
43095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43096  if test "x$test_cygdrive_prefix" = x; then
43097    # As a simple fix, exclude /usr/bin since it's not a real path.
43098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43100      # a path prefixed by /cygdrive for fixpath to work.
43101      new_path="$CYGWIN_ROOT_PATH$input_path"
43102    fi
43103  fi
43104
43105  # remove trailing .exe if any
43106  new_path="${new_path/%.exe/}"
43107
43108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43109
43110  # First separate the path from the arguments. This will split at the first
43111  # space.
43112  complete="$OBJDUMP"
43113  path="${complete%% *}"
43114  tmp="$complete EOL"
43115  arguments="${tmp#* }"
43116
43117  # Input might be given as Windows format, start by converting to
43118  # unix format.
43119  new_path="$path"
43120
43121  windows_path="$new_path"
43122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43123    unix_path=`$CYGPATH -u "$windows_path"`
43124    new_path="$unix_path"
43125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43127    new_path="$unix_path"
43128  fi
43129
43130
43131  # Now try to locate executable using which
43132  new_path=`$WHICH "$new_path" 2> /dev/null`
43133
43134  if test "x$new_path" = x; then
43135    # Oops. Which didn't find the executable.
43136    # The splitting of arguments from the executable at a space might have been incorrect,
43137    # since paths with space are more likely in Windows. Give it another try with the whole
43138    # argument.
43139    path="$complete"
43140    arguments="EOL"
43141    new_path="$path"
43142
43143  windows_path="$new_path"
43144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43145    unix_path=`$CYGPATH -u "$windows_path"`
43146    new_path="$unix_path"
43147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43149    new_path="$unix_path"
43150  fi
43151
43152
43153    new_path=`$WHICH "$new_path" 2> /dev/null`
43154    # bat and cmd files are not always considered executable in MSYS causing which
43155    # to not find them
43156    if test "x$new_path" = x \
43157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43159      new_path="$path"
43160
43161  windows_path="$new_path"
43162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43163    unix_path=`$CYGPATH -u "$windows_path"`
43164    new_path="$unix_path"
43165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43167    new_path="$unix_path"
43168  fi
43169
43170    fi
43171
43172    if test "x$new_path" = x; then
43173      # It's still not found. Now this is an unrecoverable error.
43174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43175$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43176      has_space=`$ECHO "$complete" | $GREP " "`
43177      if test "x$has_space" != x; then
43178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43180      fi
43181      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43182    fi
43183  fi
43184
43185  # Now new_path has a complete unix path to the binary
43186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43187    # Keep paths in /bin as-is, but remove trailing .exe if any
43188    new_path="${new_path/%.exe/}"
43189    # Do not save /bin paths to all_fixpath_prefixes!
43190  else
43191    # Not in mixed or Windows style, start by that.
43192    new_path=`cmd //c echo $new_path`
43193
43194  input_path="$new_path"
43195  # Check if we need to convert this using DOS-style short mode. If the path
43196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43197  # take no chances and rewrite it.
43198  # Note: m4 eats our [], so we need to use [ and ] instead.
43199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43200  if test "x$has_forbidden_chars" != x; then
43201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43203  fi
43204
43205    # Output is in $new_path
43206
43207  windows_path="$new_path"
43208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43209    unix_path=`$CYGPATH -u "$windows_path"`
43210    new_path="$unix_path"
43211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43213    new_path="$unix_path"
43214  fi
43215
43216    # remove trailing .exe if any
43217    new_path="${new_path/%.exe/}"
43218
43219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43221  fi
43222
43223    else
43224      # We're on a unix platform. Hooray! :)
43225      # First separate the path from the arguments. This will split at the first
43226      # space.
43227      complete="$OBJDUMP"
43228      path="${complete%% *}"
43229      tmp="$complete EOL"
43230      arguments="${tmp#* }"
43231
43232      # Cannot rely on the command "which" here since it doesn't always work.
43233      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43234      if test -z "$is_absolute_path"; then
43235        # Path to executable is not absolute. Find it.
43236        IFS_save="$IFS"
43237        IFS=:
43238        for p in $PATH; do
43239          if test -f "$p/$path" && test -x "$p/$path"; then
43240            new_path="$p/$path"
43241            break
43242          fi
43243        done
43244        IFS="$IFS_save"
43245      else
43246        # This is an absolute path, we can use it without further modifications.
43247        new_path="$path"
43248      fi
43249
43250      if test "x$new_path" = x; then
43251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43252$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43253        has_space=`$ECHO "$complete" | $GREP " "`
43254        if test "x$has_space" != x; then
43255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43257        fi
43258        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43259      fi
43260    fi
43261
43262    # Now join together the path and the arguments once again
43263    if test "x$arguments" != xEOL; then
43264      new_complete="$new_path ${arguments% *}"
43265    else
43266      new_complete="$new_path"
43267    fi
43268
43269    if test "x$complete" != "x$new_complete"; then
43270      OBJDUMP="$new_complete"
43271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43272$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43273    fi
43274  fi
43275
43276  fi
43277
43278
43279  # Restore old path.
43280  PATH="$OLD_PATH"
43281
43282  # Restore the flags to the user specified values.
43283  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43284  CFLAGS="$ORG_CFLAGS"
43285  CXXFLAGS="$ORG_CXXFLAGS"
43286
43287
43288# Finally do some processing after the detection phase
43289
43290  if test "x$COMPILE_TYPE" = "xcross"; then
43291    # Now we need to find a C/C++ compiler that can build executables for the
43292    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43293    # used once. Also, we need to do this without adding a tools dir to the
43294    # path, otherwise we might pick up cross-compilers which don't use standard
43295    # naming.
43296
43297    OLDPATH="$PATH"
43298
43299
43300# Check whether --with-build-devkit was given.
43301if test "${with_build_devkit+set}" = set; then :
43302  withval=$with_build_devkit;
43303fi
43304
43305    if test "x$with_build_devkit" = "xyes"; then
43306      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43307    elif test -n "$with_build_devkit"; then
43308      if test ! -d "$with_build_devkit"; then
43309        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43310      else
43311
43312  # Only process if variable expands to non-empty
43313
43314  if test "x$with_build_devkit" != x; then
43315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43316
43317  # Input might be given as Windows format, start by converting to
43318  # unix format.
43319  path="$with_build_devkit"
43320  new_path=`$CYGPATH -u "$path"`
43321
43322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43325  # "foo.exe" is OK but "foo" is an error.
43326  #
43327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43328  # It is also a way to make sure we got the proper file name for the real test later on.
43329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43330  if test "x$test_shortpath" = x; then
43331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43332$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43333    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43334  fi
43335
43336  # Call helper function which possibly converts this using DOS-style short mode.
43337  # If so, the updated path is stored in $new_path.
43338
43339  input_path="$new_path"
43340  # Check if we need to convert this using DOS-style short mode. If the path
43341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43342  # take no chances and rewrite it.
43343  # Note: m4 eats our [], so we need to use [ and ] instead.
43344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43345  if test "x$has_forbidden_chars" != x; then
43346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43350      # Going to short mode and back again did indeed matter. Since short mode is
43351      # case insensitive, let's make it lowercase to improve readability.
43352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43353      # Now convert it back to Unix-style (cygpath)
43354      input_path=`$CYGPATH -u "$shortmode_path"`
43355      new_path="$input_path"
43356    fi
43357  fi
43358
43359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43360  if test "x$test_cygdrive_prefix" = x; then
43361    # As a simple fix, exclude /usr/bin since it's not a real path.
43362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43364      # a path prefixed by /cygdrive for fixpath to work.
43365      new_path="$CYGWIN_ROOT_PATH$input_path"
43366    fi
43367  fi
43368
43369
43370  if test "x$path" != "x$new_path"; then
43371    with_build_devkit="$new_path"
43372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43373$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43374  fi
43375
43376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43377
43378  path="$with_build_devkit"
43379  has_colon=`$ECHO $path | $GREP ^.:`
43380  new_path="$path"
43381  if test "x$has_colon" = x; then
43382    # Not in mixed or Windows style, start by that.
43383    new_path=`cmd //c echo $path`
43384  fi
43385
43386
43387  input_path="$new_path"
43388  # Check if we need to convert this using DOS-style short mode. If the path
43389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43390  # take no chances and rewrite it.
43391  # Note: m4 eats our [], so we need to use [ and ] instead.
43392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43393  if test "x$has_forbidden_chars" != x; then
43394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43396  fi
43397
43398
43399  windows_path="$new_path"
43400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43401    unix_path=`$CYGPATH -u "$windows_path"`
43402    new_path="$unix_path"
43403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43405    new_path="$unix_path"
43406  fi
43407
43408  if test "x$path" != "x$new_path"; then
43409    with_build_devkit="$new_path"
43410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43411$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43412  fi
43413
43414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43416
43417    else
43418      # We're on a unix platform. Hooray! :)
43419      path="$with_build_devkit"
43420      has_space=`$ECHO "$path" | $GREP " "`
43421      if test "x$has_space" != x; then
43422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43423$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43425      fi
43426
43427      # Use eval to expand a potential ~
43428      eval path="$path"
43429      if test ! -f "$path" && test ! -d "$path"; then
43430        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43431      fi
43432
43433      if test -d "$path"; then
43434        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43435      else
43436        dir="`$DIRNAME "$path"`"
43437        base="`$BASENAME "$path"`"
43438        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43439      fi
43440    fi
43441  fi
43442
43443        BUILD_DEVKIT_ROOT="$with_build_devkit"
43444        # Check for a meta data info file in the root of the devkit
43445        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43446          # Process devkit.info so that existing devkit variables are not
43447          # modified by this
43448          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43449              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43450              -e "s/\$host/\$build/g" \
43451              $BUILD_DEVKIT_ROOT/devkit.info \
43452              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43453          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43454          # This potentially sets the following:
43455          # A descriptive name of the devkit
43456
43457  if test "x$BUILD_DEVKIT_NAME" = x; then
43458    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43459  fi
43460
43461          # Corresponds to --with-extra-path
43462
43463  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43464    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43465  fi
43466
43467          # Corresponds to --with-toolchain-path
43468
43469  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43470    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43471  fi
43472
43473          # Corresponds to --with-sysroot
43474
43475  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43476    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43477  fi
43478
43479          # Skip the Window specific parts
43480        fi
43481
43482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43483$as_echo_n "checking for build platform devkit... " >&6; }
43484        if test "x$BUILD_DEVKIT_NAME" != x; then
43485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43486$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43487        else
43488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43489$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43490        fi
43491
43492        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43493
43494  if test "x$BUILD_SYSROOT" != "x"; then
43495    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43496      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43497        # Solaris Studio does not have a concept of sysroot. Instead we must
43498        # make sure the default include and lib dirs are appended to each
43499        # compile and link command line. Must also add -I-xbuiltin to enable
43500        # inlining of system functions and intrinsics.
43501        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43502        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43503            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43504            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43505      fi
43506    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43507      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43508      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43509    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43510      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43511      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43512    fi
43513    # Propagate the sysroot args to hotspot
43514    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43515    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43516    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43517    # The global CFLAGS and LDFLAGS variables need these for configure to function
43518    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43519    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43520    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43521    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43522  fi
43523
43524  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43525    # We also need -iframework<path>/System/Library/Frameworks
43526    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43527    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43528    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43529    # set this here so it doesn't have to be peppered throughout the forest
43530    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43531    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43532  fi
43533
43534
43535
43536
43537
43538         # Fallback default of just /bin if DEVKIT_PATH is not defined
43539        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43540          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43541        fi
43542        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43543      fi
43544    fi
43545
43546    # FIXME: we should list the discovered compilers as an exclude pattern!
43547    # If we do that, we can do this detection before POST_DETECTION, and still
43548    # find the build compilers in the tools dir, if needed.
43549
43550
43551
43552  # Publish this variable in the help.
43553
43554
43555  if [ -z "${BUILD_CC+x}" ]; then
43556    # The variable is not set by user, try to locate tool using the code snippet
43557    for ac_prog in cl cc gcc
43558do
43559  # Extract the first word of "$ac_prog", so it can be a program name with args.
43560set dummy $ac_prog; ac_word=$2
43561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43562$as_echo_n "checking for $ac_word... " >&6; }
43563if ${ac_cv_path_BUILD_CC+:} false; then :
43564  $as_echo_n "(cached) " >&6
43565else
43566  case $BUILD_CC in
43567  [\\/]* | ?:[\\/]*)
43568  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43569  ;;
43570  *)
43571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43572for as_dir in $PATH
43573do
43574  IFS=$as_save_IFS
43575  test -z "$as_dir" && as_dir=.
43576    for ac_exec_ext in '' $ac_executable_extensions; do
43577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43578    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43580    break 2
43581  fi
43582done
43583  done
43584IFS=$as_save_IFS
43585
43586  ;;
43587esac
43588fi
43589BUILD_CC=$ac_cv_path_BUILD_CC
43590if test -n "$BUILD_CC"; then
43591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43592$as_echo "$BUILD_CC" >&6; }
43593else
43594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43595$as_echo "no" >&6; }
43596fi
43597
43598
43599  test -n "$BUILD_CC" && break
43600done
43601
43602  else
43603    # The variable is set, but is it from the command line or the environment?
43604
43605    # Try to remove the string !BUILD_CC! from our list.
43606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43608      # If it failed, the variable was not from the command line. Ignore it,
43609      # but warn the user (except for BASH, which is always set by the calling BASH).
43610      if test "xBUILD_CC" != xBASH; then
43611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43612$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43613      fi
43614      # Try to locate tool using the code snippet
43615      for ac_prog in cl cc gcc
43616do
43617  # Extract the first word of "$ac_prog", so it can be a program name with args.
43618set dummy $ac_prog; ac_word=$2
43619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43620$as_echo_n "checking for $ac_word... " >&6; }
43621if ${ac_cv_path_BUILD_CC+:} false; then :
43622  $as_echo_n "(cached) " >&6
43623else
43624  case $BUILD_CC in
43625  [\\/]* | ?:[\\/]*)
43626  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43627  ;;
43628  *)
43629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43630for as_dir in $PATH
43631do
43632  IFS=$as_save_IFS
43633  test -z "$as_dir" && as_dir=.
43634    for ac_exec_ext in '' $ac_executable_extensions; do
43635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43636    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43638    break 2
43639  fi
43640done
43641  done
43642IFS=$as_save_IFS
43643
43644  ;;
43645esac
43646fi
43647BUILD_CC=$ac_cv_path_BUILD_CC
43648if test -n "$BUILD_CC"; then
43649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43650$as_echo "$BUILD_CC" >&6; }
43651else
43652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43653$as_echo "no" >&6; }
43654fi
43655
43656
43657  test -n "$BUILD_CC" && break
43658done
43659
43660    else
43661      # If it succeeded, then it was overridden by the user. We will use it
43662      # for the tool.
43663
43664      # First remove it from the list of overridden variables, so we can test
43665      # for unknown variables in the end.
43666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43667
43668      # Check if we try to supply an empty value
43669      if test "x$BUILD_CC" = x; then
43670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43671$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43673$as_echo_n "checking for BUILD_CC... " >&6; }
43674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43675$as_echo "disabled" >&6; }
43676      else
43677        # Check if the provided tool contains a complete path.
43678        tool_specified="$BUILD_CC"
43679        tool_basename="${tool_specified##*/}"
43680        if test "x$tool_basename" = "x$tool_specified"; then
43681          # A command without a complete path is provided, search $PATH.
43682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43683$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43684          # Extract the first word of "$tool_basename", so it can be a program name with args.
43685set dummy $tool_basename; ac_word=$2
43686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43687$as_echo_n "checking for $ac_word... " >&6; }
43688if ${ac_cv_path_BUILD_CC+:} false; then :
43689  $as_echo_n "(cached) " >&6
43690else
43691  case $BUILD_CC in
43692  [\\/]* | ?:[\\/]*)
43693  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43694  ;;
43695  *)
43696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43697for as_dir in $PATH
43698do
43699  IFS=$as_save_IFS
43700  test -z "$as_dir" && as_dir=.
43701    for ac_exec_ext in '' $ac_executable_extensions; do
43702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43703    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43705    break 2
43706  fi
43707done
43708  done
43709IFS=$as_save_IFS
43710
43711  ;;
43712esac
43713fi
43714BUILD_CC=$ac_cv_path_BUILD_CC
43715if test -n "$BUILD_CC"; then
43716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43717$as_echo "$BUILD_CC" >&6; }
43718else
43719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43720$as_echo "no" >&6; }
43721fi
43722
43723
43724          if test "x$BUILD_CC" = x; then
43725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43726          fi
43727        else
43728          # Otherwise we believe it is a complete path. Use it as it is.
43729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43730$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43732$as_echo_n "checking for BUILD_CC... " >&6; }
43733          if test ! -x "$tool_specified"; then
43734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43735$as_echo "not found" >&6; }
43736            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43737          fi
43738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43739$as_echo "$tool_specified" >&6; }
43740        fi
43741      fi
43742    fi
43743
43744  fi
43745
43746
43747
43748  if test "x$BUILD_CC" = x; then
43749    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43750  fi
43751
43752
43753
43754  # Only process if variable expands to non-empty
43755
43756  if test "x$BUILD_CC" != x; then
43757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43758
43759  # First separate the path from the arguments. This will split at the first
43760  # space.
43761  complete="$BUILD_CC"
43762  path="${complete%% *}"
43763  tmp="$complete EOL"
43764  arguments="${tmp#* }"
43765
43766  # Input might be given as Windows format, start by converting to
43767  # unix format.
43768  new_path=`$CYGPATH -u "$path"`
43769
43770  # Now try to locate executable using which
43771  new_path=`$WHICH "$new_path" 2> /dev/null`
43772  # bat and cmd files are not always considered executable in cygwin causing which
43773  # to not find them
43774  if test "x$new_path" = x \
43775      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43776      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43777    new_path=`$CYGPATH -u "$path"`
43778  fi
43779  if test "x$new_path" = x; then
43780    # Oops. Which didn't find the executable.
43781    # The splitting of arguments from the executable at a space might have been incorrect,
43782    # since paths with space are more likely in Windows. Give it another try with the whole
43783    # argument.
43784    path="$complete"
43785    arguments="EOL"
43786    new_path=`$CYGPATH -u "$path"`
43787    new_path=`$WHICH "$new_path" 2> /dev/null`
43788    # bat and cmd files are not always considered executable in cygwin causing which
43789    # to not find them
43790    if test "x$new_path" = x \
43791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43793      new_path=`$CYGPATH -u "$path"`
43794    fi
43795    if test "x$new_path" = x; then
43796      # It's still not found. Now this is an unrecoverable error.
43797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43798$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43799      has_space=`$ECHO "$complete" | $GREP " "`
43800      if test "x$has_space" != x; then
43801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43803      fi
43804      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43805    fi
43806  fi
43807
43808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43811  # "foo.exe" is OK but "foo" is an error.
43812  #
43813  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43814  # It is also a way to make sure we got the proper file name for the real test later on.
43815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43816  if test "x$test_shortpath" = x; then
43817    # Short path failed, file does not exist as specified.
43818    # Try adding .exe or .cmd
43819    if test -f "${new_path}.exe"; then
43820      input_to_shortpath="${new_path}.exe"
43821    elif test -f "${new_path}.cmd"; then
43822      input_to_shortpath="${new_path}.cmd"
43823    else
43824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43825$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43826      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43828      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43829    fi
43830  else
43831    input_to_shortpath="$new_path"
43832  fi
43833
43834  # Call helper function which possibly converts this using DOS-style short mode.
43835  # If so, the updated path is stored in $new_path.
43836  new_path="$input_to_shortpath"
43837
43838  input_path="$input_to_shortpath"
43839  # Check if we need to convert this using DOS-style short mode. If the path
43840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43841  # take no chances and rewrite it.
43842  # Note: m4 eats our [], so we need to use [ and ] instead.
43843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43844  if test "x$has_forbidden_chars" != x; then
43845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43849      # Going to short mode and back again did indeed matter. Since short mode is
43850      # case insensitive, let's make it lowercase to improve readability.
43851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43852      # Now convert it back to Unix-style (cygpath)
43853      input_path=`$CYGPATH -u "$shortmode_path"`
43854      new_path="$input_path"
43855    fi
43856  fi
43857
43858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43859  if test "x$test_cygdrive_prefix" = x; then
43860    # As a simple fix, exclude /usr/bin since it's not a real path.
43861    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43863      # a path prefixed by /cygdrive for fixpath to work.
43864      new_path="$CYGWIN_ROOT_PATH$input_path"
43865    fi
43866  fi
43867
43868  # remove trailing .exe if any
43869  new_path="${new_path/%.exe/}"
43870
43871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43872
43873  # First separate the path from the arguments. This will split at the first
43874  # space.
43875  complete="$BUILD_CC"
43876  path="${complete%% *}"
43877  tmp="$complete EOL"
43878  arguments="${tmp#* }"
43879
43880  # Input might be given as Windows format, start by converting to
43881  # unix format.
43882  new_path="$path"
43883
43884  windows_path="$new_path"
43885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43886    unix_path=`$CYGPATH -u "$windows_path"`
43887    new_path="$unix_path"
43888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43890    new_path="$unix_path"
43891  fi
43892
43893
43894  # Now try to locate executable using which
43895  new_path=`$WHICH "$new_path" 2> /dev/null`
43896
43897  if test "x$new_path" = x; then
43898    # Oops. Which didn't find the executable.
43899    # The splitting of arguments from the executable at a space might have been incorrect,
43900    # since paths with space are more likely in Windows. Give it another try with the whole
43901    # argument.
43902    path="$complete"
43903    arguments="EOL"
43904    new_path="$path"
43905
43906  windows_path="$new_path"
43907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43908    unix_path=`$CYGPATH -u "$windows_path"`
43909    new_path="$unix_path"
43910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43912    new_path="$unix_path"
43913  fi
43914
43915
43916    new_path=`$WHICH "$new_path" 2> /dev/null`
43917    # bat and cmd files are not always considered executable in MSYS causing which
43918    # to not find them
43919    if test "x$new_path" = x \
43920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43922      new_path="$path"
43923
43924  windows_path="$new_path"
43925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43926    unix_path=`$CYGPATH -u "$windows_path"`
43927    new_path="$unix_path"
43928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43930    new_path="$unix_path"
43931  fi
43932
43933    fi
43934
43935    if test "x$new_path" = x; then
43936      # It's still not found. Now this is an unrecoverable error.
43937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43938$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43939      has_space=`$ECHO "$complete" | $GREP " "`
43940      if test "x$has_space" != x; then
43941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43943      fi
43944      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43945    fi
43946  fi
43947
43948  # Now new_path has a complete unix path to the binary
43949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43950    # Keep paths in /bin as-is, but remove trailing .exe if any
43951    new_path="${new_path/%.exe/}"
43952    # Do not save /bin paths to all_fixpath_prefixes!
43953  else
43954    # Not in mixed or Windows style, start by that.
43955    new_path=`cmd //c echo $new_path`
43956
43957  input_path="$new_path"
43958  # Check if we need to convert this using DOS-style short mode. If the path
43959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43960  # take no chances and rewrite it.
43961  # Note: m4 eats our [], so we need to use [ and ] instead.
43962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43963  if test "x$has_forbidden_chars" != x; then
43964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43966  fi
43967
43968    # Output is in $new_path
43969
43970  windows_path="$new_path"
43971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43972    unix_path=`$CYGPATH -u "$windows_path"`
43973    new_path="$unix_path"
43974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43976    new_path="$unix_path"
43977  fi
43978
43979    # remove trailing .exe if any
43980    new_path="${new_path/%.exe/}"
43981
43982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43984  fi
43985
43986    else
43987      # We're on a unix platform. Hooray! :)
43988      # First separate the path from the arguments. This will split at the first
43989      # space.
43990      complete="$BUILD_CC"
43991      path="${complete%% *}"
43992      tmp="$complete EOL"
43993      arguments="${tmp#* }"
43994
43995      # Cannot rely on the command "which" here since it doesn't always work.
43996      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43997      if test -z "$is_absolute_path"; then
43998        # Path to executable is not absolute. Find it.
43999        IFS_save="$IFS"
44000        IFS=:
44001        for p in $PATH; do
44002          if test -f "$p/$path" && test -x "$p/$path"; then
44003            new_path="$p/$path"
44004            break
44005          fi
44006        done
44007        IFS="$IFS_save"
44008      else
44009        # This is an absolute path, we can use it without further modifications.
44010        new_path="$path"
44011      fi
44012
44013      if test "x$new_path" = x; then
44014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44015$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44016        has_space=`$ECHO "$complete" | $GREP " "`
44017        if test "x$has_space" != x; then
44018          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44020        fi
44021        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44022      fi
44023    fi
44024
44025    # Now join together the path and the arguments once again
44026    if test "x$arguments" != xEOL; then
44027      new_complete="$new_path ${arguments% *}"
44028    else
44029      new_complete="$new_path"
44030    fi
44031
44032    if test "x$complete" != "x$new_complete"; then
44033      BUILD_CC="$new_complete"
44034      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44035$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44036    fi
44037  fi
44038
44039
44040
44041
44042  # Publish this variable in the help.
44043
44044
44045  if [ -z "${BUILD_CXX+x}" ]; then
44046    # The variable is not set by user, try to locate tool using the code snippet
44047    for ac_prog in cl CC g++
44048do
44049  # Extract the first word of "$ac_prog", so it can be a program name with args.
44050set dummy $ac_prog; ac_word=$2
44051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44052$as_echo_n "checking for $ac_word... " >&6; }
44053if ${ac_cv_path_BUILD_CXX+:} false; then :
44054  $as_echo_n "(cached) " >&6
44055else
44056  case $BUILD_CXX in
44057  [\\/]* | ?:[\\/]*)
44058  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44059  ;;
44060  *)
44061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44062for as_dir in $PATH
44063do
44064  IFS=$as_save_IFS
44065  test -z "$as_dir" && as_dir=.
44066    for ac_exec_ext in '' $ac_executable_extensions; do
44067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44068    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44070    break 2
44071  fi
44072done
44073  done
44074IFS=$as_save_IFS
44075
44076  ;;
44077esac
44078fi
44079BUILD_CXX=$ac_cv_path_BUILD_CXX
44080if test -n "$BUILD_CXX"; then
44081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44082$as_echo "$BUILD_CXX" >&6; }
44083else
44084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44085$as_echo "no" >&6; }
44086fi
44087
44088
44089  test -n "$BUILD_CXX" && break
44090done
44091
44092  else
44093    # The variable is set, but is it from the command line or the environment?
44094
44095    # Try to remove the string !BUILD_CXX! from our list.
44096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44098      # If it failed, the variable was not from the command line. Ignore it,
44099      # but warn the user (except for BASH, which is always set by the calling BASH).
44100      if test "xBUILD_CXX" != xBASH; then
44101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44102$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44103      fi
44104      # Try to locate tool using the code snippet
44105      for ac_prog in cl CC g++
44106do
44107  # Extract the first word of "$ac_prog", so it can be a program name with args.
44108set dummy $ac_prog; ac_word=$2
44109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44110$as_echo_n "checking for $ac_word... " >&6; }
44111if ${ac_cv_path_BUILD_CXX+:} false; then :
44112  $as_echo_n "(cached) " >&6
44113else
44114  case $BUILD_CXX in
44115  [\\/]* | ?:[\\/]*)
44116  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44117  ;;
44118  *)
44119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44120for as_dir in $PATH
44121do
44122  IFS=$as_save_IFS
44123  test -z "$as_dir" && as_dir=.
44124    for ac_exec_ext in '' $ac_executable_extensions; do
44125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44126    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44128    break 2
44129  fi
44130done
44131  done
44132IFS=$as_save_IFS
44133
44134  ;;
44135esac
44136fi
44137BUILD_CXX=$ac_cv_path_BUILD_CXX
44138if test -n "$BUILD_CXX"; then
44139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44140$as_echo "$BUILD_CXX" >&6; }
44141else
44142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44143$as_echo "no" >&6; }
44144fi
44145
44146
44147  test -n "$BUILD_CXX" && break
44148done
44149
44150    else
44151      # If it succeeded, then it was overridden by the user. We will use it
44152      # for the tool.
44153
44154      # First remove it from the list of overridden variables, so we can test
44155      # for unknown variables in the end.
44156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44157
44158      # Check if we try to supply an empty value
44159      if test "x$BUILD_CXX" = x; then
44160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44161$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44163$as_echo_n "checking for BUILD_CXX... " >&6; }
44164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44165$as_echo "disabled" >&6; }
44166      else
44167        # Check if the provided tool contains a complete path.
44168        tool_specified="$BUILD_CXX"
44169        tool_basename="${tool_specified##*/}"
44170        if test "x$tool_basename" = "x$tool_specified"; then
44171          # A command without a complete path is provided, search $PATH.
44172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44173$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44174          # Extract the first word of "$tool_basename", so it can be a program name with args.
44175set dummy $tool_basename; ac_word=$2
44176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44177$as_echo_n "checking for $ac_word... " >&6; }
44178if ${ac_cv_path_BUILD_CXX+:} false; then :
44179  $as_echo_n "(cached) " >&6
44180else
44181  case $BUILD_CXX in
44182  [\\/]* | ?:[\\/]*)
44183  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44184  ;;
44185  *)
44186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44187for as_dir in $PATH
44188do
44189  IFS=$as_save_IFS
44190  test -z "$as_dir" && as_dir=.
44191    for ac_exec_ext in '' $ac_executable_extensions; do
44192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44193    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44195    break 2
44196  fi
44197done
44198  done
44199IFS=$as_save_IFS
44200
44201  ;;
44202esac
44203fi
44204BUILD_CXX=$ac_cv_path_BUILD_CXX
44205if test -n "$BUILD_CXX"; then
44206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44207$as_echo "$BUILD_CXX" >&6; }
44208else
44209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44210$as_echo "no" >&6; }
44211fi
44212
44213
44214          if test "x$BUILD_CXX" = x; then
44215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44216          fi
44217        else
44218          # Otherwise we believe it is a complete path. Use it as it is.
44219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44220$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44222$as_echo_n "checking for BUILD_CXX... " >&6; }
44223          if test ! -x "$tool_specified"; then
44224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44225$as_echo "not found" >&6; }
44226            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44227          fi
44228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44229$as_echo "$tool_specified" >&6; }
44230        fi
44231      fi
44232    fi
44233
44234  fi
44235
44236
44237
44238  if test "x$BUILD_CXX" = x; then
44239    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44240  fi
44241
44242
44243
44244  # Only process if variable expands to non-empty
44245
44246  if test "x$BUILD_CXX" != x; then
44247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44248
44249  # First separate the path from the arguments. This will split at the first
44250  # space.
44251  complete="$BUILD_CXX"
44252  path="${complete%% *}"
44253  tmp="$complete EOL"
44254  arguments="${tmp#* }"
44255
44256  # Input might be given as Windows format, start by converting to
44257  # unix format.
44258  new_path=`$CYGPATH -u "$path"`
44259
44260  # Now try to locate executable using which
44261  new_path=`$WHICH "$new_path" 2> /dev/null`
44262  # bat and cmd files are not always considered executable in cygwin causing which
44263  # to not find them
44264  if test "x$new_path" = x \
44265      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44266      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44267    new_path=`$CYGPATH -u "$path"`
44268  fi
44269  if test "x$new_path" = x; then
44270    # Oops. Which didn't find the executable.
44271    # The splitting of arguments from the executable at a space might have been incorrect,
44272    # since paths with space are more likely in Windows. Give it another try with the whole
44273    # argument.
44274    path="$complete"
44275    arguments="EOL"
44276    new_path=`$CYGPATH -u "$path"`
44277    new_path=`$WHICH "$new_path" 2> /dev/null`
44278    # bat and cmd files are not always considered executable in cygwin causing which
44279    # to not find them
44280    if test "x$new_path" = x \
44281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44283      new_path=`$CYGPATH -u "$path"`
44284    fi
44285    if test "x$new_path" = x; then
44286      # It's still not found. Now this is an unrecoverable error.
44287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44288$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44289      has_space=`$ECHO "$complete" | $GREP " "`
44290      if test "x$has_space" != x; then
44291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44293      fi
44294      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44295    fi
44296  fi
44297
44298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44301  # "foo.exe" is OK but "foo" is an error.
44302  #
44303  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44304  # It is also a way to make sure we got the proper file name for the real test later on.
44305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44306  if test "x$test_shortpath" = x; then
44307    # Short path failed, file does not exist as specified.
44308    # Try adding .exe or .cmd
44309    if test -f "${new_path}.exe"; then
44310      input_to_shortpath="${new_path}.exe"
44311    elif test -f "${new_path}.cmd"; then
44312      input_to_shortpath="${new_path}.cmd"
44313    else
44314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44315$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44318      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44319    fi
44320  else
44321    input_to_shortpath="$new_path"
44322  fi
44323
44324  # Call helper function which possibly converts this using DOS-style short mode.
44325  # If so, the updated path is stored in $new_path.
44326  new_path="$input_to_shortpath"
44327
44328  input_path="$input_to_shortpath"
44329  # Check if we need to convert this using DOS-style short mode. If the path
44330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44331  # take no chances and rewrite it.
44332  # Note: m4 eats our [], so we need to use [ and ] instead.
44333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44334  if test "x$has_forbidden_chars" != x; then
44335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44339      # Going to short mode and back again did indeed matter. Since short mode is
44340      # case insensitive, let's make it lowercase to improve readability.
44341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44342      # Now convert it back to Unix-style (cygpath)
44343      input_path=`$CYGPATH -u "$shortmode_path"`
44344      new_path="$input_path"
44345    fi
44346  fi
44347
44348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44349  if test "x$test_cygdrive_prefix" = x; then
44350    # As a simple fix, exclude /usr/bin since it's not a real path.
44351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44353      # a path prefixed by /cygdrive for fixpath to work.
44354      new_path="$CYGWIN_ROOT_PATH$input_path"
44355    fi
44356  fi
44357
44358  # remove trailing .exe if any
44359  new_path="${new_path/%.exe/}"
44360
44361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44362
44363  # First separate the path from the arguments. This will split at the first
44364  # space.
44365  complete="$BUILD_CXX"
44366  path="${complete%% *}"
44367  tmp="$complete EOL"
44368  arguments="${tmp#* }"
44369
44370  # Input might be given as Windows format, start by converting to
44371  # unix format.
44372  new_path="$path"
44373
44374  windows_path="$new_path"
44375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44376    unix_path=`$CYGPATH -u "$windows_path"`
44377    new_path="$unix_path"
44378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44380    new_path="$unix_path"
44381  fi
44382
44383
44384  # Now try to locate executable using which
44385  new_path=`$WHICH "$new_path" 2> /dev/null`
44386
44387  if test "x$new_path" = x; then
44388    # Oops. Which didn't find the executable.
44389    # The splitting of arguments from the executable at a space might have been incorrect,
44390    # since paths with space are more likely in Windows. Give it another try with the whole
44391    # argument.
44392    path="$complete"
44393    arguments="EOL"
44394    new_path="$path"
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405
44406    new_path=`$WHICH "$new_path" 2> /dev/null`
44407    # bat and cmd files are not always considered executable in MSYS causing which
44408    # to not find them
44409    if test "x$new_path" = x \
44410        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44411        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44412      new_path="$path"
44413
44414  windows_path="$new_path"
44415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44416    unix_path=`$CYGPATH -u "$windows_path"`
44417    new_path="$unix_path"
44418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44420    new_path="$unix_path"
44421  fi
44422
44423    fi
44424
44425    if test "x$new_path" = x; then
44426      # It's still not found. Now this is an unrecoverable error.
44427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44428$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44429      has_space=`$ECHO "$complete" | $GREP " "`
44430      if test "x$has_space" != x; then
44431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44433      fi
44434      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44435    fi
44436  fi
44437
44438  # Now new_path has a complete unix path to the binary
44439  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44440    # Keep paths in /bin as-is, but remove trailing .exe if any
44441    new_path="${new_path/%.exe/}"
44442    # Do not save /bin paths to all_fixpath_prefixes!
44443  else
44444    # Not in mixed or Windows style, start by that.
44445    new_path=`cmd //c echo $new_path`
44446
44447  input_path="$new_path"
44448  # Check if we need to convert this using DOS-style short mode. If the path
44449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44450  # take no chances and rewrite it.
44451  # Note: m4 eats our [], so we need to use [ and ] instead.
44452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44453  if test "x$has_forbidden_chars" != x; then
44454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44456  fi
44457
44458    # Output is in $new_path
44459
44460  windows_path="$new_path"
44461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44462    unix_path=`$CYGPATH -u "$windows_path"`
44463    new_path="$unix_path"
44464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44466    new_path="$unix_path"
44467  fi
44468
44469    # remove trailing .exe if any
44470    new_path="${new_path/%.exe/}"
44471
44472    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44473    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44474  fi
44475
44476    else
44477      # We're on a unix platform. Hooray! :)
44478      # First separate the path from the arguments. This will split at the first
44479      # space.
44480      complete="$BUILD_CXX"
44481      path="${complete%% *}"
44482      tmp="$complete EOL"
44483      arguments="${tmp#* }"
44484
44485      # Cannot rely on the command "which" here since it doesn't always work.
44486      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44487      if test -z "$is_absolute_path"; then
44488        # Path to executable is not absolute. Find it.
44489        IFS_save="$IFS"
44490        IFS=:
44491        for p in $PATH; do
44492          if test -f "$p/$path" && test -x "$p/$path"; then
44493            new_path="$p/$path"
44494            break
44495          fi
44496        done
44497        IFS="$IFS_save"
44498      else
44499        # This is an absolute path, we can use it without further modifications.
44500        new_path="$path"
44501      fi
44502
44503      if test "x$new_path" = x; then
44504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44505$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44506        has_space=`$ECHO "$complete" | $GREP " "`
44507        if test "x$has_space" != x; then
44508          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44510        fi
44511        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44512      fi
44513    fi
44514
44515    # Now join together the path and the arguments once again
44516    if test "x$arguments" != xEOL; then
44517      new_complete="$new_path ${arguments% *}"
44518    else
44519      new_complete="$new_path"
44520    fi
44521
44522    if test "x$complete" != "x$new_complete"; then
44523      BUILD_CXX="$new_complete"
44524      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44525$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44526    fi
44527  fi
44528
44529
44530
44531  # Publish this variable in the help.
44532
44533
44534  if [ -z "${BUILD_NM+x}" ]; then
44535    # The variable is not set by user, try to locate tool using the code snippet
44536    for ac_prog in nm gcc-nm
44537do
44538  # Extract the first word of "$ac_prog", so it can be a program name with args.
44539set dummy $ac_prog; ac_word=$2
44540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44541$as_echo_n "checking for $ac_word... " >&6; }
44542if ${ac_cv_path_BUILD_NM+:} false; then :
44543  $as_echo_n "(cached) " >&6
44544else
44545  case $BUILD_NM in
44546  [\\/]* | ?:[\\/]*)
44547  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44548  ;;
44549  *)
44550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44551for as_dir in $PATH
44552do
44553  IFS=$as_save_IFS
44554  test -z "$as_dir" && as_dir=.
44555    for ac_exec_ext in '' $ac_executable_extensions; do
44556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44557    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44559    break 2
44560  fi
44561done
44562  done
44563IFS=$as_save_IFS
44564
44565  ;;
44566esac
44567fi
44568BUILD_NM=$ac_cv_path_BUILD_NM
44569if test -n "$BUILD_NM"; then
44570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44571$as_echo "$BUILD_NM" >&6; }
44572else
44573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44574$as_echo "no" >&6; }
44575fi
44576
44577
44578  test -n "$BUILD_NM" && break
44579done
44580
44581  else
44582    # The variable is set, but is it from the command line or the environment?
44583
44584    # Try to remove the string !BUILD_NM! from our list.
44585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44587      # If it failed, the variable was not from the command line. Ignore it,
44588      # but warn the user (except for BASH, which is always set by the calling BASH).
44589      if test "xBUILD_NM" != xBASH; then
44590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44591$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44592      fi
44593      # Try to locate tool using the code snippet
44594      for ac_prog in nm gcc-nm
44595do
44596  # Extract the first word of "$ac_prog", so it can be a program name with args.
44597set dummy $ac_prog; ac_word=$2
44598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44599$as_echo_n "checking for $ac_word... " >&6; }
44600if ${ac_cv_path_BUILD_NM+:} false; then :
44601  $as_echo_n "(cached) " >&6
44602else
44603  case $BUILD_NM in
44604  [\\/]* | ?:[\\/]*)
44605  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44606  ;;
44607  *)
44608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44609for as_dir in $PATH
44610do
44611  IFS=$as_save_IFS
44612  test -z "$as_dir" && as_dir=.
44613    for ac_exec_ext in '' $ac_executable_extensions; do
44614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44615    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44617    break 2
44618  fi
44619done
44620  done
44621IFS=$as_save_IFS
44622
44623  ;;
44624esac
44625fi
44626BUILD_NM=$ac_cv_path_BUILD_NM
44627if test -n "$BUILD_NM"; then
44628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44629$as_echo "$BUILD_NM" >&6; }
44630else
44631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44632$as_echo "no" >&6; }
44633fi
44634
44635
44636  test -n "$BUILD_NM" && break
44637done
44638
44639    else
44640      # If it succeeded, then it was overridden by the user. We will use it
44641      # for the tool.
44642
44643      # First remove it from the list of overridden variables, so we can test
44644      # for unknown variables in the end.
44645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44646
44647      # Check if we try to supply an empty value
44648      if test "x$BUILD_NM" = x; then
44649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44650$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44652$as_echo_n "checking for BUILD_NM... " >&6; }
44653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44654$as_echo "disabled" >&6; }
44655      else
44656        # Check if the provided tool contains a complete path.
44657        tool_specified="$BUILD_NM"
44658        tool_basename="${tool_specified##*/}"
44659        if test "x$tool_basename" = "x$tool_specified"; then
44660          # A command without a complete path is provided, search $PATH.
44661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44662$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44663          # Extract the first word of "$tool_basename", so it can be a program name with args.
44664set dummy $tool_basename; ac_word=$2
44665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44666$as_echo_n "checking for $ac_word... " >&6; }
44667if ${ac_cv_path_BUILD_NM+:} false; then :
44668  $as_echo_n "(cached) " >&6
44669else
44670  case $BUILD_NM in
44671  [\\/]* | ?:[\\/]*)
44672  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44673  ;;
44674  *)
44675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44676for as_dir in $PATH
44677do
44678  IFS=$as_save_IFS
44679  test -z "$as_dir" && as_dir=.
44680    for ac_exec_ext in '' $ac_executable_extensions; do
44681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44682    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44684    break 2
44685  fi
44686done
44687  done
44688IFS=$as_save_IFS
44689
44690  ;;
44691esac
44692fi
44693BUILD_NM=$ac_cv_path_BUILD_NM
44694if test -n "$BUILD_NM"; then
44695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44696$as_echo "$BUILD_NM" >&6; }
44697else
44698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44699$as_echo "no" >&6; }
44700fi
44701
44702
44703          if test "x$BUILD_NM" = x; then
44704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44705          fi
44706        else
44707          # Otherwise we believe it is a complete path. Use it as it is.
44708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44709$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44711$as_echo_n "checking for BUILD_NM... " >&6; }
44712          if test ! -x "$tool_specified"; then
44713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44714$as_echo "not found" >&6; }
44715            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44716          fi
44717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44718$as_echo "$tool_specified" >&6; }
44719        fi
44720      fi
44721    fi
44722
44723  fi
44724
44725
44726
44727  # Only process if variable expands to non-empty
44728
44729  if test "x$BUILD_NM" != x; then
44730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44731
44732  # First separate the path from the arguments. This will split at the first
44733  # space.
44734  complete="$BUILD_NM"
44735  path="${complete%% *}"
44736  tmp="$complete EOL"
44737  arguments="${tmp#* }"
44738
44739  # Input might be given as Windows format, start by converting to
44740  # unix format.
44741  new_path=`$CYGPATH -u "$path"`
44742
44743  # Now try to locate executable using which
44744  new_path=`$WHICH "$new_path" 2> /dev/null`
44745  # bat and cmd files are not always considered executable in cygwin causing which
44746  # to not find them
44747  if test "x$new_path" = x \
44748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44750    new_path=`$CYGPATH -u "$path"`
44751  fi
44752  if test "x$new_path" = x; then
44753    # Oops. Which didn't find the executable.
44754    # The splitting of arguments from the executable at a space might have been incorrect,
44755    # since paths with space are more likely in Windows. Give it another try with the whole
44756    # argument.
44757    path="$complete"
44758    arguments="EOL"
44759    new_path=`$CYGPATH -u "$path"`
44760    new_path=`$WHICH "$new_path" 2> /dev/null`
44761    # bat and cmd files are not always considered executable in cygwin causing which
44762    # to not find them
44763    if test "x$new_path" = x \
44764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44766      new_path=`$CYGPATH -u "$path"`
44767    fi
44768    if test "x$new_path" = x; then
44769      # It's still not found. Now this is an unrecoverable error.
44770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44771$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44772      has_space=`$ECHO "$complete" | $GREP " "`
44773      if test "x$has_space" != x; then
44774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44776      fi
44777      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44778    fi
44779  fi
44780
44781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44784  # "foo.exe" is OK but "foo" is an error.
44785  #
44786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44787  # It is also a way to make sure we got the proper file name for the real test later on.
44788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44789  if test "x$test_shortpath" = x; then
44790    # Short path failed, file does not exist as specified.
44791    # Try adding .exe or .cmd
44792    if test -f "${new_path}.exe"; then
44793      input_to_shortpath="${new_path}.exe"
44794    elif test -f "${new_path}.cmd"; then
44795      input_to_shortpath="${new_path}.cmd"
44796    else
44797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44798$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44801      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44802    fi
44803  else
44804    input_to_shortpath="$new_path"
44805  fi
44806
44807  # Call helper function which possibly converts this using DOS-style short mode.
44808  # If so, the updated path is stored in $new_path.
44809  new_path="$input_to_shortpath"
44810
44811  input_path="$input_to_shortpath"
44812  # Check if we need to convert this using DOS-style short mode. If the path
44813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44814  # take no chances and rewrite it.
44815  # Note: m4 eats our [], so we need to use [ and ] instead.
44816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44817  if test "x$has_forbidden_chars" != x; then
44818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44822      # Going to short mode and back again did indeed matter. Since short mode is
44823      # case insensitive, let's make it lowercase to improve readability.
44824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44825      # Now convert it back to Unix-style (cygpath)
44826      input_path=`$CYGPATH -u "$shortmode_path"`
44827      new_path="$input_path"
44828    fi
44829  fi
44830
44831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44832  if test "x$test_cygdrive_prefix" = x; then
44833    # As a simple fix, exclude /usr/bin since it's not a real path.
44834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44836      # a path prefixed by /cygdrive for fixpath to work.
44837      new_path="$CYGWIN_ROOT_PATH$input_path"
44838    fi
44839  fi
44840
44841  # remove trailing .exe if any
44842  new_path="${new_path/%.exe/}"
44843
44844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44845
44846  # First separate the path from the arguments. This will split at the first
44847  # space.
44848  complete="$BUILD_NM"
44849  path="${complete%% *}"
44850  tmp="$complete EOL"
44851  arguments="${tmp#* }"
44852
44853  # Input might be given as Windows format, start by converting to
44854  # unix format.
44855  new_path="$path"
44856
44857  windows_path="$new_path"
44858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44859    unix_path=`$CYGPATH -u "$windows_path"`
44860    new_path="$unix_path"
44861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44863    new_path="$unix_path"
44864  fi
44865
44866
44867  # Now try to locate executable using which
44868  new_path=`$WHICH "$new_path" 2> /dev/null`
44869
44870  if test "x$new_path" = x; then
44871    # Oops. Which didn't find the executable.
44872    # The splitting of arguments from the executable at a space might have been incorrect,
44873    # since paths with space are more likely in Windows. Give it another try with the whole
44874    # argument.
44875    path="$complete"
44876    arguments="EOL"
44877    new_path="$path"
44878
44879  windows_path="$new_path"
44880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881    unix_path=`$CYGPATH -u "$windows_path"`
44882    new_path="$unix_path"
44883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44885    new_path="$unix_path"
44886  fi
44887
44888
44889    new_path=`$WHICH "$new_path" 2> /dev/null`
44890    # bat and cmd files are not always considered executable in MSYS causing which
44891    # to not find them
44892    if test "x$new_path" = x \
44893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44895      new_path="$path"
44896
44897  windows_path="$new_path"
44898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44899    unix_path=`$CYGPATH -u "$windows_path"`
44900    new_path="$unix_path"
44901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44903    new_path="$unix_path"
44904  fi
44905
44906    fi
44907
44908    if test "x$new_path" = x; then
44909      # It's still not found. Now this is an unrecoverable error.
44910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44911$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44912      has_space=`$ECHO "$complete" | $GREP " "`
44913      if test "x$has_space" != x; then
44914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44916      fi
44917      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44918    fi
44919  fi
44920
44921  # Now new_path has a complete unix path to the binary
44922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44923    # Keep paths in /bin as-is, but remove trailing .exe if any
44924    new_path="${new_path/%.exe/}"
44925    # Do not save /bin paths to all_fixpath_prefixes!
44926  else
44927    # Not in mixed or Windows style, start by that.
44928    new_path=`cmd //c echo $new_path`
44929
44930  input_path="$new_path"
44931  # Check if we need to convert this using DOS-style short mode. If the path
44932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44933  # take no chances and rewrite it.
44934  # Note: m4 eats our [], so we need to use [ and ] instead.
44935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44936  if test "x$has_forbidden_chars" != x; then
44937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44939  fi
44940
44941    # Output is in $new_path
44942
44943  windows_path="$new_path"
44944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44945    unix_path=`$CYGPATH -u "$windows_path"`
44946    new_path="$unix_path"
44947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44949    new_path="$unix_path"
44950  fi
44951
44952    # remove trailing .exe if any
44953    new_path="${new_path/%.exe/}"
44954
44955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44957  fi
44958
44959    else
44960      # We're on a unix platform. Hooray! :)
44961      # First separate the path from the arguments. This will split at the first
44962      # space.
44963      complete="$BUILD_NM"
44964      path="${complete%% *}"
44965      tmp="$complete EOL"
44966      arguments="${tmp#* }"
44967
44968      # Cannot rely on the command "which" here since it doesn't always work.
44969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44970      if test -z "$is_absolute_path"; then
44971        # Path to executable is not absolute. Find it.
44972        IFS_save="$IFS"
44973        IFS=:
44974        for p in $PATH; do
44975          if test -f "$p/$path" && test -x "$p/$path"; then
44976            new_path="$p/$path"
44977            break
44978          fi
44979        done
44980        IFS="$IFS_save"
44981      else
44982        # This is an absolute path, we can use it without further modifications.
44983        new_path="$path"
44984      fi
44985
44986      if test "x$new_path" = x; then
44987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44988$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44989        has_space=`$ECHO "$complete" | $GREP " "`
44990        if test "x$has_space" != x; then
44991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44993        fi
44994        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44995      fi
44996    fi
44997
44998    # Now join together the path and the arguments once again
44999    if test "x$arguments" != xEOL; then
45000      new_complete="$new_path ${arguments% *}"
45001    else
45002      new_complete="$new_path"
45003    fi
45004
45005    if test "x$complete" != "x$new_complete"; then
45006      BUILD_NM="$new_complete"
45007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45008$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45009    fi
45010  fi
45011
45012
45013
45014  # Publish this variable in the help.
45015
45016
45017  if [ -z "${BUILD_AR+x}" ]; then
45018    # The variable is not set by user, try to locate tool using the code snippet
45019    for ac_prog in ar gcc-ar
45020do
45021  # Extract the first word of "$ac_prog", so it can be a program name with args.
45022set dummy $ac_prog; ac_word=$2
45023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45024$as_echo_n "checking for $ac_word... " >&6; }
45025if ${ac_cv_path_BUILD_AR+:} false; then :
45026  $as_echo_n "(cached) " >&6
45027else
45028  case $BUILD_AR in
45029  [\\/]* | ?:[\\/]*)
45030  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45031  ;;
45032  *)
45033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45034for as_dir in $PATH
45035do
45036  IFS=$as_save_IFS
45037  test -z "$as_dir" && as_dir=.
45038    for ac_exec_ext in '' $ac_executable_extensions; do
45039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45040    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45042    break 2
45043  fi
45044done
45045  done
45046IFS=$as_save_IFS
45047
45048  ;;
45049esac
45050fi
45051BUILD_AR=$ac_cv_path_BUILD_AR
45052if test -n "$BUILD_AR"; then
45053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45054$as_echo "$BUILD_AR" >&6; }
45055else
45056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45057$as_echo "no" >&6; }
45058fi
45059
45060
45061  test -n "$BUILD_AR" && break
45062done
45063
45064  else
45065    # The variable is set, but is it from the command line or the environment?
45066
45067    # Try to remove the string !BUILD_AR! from our list.
45068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45070      # If it failed, the variable was not from the command line. Ignore it,
45071      # but warn the user (except for BASH, which is always set by the calling BASH).
45072      if test "xBUILD_AR" != xBASH; then
45073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45074$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45075      fi
45076      # Try to locate tool using the code snippet
45077      for ac_prog in ar gcc-ar
45078do
45079  # Extract the first word of "$ac_prog", so it can be a program name with args.
45080set dummy $ac_prog; ac_word=$2
45081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45082$as_echo_n "checking for $ac_word... " >&6; }
45083if ${ac_cv_path_BUILD_AR+:} false; then :
45084  $as_echo_n "(cached) " >&6
45085else
45086  case $BUILD_AR in
45087  [\\/]* | ?:[\\/]*)
45088  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45089  ;;
45090  *)
45091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45092for as_dir in $PATH
45093do
45094  IFS=$as_save_IFS
45095  test -z "$as_dir" && as_dir=.
45096    for ac_exec_ext in '' $ac_executable_extensions; do
45097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45098    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45100    break 2
45101  fi
45102done
45103  done
45104IFS=$as_save_IFS
45105
45106  ;;
45107esac
45108fi
45109BUILD_AR=$ac_cv_path_BUILD_AR
45110if test -n "$BUILD_AR"; then
45111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45112$as_echo "$BUILD_AR" >&6; }
45113else
45114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45115$as_echo "no" >&6; }
45116fi
45117
45118
45119  test -n "$BUILD_AR" && break
45120done
45121
45122    else
45123      # If it succeeded, then it was overridden by the user. We will use it
45124      # for the tool.
45125
45126      # First remove it from the list of overridden variables, so we can test
45127      # for unknown variables in the end.
45128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45129
45130      # Check if we try to supply an empty value
45131      if test "x$BUILD_AR" = x; then
45132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45133$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45135$as_echo_n "checking for BUILD_AR... " >&6; }
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45137$as_echo "disabled" >&6; }
45138      else
45139        # Check if the provided tool contains a complete path.
45140        tool_specified="$BUILD_AR"
45141        tool_basename="${tool_specified##*/}"
45142        if test "x$tool_basename" = "x$tool_specified"; then
45143          # A command without a complete path is provided, search $PATH.
45144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45145$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45146          # Extract the first word of "$tool_basename", so it can be a program name with args.
45147set dummy $tool_basename; ac_word=$2
45148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45149$as_echo_n "checking for $ac_word... " >&6; }
45150if ${ac_cv_path_BUILD_AR+:} false; then :
45151  $as_echo_n "(cached) " >&6
45152else
45153  case $BUILD_AR in
45154  [\\/]* | ?:[\\/]*)
45155  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45156  ;;
45157  *)
45158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45159for as_dir in $PATH
45160do
45161  IFS=$as_save_IFS
45162  test -z "$as_dir" && as_dir=.
45163    for ac_exec_ext in '' $ac_executable_extensions; do
45164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45165    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45167    break 2
45168  fi
45169done
45170  done
45171IFS=$as_save_IFS
45172
45173  ;;
45174esac
45175fi
45176BUILD_AR=$ac_cv_path_BUILD_AR
45177if test -n "$BUILD_AR"; then
45178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45179$as_echo "$BUILD_AR" >&6; }
45180else
45181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45182$as_echo "no" >&6; }
45183fi
45184
45185
45186          if test "x$BUILD_AR" = x; then
45187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45188          fi
45189        else
45190          # Otherwise we believe it is a complete path. Use it as it is.
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45192$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45194$as_echo_n "checking for BUILD_AR... " >&6; }
45195          if test ! -x "$tool_specified"; then
45196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45197$as_echo "not found" >&6; }
45198            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45199          fi
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45201$as_echo "$tool_specified" >&6; }
45202        fi
45203      fi
45204    fi
45205
45206  fi
45207
45208
45209
45210  # Only process if variable expands to non-empty
45211
45212  if test "x$BUILD_AR" != x; then
45213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45214
45215  # First separate the path from the arguments. This will split at the first
45216  # space.
45217  complete="$BUILD_AR"
45218  path="${complete%% *}"
45219  tmp="$complete EOL"
45220  arguments="${tmp#* }"
45221
45222  # Input might be given as Windows format, start by converting to
45223  # unix format.
45224  new_path=`$CYGPATH -u "$path"`
45225
45226  # Now try to locate executable using which
45227  new_path=`$WHICH "$new_path" 2> /dev/null`
45228  # bat and cmd files are not always considered executable in cygwin causing which
45229  # to not find them
45230  if test "x$new_path" = x \
45231      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45232      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45233    new_path=`$CYGPATH -u "$path"`
45234  fi
45235  if test "x$new_path" = x; then
45236    # Oops. Which didn't find the executable.
45237    # The splitting of arguments from the executable at a space might have been incorrect,
45238    # since paths with space are more likely in Windows. Give it another try with the whole
45239    # argument.
45240    path="$complete"
45241    arguments="EOL"
45242    new_path=`$CYGPATH -u "$path"`
45243    new_path=`$WHICH "$new_path" 2> /dev/null`
45244    # bat and cmd files are not always considered executable in cygwin causing which
45245    # to not find them
45246    if test "x$new_path" = x \
45247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45249      new_path=`$CYGPATH -u "$path"`
45250    fi
45251    if test "x$new_path" = x; then
45252      # It's still not found. Now this is an unrecoverable error.
45253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45254$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45255      has_space=`$ECHO "$complete" | $GREP " "`
45256      if test "x$has_space" != x; then
45257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45259      fi
45260      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45261    fi
45262  fi
45263
45264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45267  # "foo.exe" is OK but "foo" is an error.
45268  #
45269  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45270  # It is also a way to make sure we got the proper file name for the real test later on.
45271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45272  if test "x$test_shortpath" = x; then
45273    # Short path failed, file does not exist as specified.
45274    # Try adding .exe or .cmd
45275    if test -f "${new_path}.exe"; then
45276      input_to_shortpath="${new_path}.exe"
45277    elif test -f "${new_path}.cmd"; then
45278      input_to_shortpath="${new_path}.cmd"
45279    else
45280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45281$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45283$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45284      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45285    fi
45286  else
45287    input_to_shortpath="$new_path"
45288  fi
45289
45290  # Call helper function which possibly converts this using DOS-style short mode.
45291  # If so, the updated path is stored in $new_path.
45292  new_path="$input_to_shortpath"
45293
45294  input_path="$input_to_shortpath"
45295  # Check if we need to convert this using DOS-style short mode. If the path
45296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45297  # take no chances and rewrite it.
45298  # Note: m4 eats our [], so we need to use [ and ] instead.
45299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45300  if test "x$has_forbidden_chars" != x; then
45301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45305      # Going to short mode and back again did indeed matter. Since short mode is
45306      # case insensitive, let's make it lowercase to improve readability.
45307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45308      # Now convert it back to Unix-style (cygpath)
45309      input_path=`$CYGPATH -u "$shortmode_path"`
45310      new_path="$input_path"
45311    fi
45312  fi
45313
45314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45315  if test "x$test_cygdrive_prefix" = x; then
45316    # As a simple fix, exclude /usr/bin since it's not a real path.
45317    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45319      # a path prefixed by /cygdrive for fixpath to work.
45320      new_path="$CYGWIN_ROOT_PATH$input_path"
45321    fi
45322  fi
45323
45324  # remove trailing .exe if any
45325  new_path="${new_path/%.exe/}"
45326
45327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45328
45329  # First separate the path from the arguments. This will split at the first
45330  # space.
45331  complete="$BUILD_AR"
45332  path="${complete%% *}"
45333  tmp="$complete EOL"
45334  arguments="${tmp#* }"
45335
45336  # Input might be given as Windows format, start by converting to
45337  # unix format.
45338  new_path="$path"
45339
45340  windows_path="$new_path"
45341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45342    unix_path=`$CYGPATH -u "$windows_path"`
45343    new_path="$unix_path"
45344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45346    new_path="$unix_path"
45347  fi
45348
45349
45350  # Now try to locate executable using which
45351  new_path=`$WHICH "$new_path" 2> /dev/null`
45352
45353  if test "x$new_path" = x; then
45354    # Oops. Which didn't find the executable.
45355    # The splitting of arguments from the executable at a space might have been incorrect,
45356    # since paths with space are more likely in Windows. Give it another try with the whole
45357    # argument.
45358    path="$complete"
45359    arguments="EOL"
45360    new_path="$path"
45361
45362  windows_path="$new_path"
45363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45364    unix_path=`$CYGPATH -u "$windows_path"`
45365    new_path="$unix_path"
45366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45368    new_path="$unix_path"
45369  fi
45370
45371
45372    new_path=`$WHICH "$new_path" 2> /dev/null`
45373    # bat and cmd files are not always considered executable in MSYS causing which
45374    # to not find them
45375    if test "x$new_path" = x \
45376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45378      new_path="$path"
45379
45380  windows_path="$new_path"
45381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45382    unix_path=`$CYGPATH -u "$windows_path"`
45383    new_path="$unix_path"
45384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45386    new_path="$unix_path"
45387  fi
45388
45389    fi
45390
45391    if test "x$new_path" = x; then
45392      # It's still not found. Now this is an unrecoverable error.
45393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45394$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45395      has_space=`$ECHO "$complete" | $GREP " "`
45396      if test "x$has_space" != x; then
45397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45399      fi
45400      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45401    fi
45402  fi
45403
45404  # Now new_path has a complete unix path to the binary
45405  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45406    # Keep paths in /bin as-is, but remove trailing .exe if any
45407    new_path="${new_path/%.exe/}"
45408    # Do not save /bin paths to all_fixpath_prefixes!
45409  else
45410    # Not in mixed or Windows style, start by that.
45411    new_path=`cmd //c echo $new_path`
45412
45413  input_path="$new_path"
45414  # Check if we need to convert this using DOS-style short mode. If the path
45415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45416  # take no chances and rewrite it.
45417  # Note: m4 eats our [], so we need to use [ and ] instead.
45418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45419  if test "x$has_forbidden_chars" != x; then
45420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45422  fi
45423
45424    # Output is in $new_path
45425
45426  windows_path="$new_path"
45427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45428    unix_path=`$CYGPATH -u "$windows_path"`
45429    new_path="$unix_path"
45430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45432    new_path="$unix_path"
45433  fi
45434
45435    # remove trailing .exe if any
45436    new_path="${new_path/%.exe/}"
45437
45438    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45439    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45440  fi
45441
45442    else
45443      # We're on a unix platform. Hooray! :)
45444      # First separate the path from the arguments. This will split at the first
45445      # space.
45446      complete="$BUILD_AR"
45447      path="${complete%% *}"
45448      tmp="$complete EOL"
45449      arguments="${tmp#* }"
45450
45451      # Cannot rely on the command "which" here since it doesn't always work.
45452      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45453      if test -z "$is_absolute_path"; then
45454        # Path to executable is not absolute. Find it.
45455        IFS_save="$IFS"
45456        IFS=:
45457        for p in $PATH; do
45458          if test -f "$p/$path" && test -x "$p/$path"; then
45459            new_path="$p/$path"
45460            break
45461          fi
45462        done
45463        IFS="$IFS_save"
45464      else
45465        # This is an absolute path, we can use it without further modifications.
45466        new_path="$path"
45467      fi
45468
45469      if test "x$new_path" = x; then
45470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45471$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45472        has_space=`$ECHO "$complete" | $GREP " "`
45473        if test "x$has_space" != x; then
45474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45476        fi
45477        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45478      fi
45479    fi
45480
45481    # Now join together the path and the arguments once again
45482    if test "x$arguments" != xEOL; then
45483      new_complete="$new_path ${arguments% *}"
45484    else
45485      new_complete="$new_path"
45486    fi
45487
45488    if test "x$complete" != "x$new_complete"; then
45489      BUILD_AR="$new_complete"
45490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45491$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45492    fi
45493  fi
45494
45495
45496
45497  # Publish this variable in the help.
45498
45499
45500  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45501    # The variable is not set by user, try to locate tool using the code snippet
45502    for ac_prog in objcopy
45503do
45504  # Extract the first word of "$ac_prog", so it can be a program name with args.
45505set dummy $ac_prog; ac_word=$2
45506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45507$as_echo_n "checking for $ac_word... " >&6; }
45508if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45509  $as_echo_n "(cached) " >&6
45510else
45511  case $BUILD_OBJCOPY in
45512  [\\/]* | ?:[\\/]*)
45513  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45514  ;;
45515  *)
45516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45517for as_dir in $PATH
45518do
45519  IFS=$as_save_IFS
45520  test -z "$as_dir" && as_dir=.
45521    for ac_exec_ext in '' $ac_executable_extensions; do
45522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45523    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45525    break 2
45526  fi
45527done
45528  done
45529IFS=$as_save_IFS
45530
45531  ;;
45532esac
45533fi
45534BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45535if test -n "$BUILD_OBJCOPY"; then
45536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45537$as_echo "$BUILD_OBJCOPY" >&6; }
45538else
45539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45540$as_echo "no" >&6; }
45541fi
45542
45543
45544  test -n "$BUILD_OBJCOPY" && break
45545done
45546
45547  else
45548    # The variable is set, but is it from the command line or the environment?
45549
45550    # Try to remove the string !BUILD_OBJCOPY! from our list.
45551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45553      # If it failed, the variable was not from the command line. Ignore it,
45554      # but warn the user (except for BASH, which is always set by the calling BASH).
45555      if test "xBUILD_OBJCOPY" != xBASH; then
45556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45557$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45558      fi
45559      # Try to locate tool using the code snippet
45560      for ac_prog in objcopy
45561do
45562  # Extract the first word of "$ac_prog", so it can be a program name with args.
45563set dummy $ac_prog; ac_word=$2
45564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45565$as_echo_n "checking for $ac_word... " >&6; }
45566if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45567  $as_echo_n "(cached) " >&6
45568else
45569  case $BUILD_OBJCOPY in
45570  [\\/]* | ?:[\\/]*)
45571  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45572  ;;
45573  *)
45574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45575for as_dir in $PATH
45576do
45577  IFS=$as_save_IFS
45578  test -z "$as_dir" && as_dir=.
45579    for ac_exec_ext in '' $ac_executable_extensions; do
45580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45581    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45583    break 2
45584  fi
45585done
45586  done
45587IFS=$as_save_IFS
45588
45589  ;;
45590esac
45591fi
45592BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45593if test -n "$BUILD_OBJCOPY"; then
45594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45595$as_echo "$BUILD_OBJCOPY" >&6; }
45596else
45597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45598$as_echo "no" >&6; }
45599fi
45600
45601
45602  test -n "$BUILD_OBJCOPY" && break
45603done
45604
45605    else
45606      # If it succeeded, then it was overridden by the user. We will use it
45607      # for the tool.
45608
45609      # First remove it from the list of overridden variables, so we can test
45610      # for unknown variables in the end.
45611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45612
45613      # Check if we try to supply an empty value
45614      if test "x$BUILD_OBJCOPY" = x; then
45615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45616$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45618$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45620$as_echo "disabled" >&6; }
45621      else
45622        # Check if the provided tool contains a complete path.
45623        tool_specified="$BUILD_OBJCOPY"
45624        tool_basename="${tool_specified##*/}"
45625        if test "x$tool_basename" = "x$tool_specified"; then
45626          # A command without a complete path is provided, search $PATH.
45627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45628$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45629          # Extract the first word of "$tool_basename", so it can be a program name with args.
45630set dummy $tool_basename; ac_word=$2
45631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45632$as_echo_n "checking for $ac_word... " >&6; }
45633if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45634  $as_echo_n "(cached) " >&6
45635else
45636  case $BUILD_OBJCOPY in
45637  [\\/]* | ?:[\\/]*)
45638  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45639  ;;
45640  *)
45641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45642for as_dir in $PATH
45643do
45644  IFS=$as_save_IFS
45645  test -z "$as_dir" && as_dir=.
45646    for ac_exec_ext in '' $ac_executable_extensions; do
45647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45648    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45650    break 2
45651  fi
45652done
45653  done
45654IFS=$as_save_IFS
45655
45656  ;;
45657esac
45658fi
45659BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45660if test -n "$BUILD_OBJCOPY"; then
45661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45662$as_echo "$BUILD_OBJCOPY" >&6; }
45663else
45664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45665$as_echo "no" >&6; }
45666fi
45667
45668
45669          if test "x$BUILD_OBJCOPY" = x; then
45670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45671          fi
45672        else
45673          # Otherwise we believe it is a complete path. Use it as it is.
45674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45675$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45677$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45678          if test ! -x "$tool_specified"; then
45679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45680$as_echo "not found" >&6; }
45681            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45682          fi
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45684$as_echo "$tool_specified" >&6; }
45685        fi
45686      fi
45687    fi
45688
45689  fi
45690
45691
45692
45693  # Only process if variable expands to non-empty
45694
45695  if test "x$BUILD_OBJCOPY" != x; then
45696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45697
45698  # First separate the path from the arguments. This will split at the first
45699  # space.
45700  complete="$BUILD_OBJCOPY"
45701  path="${complete%% *}"
45702  tmp="$complete EOL"
45703  arguments="${tmp#* }"
45704
45705  # Input might be given as Windows format, start by converting to
45706  # unix format.
45707  new_path=`$CYGPATH -u "$path"`
45708
45709  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
45720    # The splitting of arguments from the executable at a space might have been incorrect,
45721    # since paths with space are more likely in Windows. Give it another try with the whole
45722    # argument.
45723    path="$complete"
45724    arguments="EOL"
45725    new_path=`$CYGPATH -u "$path"`
45726    new_path=`$WHICH "$new_path" 2> /dev/null`
45727    # bat and cmd files are not always considered executable in cygwin causing which
45728    # to not find them
45729    if test "x$new_path" = x \
45730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45732      new_path=`$CYGPATH -u "$path"`
45733    fi
45734    if test "x$new_path" = x; then
45735      # It's still not found. Now this is an unrecoverable error.
45736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45737$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45738      has_space=`$ECHO "$complete" | $GREP " "`
45739      if test "x$has_space" != x; then
45740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45742      fi
45743      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45744    fi
45745  fi
45746
45747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45750  # "foo.exe" is OK but "foo" is an error.
45751  #
45752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45753  # It is also a way to make sure we got the proper file name for the real test later on.
45754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45755  if test "x$test_shortpath" = x; then
45756    # Short path failed, file does not exist as specified.
45757    # Try adding .exe or .cmd
45758    if test -f "${new_path}.exe"; then
45759      input_to_shortpath="${new_path}.exe"
45760    elif test -f "${new_path}.cmd"; then
45761      input_to_shortpath="${new_path}.cmd"
45762    else
45763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45764$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45767      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45768    fi
45769  else
45770    input_to_shortpath="$new_path"
45771  fi
45772
45773  # Call helper function which possibly converts this using DOS-style short mode.
45774  # If so, the updated path is stored in $new_path.
45775  new_path="$input_to_shortpath"
45776
45777  input_path="$input_to_shortpath"
45778  # Check if we need to convert this using DOS-style short mode. If the path
45779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45780  # take no chances and rewrite it.
45781  # Note: m4 eats our [], so we need to use [ and ] instead.
45782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45783  if test "x$has_forbidden_chars" != x; then
45784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45788      # Going to short mode and back again did indeed matter. Since short mode is
45789      # case insensitive, let's make it lowercase to improve readability.
45790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45791      # Now convert it back to Unix-style (cygpath)
45792      input_path=`$CYGPATH -u "$shortmode_path"`
45793      new_path="$input_path"
45794    fi
45795  fi
45796
45797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45798  if test "x$test_cygdrive_prefix" = x; then
45799    # As a simple fix, exclude /usr/bin since it's not a real path.
45800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45802      # a path prefixed by /cygdrive for fixpath to work.
45803      new_path="$CYGWIN_ROOT_PATH$input_path"
45804    fi
45805  fi
45806
45807  # remove trailing .exe if any
45808  new_path="${new_path/%.exe/}"
45809
45810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45811
45812  # First separate the path from the arguments. This will split at the first
45813  # space.
45814  complete="$BUILD_OBJCOPY"
45815  path="${complete%% *}"
45816  tmp="$complete EOL"
45817  arguments="${tmp#* }"
45818
45819  # Input might be given as Windows format, start by converting to
45820  # unix format.
45821  new_path="$path"
45822
45823  windows_path="$new_path"
45824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45825    unix_path=`$CYGPATH -u "$windows_path"`
45826    new_path="$unix_path"
45827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45829    new_path="$unix_path"
45830  fi
45831
45832
45833  # Now try to locate executable using which
45834  new_path=`$WHICH "$new_path" 2> /dev/null`
45835
45836  if test "x$new_path" = x; then
45837    # Oops. Which didn't find the executable.
45838    # The splitting of arguments from the executable at a space might have been incorrect,
45839    # since paths with space are more likely in Windows. Give it another try with the whole
45840    # argument.
45841    path="$complete"
45842    arguments="EOL"
45843    new_path="$path"
45844
45845  windows_path="$new_path"
45846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847    unix_path=`$CYGPATH -u "$windows_path"`
45848    new_path="$unix_path"
45849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851    new_path="$unix_path"
45852  fi
45853
45854
45855    new_path=`$WHICH "$new_path" 2> /dev/null`
45856    # bat and cmd files are not always considered executable in MSYS causing which
45857    # to not find them
45858    if test "x$new_path" = x \
45859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45861      new_path="$path"
45862
45863  windows_path="$new_path"
45864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45865    unix_path=`$CYGPATH -u "$windows_path"`
45866    new_path="$unix_path"
45867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45869    new_path="$unix_path"
45870  fi
45871
45872    fi
45873
45874    if test "x$new_path" = x; then
45875      # It's still not found. Now this is an unrecoverable error.
45876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45877$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45878      has_space=`$ECHO "$complete" | $GREP " "`
45879      if test "x$has_space" != x; then
45880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45882      fi
45883      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45884    fi
45885  fi
45886
45887  # Now new_path has a complete unix path to the binary
45888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45889    # Keep paths in /bin as-is, but remove trailing .exe if any
45890    new_path="${new_path/%.exe/}"
45891    # Do not save /bin paths to all_fixpath_prefixes!
45892  else
45893    # Not in mixed or Windows style, start by that.
45894    new_path=`cmd //c echo $new_path`
45895
45896  input_path="$new_path"
45897  # Check if we need to convert this using DOS-style short mode. If the path
45898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45899  # take no chances and rewrite it.
45900  # Note: m4 eats our [], so we need to use [ and ] instead.
45901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45902  if test "x$has_forbidden_chars" != x; then
45903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45905  fi
45906
45907    # Output is in $new_path
45908
45909  windows_path="$new_path"
45910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911    unix_path=`$CYGPATH -u "$windows_path"`
45912    new_path="$unix_path"
45913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45915    new_path="$unix_path"
45916  fi
45917
45918    # remove trailing .exe if any
45919    new_path="${new_path/%.exe/}"
45920
45921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45923  fi
45924
45925    else
45926      # We're on a unix platform. Hooray! :)
45927      # First separate the path from the arguments. This will split at the first
45928      # space.
45929      complete="$BUILD_OBJCOPY"
45930      path="${complete%% *}"
45931      tmp="$complete EOL"
45932      arguments="${tmp#* }"
45933
45934      # Cannot rely on the command "which" here since it doesn't always work.
45935      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45936      if test -z "$is_absolute_path"; then
45937        # Path to executable is not absolute. Find it.
45938        IFS_save="$IFS"
45939        IFS=:
45940        for p in $PATH; do
45941          if test -f "$p/$path" && test -x "$p/$path"; then
45942            new_path="$p/$path"
45943            break
45944          fi
45945        done
45946        IFS="$IFS_save"
45947      else
45948        # This is an absolute path, we can use it without further modifications.
45949        new_path="$path"
45950      fi
45951
45952      if test "x$new_path" = x; then
45953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45954$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45955        has_space=`$ECHO "$complete" | $GREP " "`
45956        if test "x$has_space" != x; then
45957          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45959        fi
45960        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45961      fi
45962    fi
45963
45964    # Now join together the path and the arguments once again
45965    if test "x$arguments" != xEOL; then
45966      new_complete="$new_path ${arguments% *}"
45967    else
45968      new_complete="$new_path"
45969    fi
45970
45971    if test "x$complete" != "x$new_complete"; then
45972      BUILD_OBJCOPY="$new_complete"
45973      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45974$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45975    fi
45976  fi
45977
45978
45979
45980  # Publish this variable in the help.
45981
45982
45983  if [ -z "${BUILD_STRIP+x}" ]; then
45984    # The variable is not set by user, try to locate tool using the code snippet
45985    for ac_prog in strip
45986do
45987  # Extract the first word of "$ac_prog", so it can be a program name with args.
45988set dummy $ac_prog; ac_word=$2
45989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45990$as_echo_n "checking for $ac_word... " >&6; }
45991if ${ac_cv_path_BUILD_STRIP+:} false; then :
45992  $as_echo_n "(cached) " >&6
45993else
45994  case $BUILD_STRIP in
45995  [\\/]* | ?:[\\/]*)
45996  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45997  ;;
45998  *)
45999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46000for as_dir in $PATH
46001do
46002  IFS=$as_save_IFS
46003  test -z "$as_dir" && as_dir=.
46004    for ac_exec_ext in '' $ac_executable_extensions; do
46005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46006    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46008    break 2
46009  fi
46010done
46011  done
46012IFS=$as_save_IFS
46013
46014  ;;
46015esac
46016fi
46017BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46018if test -n "$BUILD_STRIP"; then
46019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46020$as_echo "$BUILD_STRIP" >&6; }
46021else
46022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46023$as_echo "no" >&6; }
46024fi
46025
46026
46027  test -n "$BUILD_STRIP" && break
46028done
46029
46030  else
46031    # The variable is set, but is it from the command line or the environment?
46032
46033    # Try to remove the string !BUILD_STRIP! from our list.
46034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46036      # If it failed, the variable was not from the command line. Ignore it,
46037      # but warn the user (except for BASH, which is always set by the calling BASH).
46038      if test "xBUILD_STRIP" != xBASH; then
46039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46040$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46041      fi
46042      # Try to locate tool using the code snippet
46043      for ac_prog in strip
46044do
46045  # Extract the first word of "$ac_prog", so it can be a program name with args.
46046set dummy $ac_prog; ac_word=$2
46047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46048$as_echo_n "checking for $ac_word... " >&6; }
46049if ${ac_cv_path_BUILD_STRIP+:} false; then :
46050  $as_echo_n "(cached) " >&6
46051else
46052  case $BUILD_STRIP in
46053  [\\/]* | ?:[\\/]*)
46054  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46055  ;;
46056  *)
46057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46058for as_dir in $PATH
46059do
46060  IFS=$as_save_IFS
46061  test -z "$as_dir" && as_dir=.
46062    for ac_exec_ext in '' $ac_executable_extensions; do
46063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46064    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46066    break 2
46067  fi
46068done
46069  done
46070IFS=$as_save_IFS
46071
46072  ;;
46073esac
46074fi
46075BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46076if test -n "$BUILD_STRIP"; then
46077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46078$as_echo "$BUILD_STRIP" >&6; }
46079else
46080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46081$as_echo "no" >&6; }
46082fi
46083
46084
46085  test -n "$BUILD_STRIP" && break
46086done
46087
46088    else
46089      # If it succeeded, then it was overridden by the user. We will use it
46090      # for the tool.
46091
46092      # First remove it from the list of overridden variables, so we can test
46093      # for unknown variables in the end.
46094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46095
46096      # Check if we try to supply an empty value
46097      if test "x$BUILD_STRIP" = x; then
46098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46099$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46101$as_echo_n "checking for BUILD_STRIP... " >&6; }
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46103$as_echo "disabled" >&6; }
46104      else
46105        # Check if the provided tool contains a complete path.
46106        tool_specified="$BUILD_STRIP"
46107        tool_basename="${tool_specified##*/}"
46108        if test "x$tool_basename" = "x$tool_specified"; then
46109          # A command without a complete path is provided, search $PATH.
46110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46111$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46112          # Extract the first word of "$tool_basename", so it can be a program name with args.
46113set dummy $tool_basename; ac_word=$2
46114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46115$as_echo_n "checking for $ac_word... " >&6; }
46116if ${ac_cv_path_BUILD_STRIP+:} false; then :
46117  $as_echo_n "(cached) " >&6
46118else
46119  case $BUILD_STRIP in
46120  [\\/]* | ?:[\\/]*)
46121  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46122  ;;
46123  *)
46124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46125for as_dir in $PATH
46126do
46127  IFS=$as_save_IFS
46128  test -z "$as_dir" && as_dir=.
46129    for ac_exec_ext in '' $ac_executable_extensions; do
46130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46131    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46133    break 2
46134  fi
46135done
46136  done
46137IFS=$as_save_IFS
46138
46139  ;;
46140esac
46141fi
46142BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46143if test -n "$BUILD_STRIP"; then
46144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46145$as_echo "$BUILD_STRIP" >&6; }
46146else
46147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46148$as_echo "no" >&6; }
46149fi
46150
46151
46152          if test "x$BUILD_STRIP" = x; then
46153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46154          fi
46155        else
46156          # Otherwise we believe it is a complete path. Use it as it is.
46157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46158$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46160$as_echo_n "checking for BUILD_STRIP... " >&6; }
46161          if test ! -x "$tool_specified"; then
46162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46163$as_echo "not found" >&6; }
46164            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46165          fi
46166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46167$as_echo "$tool_specified" >&6; }
46168        fi
46169      fi
46170    fi
46171
46172  fi
46173
46174
46175
46176  # Only process if variable expands to non-empty
46177
46178  if test "x$BUILD_STRIP" != x; then
46179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46180
46181  # First separate the path from the arguments. This will split at the first
46182  # space.
46183  complete="$BUILD_STRIP"
46184  path="${complete%% *}"
46185  tmp="$complete EOL"
46186  arguments="${tmp#* }"
46187
46188  # Input might be given as Windows format, start by converting to
46189  # unix format.
46190  new_path=`$CYGPATH -u "$path"`
46191
46192  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
46203    # The splitting of arguments from the executable at a space might have been incorrect,
46204    # since paths with space are more likely in Windows. Give it another try with the whole
46205    # argument.
46206    path="$complete"
46207    arguments="EOL"
46208    new_path=`$CYGPATH -u "$path"`
46209    new_path=`$WHICH "$new_path" 2> /dev/null`
46210    # bat and cmd files are not always considered executable in cygwin causing which
46211    # to not find them
46212    if test "x$new_path" = x \
46213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46215      new_path=`$CYGPATH -u "$path"`
46216    fi
46217    if test "x$new_path" = x; then
46218      # It's still not found. Now this is an unrecoverable error.
46219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46220$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46221      has_space=`$ECHO "$complete" | $GREP " "`
46222      if test "x$has_space" != x; then
46223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46225      fi
46226      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46227    fi
46228  fi
46229
46230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46233  # "foo.exe" is OK but "foo" is an error.
46234  #
46235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46236  # It is also a way to make sure we got the proper file name for the real test later on.
46237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46238  if test "x$test_shortpath" = x; then
46239    # Short path failed, file does not exist as specified.
46240    # Try adding .exe or .cmd
46241    if test -f "${new_path}.exe"; then
46242      input_to_shortpath="${new_path}.exe"
46243    elif test -f "${new_path}.cmd"; then
46244      input_to_shortpath="${new_path}.cmd"
46245    else
46246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46247$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46250      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46251    fi
46252  else
46253    input_to_shortpath="$new_path"
46254  fi
46255
46256  # Call helper function which possibly converts this using DOS-style short mode.
46257  # If so, the updated path is stored in $new_path.
46258  new_path="$input_to_shortpath"
46259
46260  input_path="$input_to_shortpath"
46261  # Check if we need to convert this using DOS-style short mode. If the path
46262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46263  # take no chances and rewrite it.
46264  # Note: m4 eats our [], so we need to use [ and ] instead.
46265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46266  if test "x$has_forbidden_chars" != x; then
46267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46271      # Going to short mode and back again did indeed matter. Since short mode is
46272      # case insensitive, let's make it lowercase to improve readability.
46273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46274      # Now convert it back to Unix-style (cygpath)
46275      input_path=`$CYGPATH -u "$shortmode_path"`
46276      new_path="$input_path"
46277    fi
46278  fi
46279
46280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46281  if test "x$test_cygdrive_prefix" = x; then
46282    # As a simple fix, exclude /usr/bin since it's not a real path.
46283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46285      # a path prefixed by /cygdrive for fixpath to work.
46286      new_path="$CYGWIN_ROOT_PATH$input_path"
46287    fi
46288  fi
46289
46290  # remove trailing .exe if any
46291  new_path="${new_path/%.exe/}"
46292
46293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294
46295  # First separate the path from the arguments. This will split at the first
46296  # space.
46297  complete="$BUILD_STRIP"
46298  path="${complete%% *}"
46299  tmp="$complete EOL"
46300  arguments="${tmp#* }"
46301
46302  # Input might be given as Windows format, start by converting to
46303  # unix format.
46304  new_path="$path"
46305
46306  windows_path="$new_path"
46307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46308    unix_path=`$CYGPATH -u "$windows_path"`
46309    new_path="$unix_path"
46310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46312    new_path="$unix_path"
46313  fi
46314
46315
46316  # Now try to locate executable using which
46317  new_path=`$WHICH "$new_path" 2> /dev/null`
46318
46319  if test "x$new_path" = x; then
46320    # Oops. Which didn't find the executable.
46321    # The splitting of arguments from the executable at a space might have been incorrect,
46322    # since paths with space are more likely in Windows. Give it another try with the whole
46323    # argument.
46324    path="$complete"
46325    arguments="EOL"
46326    new_path="$path"
46327
46328  windows_path="$new_path"
46329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46330    unix_path=`$CYGPATH -u "$windows_path"`
46331    new_path="$unix_path"
46332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46334    new_path="$unix_path"
46335  fi
46336
46337
46338    new_path=`$WHICH "$new_path" 2> /dev/null`
46339    # bat and cmd files are not always considered executable in MSYS causing which
46340    # to not find them
46341    if test "x$new_path" = x \
46342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46344      new_path="$path"
46345
46346  windows_path="$new_path"
46347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46348    unix_path=`$CYGPATH -u "$windows_path"`
46349    new_path="$unix_path"
46350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46352    new_path="$unix_path"
46353  fi
46354
46355    fi
46356
46357    if test "x$new_path" = x; then
46358      # It's still not found. Now this is an unrecoverable error.
46359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46360$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46361      has_space=`$ECHO "$complete" | $GREP " "`
46362      if test "x$has_space" != x; then
46363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46365      fi
46366      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46367    fi
46368  fi
46369
46370  # Now new_path has a complete unix path to the binary
46371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46372    # Keep paths in /bin as-is, but remove trailing .exe if any
46373    new_path="${new_path/%.exe/}"
46374    # Do not save /bin paths to all_fixpath_prefixes!
46375  else
46376    # Not in mixed or Windows style, start by that.
46377    new_path=`cmd //c echo $new_path`
46378
46379  input_path="$new_path"
46380  # Check if we need to convert this using DOS-style short mode. If the path
46381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46382  # take no chances and rewrite it.
46383  # Note: m4 eats our [], so we need to use [ and ] instead.
46384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46385  if test "x$has_forbidden_chars" != x; then
46386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46388  fi
46389
46390    # Output is in $new_path
46391
46392  windows_path="$new_path"
46393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46394    unix_path=`$CYGPATH -u "$windows_path"`
46395    new_path="$unix_path"
46396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46398    new_path="$unix_path"
46399  fi
46400
46401    # remove trailing .exe if any
46402    new_path="${new_path/%.exe/}"
46403
46404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46406  fi
46407
46408    else
46409      # We're on a unix platform. Hooray! :)
46410      # First separate the path from the arguments. This will split at the first
46411      # space.
46412      complete="$BUILD_STRIP"
46413      path="${complete%% *}"
46414      tmp="$complete EOL"
46415      arguments="${tmp#* }"
46416
46417      # Cannot rely on the command "which" here since it doesn't always work.
46418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46419      if test -z "$is_absolute_path"; then
46420        # Path to executable is not absolute. Find it.
46421        IFS_save="$IFS"
46422        IFS=:
46423        for p in $PATH; do
46424          if test -f "$p/$path" && test -x "$p/$path"; then
46425            new_path="$p/$path"
46426            break
46427          fi
46428        done
46429        IFS="$IFS_save"
46430      else
46431        # This is an absolute path, we can use it without further modifications.
46432        new_path="$path"
46433      fi
46434
46435      if test "x$new_path" = x; then
46436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46437$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46438        has_space=`$ECHO "$complete" | $GREP " "`
46439        if test "x$has_space" != x; then
46440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46442        fi
46443        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46444      fi
46445    fi
46446
46447    # Now join together the path and the arguments once again
46448    if test "x$arguments" != xEOL; then
46449      new_complete="$new_path ${arguments% *}"
46450    else
46451      new_complete="$new_path"
46452    fi
46453
46454    if test "x$complete" != "x$new_complete"; then
46455      BUILD_STRIP="$new_complete"
46456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46457$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46458    fi
46459  fi
46460
46461    # Assume the C compiler is the assembler
46462    BUILD_AS="$BUILD_CC -c"
46463    # Just like for the target compiler, use the compiler as linker
46464    BUILD_LD="$BUILD_CC"
46465    BUILD_LDCXX="$BUILD_CXX"
46466
46467    PATH="$OLDPATH"
46468  else
46469    # If we are not cross compiling, use the normal target compilers for
46470    # building the build platform executables.
46471    BUILD_CC="$CC"
46472    BUILD_CXX="$CXX"
46473    BUILD_LD="$LD"
46474    BUILD_LDCXX="$LDCXX"
46475    BUILD_NM="$NM"
46476    BUILD_AS="$AS"
46477    BUILD_OBJCOPY="$OBJCOPY"
46478    BUILD_STRIP="$STRIP"
46479    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46480    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46481    BUILD_AR="$AR"
46482  fi
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494
46495  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46496    # For hotspot, we need these in Windows mixed path,
46497    # so rewrite them all. Need added .exe suffix.
46498    HOTSPOT_CXX="$CXX.exe"
46499    HOTSPOT_LD="$LD.exe"
46500    HOTSPOT_MT="$MT.exe"
46501    HOTSPOT_RC="$RC.exe"
46502
46503  unix_path="$HOTSPOT_CXX"
46504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46505    windows_path=`$CYGPATH -m "$unix_path"`
46506    HOTSPOT_CXX="$windows_path"
46507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46508    windows_path=`cmd //c echo $unix_path`
46509    HOTSPOT_CXX="$windows_path"
46510  fi
46511
46512
46513  unix_path="$HOTSPOT_LD"
46514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46515    windows_path=`$CYGPATH -m "$unix_path"`
46516    HOTSPOT_LD="$windows_path"
46517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46518    windows_path=`cmd //c echo $unix_path`
46519    HOTSPOT_LD="$windows_path"
46520  fi
46521
46522
46523  unix_path="$HOTSPOT_MT"
46524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46525    windows_path=`$CYGPATH -m "$unix_path"`
46526    HOTSPOT_MT="$windows_path"
46527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46528    windows_path=`cmd //c echo $unix_path`
46529    HOTSPOT_MT="$windows_path"
46530  fi
46531
46532
46533  unix_path="$HOTSPOT_RC"
46534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46535    windows_path=`$CYGPATH -m "$unix_path"`
46536    HOTSPOT_RC="$windows_path"
46537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46538    windows_path=`cmd //c echo $unix_path`
46539    HOTSPOT_RC="$windows_path"
46540  fi
46541
46542
46543
46544  else
46545    HOTSPOT_CXX="$CXX"
46546    HOTSPOT_LD="$LD"
46547  fi
46548
46549
46550
46551  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46552    USE_CLANG=true
46553  fi
46554
46555
46556
46557
46558
46559  # The package path is used only on macosx?
46560  # FIXME: clean this up, and/or move it elsewhere.
46561  PACKAGE_PATH=/opt/local
46562
46563
46564  # Check for extra potential brokenness.
46565  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46566    # On Windows, double-check that we got the right compiler.
46567    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46568    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46569    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46570      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46571        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
46572      fi
46573    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46574      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46575        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46576      fi
46577    fi
46578  fi
46579
46580  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46581    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46582    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46583    # This is later checked when setting flags.
46584
46585    # "-Og" suppported for GCC 4.8 and later
46586    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634    # Execute function body
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664
46665
46666
46667
46668
46669
46670
46671
46672
46673
46674
46675
46676
46677
46678
46679
46680
46681
46682
46683    # Execute function body
46684
46685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46686$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46687  supports=yes
46688
46689  saved_cflags="$CFLAGS"
46690  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46691  ac_ext=c
46692ac_cpp='$CPP $CPPFLAGS'
46693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46695ac_compiler_gnu=$ac_cv_c_compiler_gnu
46696
46697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46698/* end confdefs.h.  */
46699int i;
46700_ACEOF
46701if ac_fn_c_try_compile "$LINENO"; then :
46702
46703else
46704  supports=no
46705fi
46706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46707  ac_ext=cpp
46708ac_cpp='$CXXCPP $CPPFLAGS'
46709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46712
46713  CFLAGS="$saved_cflags"
46714
46715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46716$as_echo "$supports" >&6; }
46717  if test "x$supports" = "xyes" ; then
46718    :
46719    C_COMP_SUPPORTS="yes"
46720  else
46721    :
46722    C_COMP_SUPPORTS="no"
46723  fi
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783    # Execute function body
46784
46785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46786$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46787  supports=yes
46788
46789  saved_cxxflags="$CXXFLAGS"
46790  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46791  ac_ext=cpp
46792ac_cpp='$CXXCPP $CPPFLAGS'
46793ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46794ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46795ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46796
46797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46798/* end confdefs.h.  */
46799int i;
46800_ACEOF
46801if ac_fn_cxx_try_compile "$LINENO"; then :
46802
46803else
46804  supports=no
46805fi
46806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46807  ac_ext=cpp
46808ac_cpp='$CXXCPP $CPPFLAGS'
46809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46812
46813  CXXFLAGS="$saved_cxxflags"
46814
46815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46816$as_echo "$supports" >&6; }
46817  if test "x$supports" = "xyes" ; then
46818    :
46819    CXX_COMP_SUPPORTS="yes"
46820  else
46821    :
46822    CXX_COMP_SUPPORTS="no"
46823  fi
46824
46825
46826
46827
46828
46829
46830
46831
46832
46833
46834
46835
46836
46837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46838$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46839  supports=no
46840  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46841
46842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46843$as_echo "$supports" >&6; }
46844  if test "x$supports" = "xyes" ; then
46845    :
46846    HAS_CFLAG_OPTIMIZE_DEBUG=true
46847  else
46848    :
46849    HAS_CFLAG_OPTIMIZE_DEBUG=false
46850  fi
46851
46852
46853
46854
46855
46856
46857
46858    # "-z relro" supported in GNU binutils 2.17 and later
46859    LINKER_RELRO_FLAG="-Wl,-z,relro"
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907    # Execute function body
46908
46909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46910$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46911  supports=yes
46912
46913  saved_ldflags="$LDFLAGS"
46914  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46915  ac_ext=c
46916ac_cpp='$CPP $CPPFLAGS'
46917ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46918ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46919ac_compiler_gnu=$ac_cv_c_compiler_gnu
46920
46921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46922/* end confdefs.h.  */
46923
46924int
46925main ()
46926{
46927
46928  ;
46929  return 0;
46930}
46931_ACEOF
46932if ac_fn_c_try_link "$LINENO"; then :
46933
46934else
46935  supports=no
46936fi
46937rm -f core conftest.err conftest.$ac_objext \
46938    conftest$ac_exeext conftest.$ac_ext
46939  ac_ext=cpp
46940ac_cpp='$CXXCPP $CPPFLAGS'
46941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46944
46945  LDFLAGS="$saved_ldflags"
46946
46947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46948$as_echo "$supports" >&6; }
46949  if test "x$supports" = "xyes" ; then
46950    :
46951    HAS_LINKER_RELRO=true
46952  else
46953    :
46954    HAS_LINKER_RELRO=false
46955  fi
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969    # "-z now" supported in GNU binutils 2.11 and later
46970    LINKER_NOW_FLAG="-Wl,-z,now"
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018    # Execute function body
47019
47020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47021$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47022  supports=yes
47023
47024  saved_ldflags="$LDFLAGS"
47025  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47026  ac_ext=c
47027ac_cpp='$CPP $CPPFLAGS'
47028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47030ac_compiler_gnu=$ac_cv_c_compiler_gnu
47031
47032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47033/* end confdefs.h.  */
47034
47035int
47036main ()
47037{
47038
47039  ;
47040  return 0;
47041}
47042_ACEOF
47043if ac_fn_c_try_link "$LINENO"; then :
47044
47045else
47046  supports=no
47047fi
47048rm -f core conftest.err conftest.$ac_objext \
47049    conftest$ac_exeext conftest.$ac_ext
47050  ac_ext=cpp
47051ac_cpp='$CXXCPP $CPPFLAGS'
47052ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47053ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47054ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47055
47056  LDFLAGS="$saved_ldflags"
47057
47058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47059$as_echo "$supports" >&6; }
47060  if test "x$supports" = "xyes" ; then
47061    :
47062    HAS_LINKER_NOW=true
47063  else
47064    :
47065    HAS_LINKER_NOW=false
47066  fi
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079  fi
47080
47081  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47082  # in executable.'
47083  USING_BROKEN_SUSE_LD=no
47084  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47086$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47087    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47088    $ECHO "int main() { }" > main.c
47089    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47091$as_echo "no" >&6; }
47092      USING_BROKEN_SUSE_LD=no
47093    else
47094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47095$as_echo "yes" >&6; }
47096      USING_BROKEN_SUSE_LD=yes
47097    fi
47098    rm -rf version-script.map main.c a.out
47099  fi
47100
47101
47102  # Setup hotspot lecagy names for toolchains
47103  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47104  if test "x$TOOLCHAIN_TYPE" = xclang; then
47105    HOTSPOT_TOOLCHAIN_TYPE=gcc
47106  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47107    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47108  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47109    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47110  fi
47111
47112
47113
47114# Setup the JTReg Regression Test Harness.
47115
47116
47117# Check whether --with-jtreg was given.
47118if test "${with_jtreg+set}" = set; then :
47119  withval=$with_jtreg;
47120else
47121  with_jtreg=no
47122fi
47123
47124
47125  if test "x$with_jtreg" = xno; then
47126    # jtreg disabled
47127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47128$as_echo_n "checking for jtreg... " >&6; }
47129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47130$as_echo "no" >&6; }
47131  else
47132    if test "x$with_jtreg" != xyes; then
47133      # with path specified.
47134      JT_HOME="$with_jtreg"
47135    fi
47136
47137    if test "x$JT_HOME" != x; then
47138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47139$as_echo_n "checking for jtreg... " >&6; }
47140
47141      # use JT_HOME enviroment var.
47142
47143  # Only process if variable expands to non-empty
47144
47145  if test "x$JT_HOME" != x; then
47146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47147
47148  # Input might be given as Windows format, start by converting to
47149  # unix format.
47150  path="$JT_HOME"
47151  new_path=`$CYGPATH -u "$path"`
47152
47153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47156  # "foo.exe" is OK but "foo" is an error.
47157  #
47158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47159  # It is also a way to make sure we got the proper file name for the real test later on.
47160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47161  if test "x$test_shortpath" = x; then
47162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47163$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47164    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47165  fi
47166
47167  # Call helper function which possibly converts this using DOS-style short mode.
47168  # If so, the updated path is stored in $new_path.
47169
47170  input_path="$new_path"
47171  # Check if we need to convert this using DOS-style short mode. If the path
47172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47173  # take no chances and rewrite it.
47174  # Note: m4 eats our [], so we need to use [ and ] instead.
47175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47176  if test "x$has_forbidden_chars" != x; then
47177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47181      # Going to short mode and back again did indeed matter. Since short mode is
47182      # case insensitive, let's make it lowercase to improve readability.
47183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47184      # Now convert it back to Unix-style (cygpath)
47185      input_path=`$CYGPATH -u "$shortmode_path"`
47186      new_path="$input_path"
47187    fi
47188  fi
47189
47190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47191  if test "x$test_cygdrive_prefix" = x; then
47192    # As a simple fix, exclude /usr/bin since it's not a real path.
47193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47195      # a path prefixed by /cygdrive for fixpath to work.
47196      new_path="$CYGWIN_ROOT_PATH$input_path"
47197    fi
47198  fi
47199
47200
47201  if test "x$path" != "x$new_path"; then
47202    JT_HOME="$new_path"
47203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47204$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47205  fi
47206
47207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47208
47209  path="$JT_HOME"
47210  has_colon=`$ECHO $path | $GREP ^.:`
47211  new_path="$path"
47212  if test "x$has_colon" = x; then
47213    # Not in mixed or Windows style, start by that.
47214    new_path=`cmd //c echo $path`
47215  fi
47216
47217
47218  input_path="$new_path"
47219  # Check if we need to convert this using DOS-style short mode. If the path
47220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47221  # take no chances and rewrite it.
47222  # Note: m4 eats our [], so we need to use [ and ] instead.
47223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47224  if test "x$has_forbidden_chars" != x; then
47225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47227  fi
47228
47229
47230  windows_path="$new_path"
47231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47232    unix_path=`$CYGPATH -u "$windows_path"`
47233    new_path="$unix_path"
47234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47236    new_path="$unix_path"
47237  fi
47238
47239  if test "x$path" != "x$new_path"; then
47240    JT_HOME="$new_path"
47241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47242$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47243  fi
47244
47245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47247
47248    else
47249      # We're on a unix platform. Hooray! :)
47250      path="$JT_HOME"
47251      has_space=`$ECHO "$path" | $GREP " "`
47252      if test "x$has_space" != x; then
47253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47254$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47255        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47256      fi
47257
47258      # Use eval to expand a potential ~
47259      eval path="$path"
47260      if test ! -f "$path" && test ! -d "$path"; then
47261        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47262      fi
47263
47264      if test -d "$path"; then
47265        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47266      else
47267        dir="`$DIRNAME "$path"`"
47268        base="`$BASENAME "$path"`"
47269        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47270      fi
47271    fi
47272  fi
47273
47274
47275      # jtreg win32 script works for everybody
47276      JTREGEXE="$JT_HOME/bin/jtreg"
47277
47278      if test ! -f "$JTREGEXE"; then
47279        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47280      fi
47281
47282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47283$as_echo "$JTREGEXE" >&6; }
47284    else
47285      # try to find jtreg on path
47286
47287
47288
47289  # Publish this variable in the help.
47290
47291
47292  if [ -z "${JTREGEXE+x}" ]; then
47293    # The variable is not set by user, try to locate tool using the code snippet
47294    for ac_prog in jtreg
47295do
47296  # Extract the first word of "$ac_prog", so it can be a program name with args.
47297set dummy $ac_prog; ac_word=$2
47298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47299$as_echo_n "checking for $ac_word... " >&6; }
47300if ${ac_cv_path_JTREGEXE+:} false; then :
47301  $as_echo_n "(cached) " >&6
47302else
47303  case $JTREGEXE in
47304  [\\/]* | ?:[\\/]*)
47305  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47306  ;;
47307  *)
47308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47309for as_dir in $PATH
47310do
47311  IFS=$as_save_IFS
47312  test -z "$as_dir" && as_dir=.
47313    for ac_exec_ext in '' $ac_executable_extensions; do
47314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47315    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47317    break 2
47318  fi
47319done
47320  done
47321IFS=$as_save_IFS
47322
47323  ;;
47324esac
47325fi
47326JTREGEXE=$ac_cv_path_JTREGEXE
47327if test -n "$JTREGEXE"; then
47328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47329$as_echo "$JTREGEXE" >&6; }
47330else
47331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47332$as_echo "no" >&6; }
47333fi
47334
47335
47336  test -n "$JTREGEXE" && break
47337done
47338
47339  else
47340    # The variable is set, but is it from the command line or the environment?
47341
47342    # Try to remove the string !JTREGEXE! from our list.
47343    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47344    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47345      # If it failed, the variable was not from the command line. Ignore it,
47346      # but warn the user (except for BASH, which is always set by the calling BASH).
47347      if test "xJTREGEXE" != xBASH; then
47348        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47349$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47350      fi
47351      # Try to locate tool using the code snippet
47352      for ac_prog in jtreg
47353do
47354  # Extract the first word of "$ac_prog", so it can be a program name with args.
47355set dummy $ac_prog; ac_word=$2
47356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47357$as_echo_n "checking for $ac_word... " >&6; }
47358if ${ac_cv_path_JTREGEXE+:} false; then :
47359  $as_echo_n "(cached) " >&6
47360else
47361  case $JTREGEXE in
47362  [\\/]* | ?:[\\/]*)
47363  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47364  ;;
47365  *)
47366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47367for as_dir in $PATH
47368do
47369  IFS=$as_save_IFS
47370  test -z "$as_dir" && as_dir=.
47371    for ac_exec_ext in '' $ac_executable_extensions; do
47372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47373    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47375    break 2
47376  fi
47377done
47378  done
47379IFS=$as_save_IFS
47380
47381  ;;
47382esac
47383fi
47384JTREGEXE=$ac_cv_path_JTREGEXE
47385if test -n "$JTREGEXE"; then
47386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47387$as_echo "$JTREGEXE" >&6; }
47388else
47389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47390$as_echo "no" >&6; }
47391fi
47392
47393
47394  test -n "$JTREGEXE" && break
47395done
47396
47397    else
47398      # If it succeeded, then it was overridden by the user. We will use it
47399      # for the tool.
47400
47401      # First remove it from the list of overridden variables, so we can test
47402      # for unknown variables in the end.
47403      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47404
47405      # Check if we try to supply an empty value
47406      if test "x$JTREGEXE" = x; then
47407        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47408$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47410$as_echo_n "checking for JTREGEXE... " >&6; }
47411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47412$as_echo "disabled" >&6; }
47413      else
47414        # Check if the provided tool contains a complete path.
47415        tool_specified="$JTREGEXE"
47416        tool_basename="${tool_specified##*/}"
47417        if test "x$tool_basename" = "x$tool_specified"; then
47418          # A command without a complete path is provided, search $PATH.
47419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47420$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47421          # Extract the first word of "$tool_basename", so it can be a program name with args.
47422set dummy $tool_basename; ac_word=$2
47423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47424$as_echo_n "checking for $ac_word... " >&6; }
47425if ${ac_cv_path_JTREGEXE+:} false; then :
47426  $as_echo_n "(cached) " >&6
47427else
47428  case $JTREGEXE in
47429  [\\/]* | ?:[\\/]*)
47430  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47431  ;;
47432  *)
47433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47434for as_dir in $PATH
47435do
47436  IFS=$as_save_IFS
47437  test -z "$as_dir" && as_dir=.
47438    for ac_exec_ext in '' $ac_executable_extensions; do
47439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47440    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47442    break 2
47443  fi
47444done
47445  done
47446IFS=$as_save_IFS
47447
47448  ;;
47449esac
47450fi
47451JTREGEXE=$ac_cv_path_JTREGEXE
47452if test -n "$JTREGEXE"; then
47453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47454$as_echo "$JTREGEXE" >&6; }
47455else
47456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47457$as_echo "no" >&6; }
47458fi
47459
47460
47461          if test "x$JTREGEXE" = x; then
47462            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47463          fi
47464        else
47465          # Otherwise we believe it is a complete path. Use it as it is.
47466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47467$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47468          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47469$as_echo_n "checking for JTREGEXE... " >&6; }
47470          if test ! -x "$tool_specified"; then
47471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47472$as_echo "not found" >&6; }
47473            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47474          fi
47475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47476$as_echo "$tool_specified" >&6; }
47477        fi
47478      fi
47479    fi
47480
47481  fi
47482
47483
47484
47485  if test "x$JTREGEXE" = x; then
47486    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47487  fi
47488
47489
47490      JT_HOME="`$DIRNAME $JTREGEXE`"
47491    fi
47492  fi
47493
47494
47495
47496
47497
47498
47499  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47500  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47501  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47502  #                              commands produced by the link step (currently AIX only)
47503  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47504    COMPILER_TARGET_BITS_FLAG="-q"
47505    COMPILER_COMMAND_FILE_FLAG="-f"
47506    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47507  else
47508    COMPILER_TARGET_BITS_FLAG="-m"
47509    COMPILER_COMMAND_FILE_FLAG="@"
47510    COMPILER_BINDCMD_FILE_FLAG=""
47511
47512    # The solstudio linker does not support @-files.
47513    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47514      COMPILER_COMMAND_FILE_FLAG=
47515    fi
47516
47517    # Check if @file is supported by gcc
47518    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47520$as_echo_n "checking if @file is supported by gcc... " >&6; }
47521      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47522      $ECHO "" "--version" > command.file
47523      if $CXX @command.file 2>&5 >&5; then
47524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47525$as_echo "yes" >&6; }
47526        COMPILER_COMMAND_FILE_FLAG="@"
47527      else
47528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47529$as_echo "no" >&6; }
47530        COMPILER_COMMAND_FILE_FLAG=
47531      fi
47532      rm -rf command.file
47533    fi
47534  fi
47535
47536
47537
47538
47539  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47540  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47541    ARFLAGS="-r"
47542  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47543    ARFLAGS="-X64"
47544  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47545    # lib.exe is used as AR to create static libraries.
47546    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47547  else
47548    ARFLAGS=""
47549  fi
47550
47551
47552  ## Setup strip.
47553  # FIXME: should this really be per platform, or should it be per toolchain type?
47554  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47555  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47556  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47557    STRIPFLAGS="-g"
47558  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47559    STRIPFLAGS="-x"
47560  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47561    STRIPFLAGS="-S"
47562  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47563    STRIPFLAGS="-X32_64"
47564  fi
47565
47566
47567
47568  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47569    CC_OUT_OPTION=-Fo
47570    EXE_OUT_OPTION=-out:
47571    LD_OUT_OPTION=-out:
47572    AR_OUT_OPTION=-out:
47573  else
47574    # The option used to specify the target .o,.a or .so file.
47575    # When compiling, how to specify the to be created object file.
47576    CC_OUT_OPTION='-o$(SPACE)'
47577    # When linking, how to specify the to be created executable.
47578    EXE_OUT_OPTION='-o$(SPACE)'
47579    # When linking, how to specify the to be created dynamically linkable library.
47580    LD_OUT_OPTION='-o$(SPACE)'
47581    # When archiving, how to specify the to be create static archive for object files.
47582    AR_OUT_OPTION='rcs$(SPACE)'
47583  fi
47584
47585
47586
47587
47588
47589  # On Windows, we need to set RC flags.
47590  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47591    RC_FLAGS="-nologo -l0x409"
47592    JVM_RCFLAGS="-nologo"
47593    if test "x$DEBUG_LEVEL" = xrelease; then
47594      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47595      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47596    fi
47597
47598    # The version variables used to create RC_FLAGS may be overridden
47599    # in a custom configure script, or possibly the command line.
47600    # Let those variables be expanded at make time in spec.gmk.
47601    # The \$ are escaped to the shell, and the $(...) variables
47602    # are evaluated by make.
47603    RC_FLAGS="$RC_FLAGS \
47604        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47605        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47606        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47607        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47608        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47609        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47610        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47611
47612    JVM_RCFLAGS="$JVM_RCFLAGS \
47613        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47614        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47615        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47616        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47617        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47618        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47619        -D\"HS_FNAME=jvm.dll\" \
47620        -D\"HS_INTERNAL_NAME=jvm\""
47621  fi
47622
47623
47624
47625  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47626    # silence copyright notice and other headers.
47627    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47628  fi
47629
47630
47631# Now we can test some aspects on the target using configure macros.
47632
47633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47634$as_echo_n "checking for ANSI C header files... " >&6; }
47635if ${ac_cv_header_stdc+:} false; then :
47636  $as_echo_n "(cached) " >&6
47637else
47638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47639/* end confdefs.h.  */
47640#include <stdlib.h>
47641#include <stdarg.h>
47642#include <string.h>
47643#include <float.h>
47644
47645int
47646main ()
47647{
47648
47649  ;
47650  return 0;
47651}
47652_ACEOF
47653if ac_fn_cxx_try_compile "$LINENO"; then :
47654  ac_cv_header_stdc=yes
47655else
47656  ac_cv_header_stdc=no
47657fi
47658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47659
47660if test $ac_cv_header_stdc = yes; then
47661  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47663/* end confdefs.h.  */
47664#include <string.h>
47665
47666_ACEOF
47667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47668  $EGREP "memchr" >/dev/null 2>&1; then :
47669
47670else
47671  ac_cv_header_stdc=no
47672fi
47673rm -f conftest*
47674
47675fi
47676
47677if test $ac_cv_header_stdc = yes; then
47678  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47680/* end confdefs.h.  */
47681#include <stdlib.h>
47682
47683_ACEOF
47684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47685  $EGREP "free" >/dev/null 2>&1; then :
47686
47687else
47688  ac_cv_header_stdc=no
47689fi
47690rm -f conftest*
47691
47692fi
47693
47694if test $ac_cv_header_stdc = yes; then
47695  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47696  if test "$cross_compiling" = yes; then :
47697  :
47698else
47699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47700/* end confdefs.h.  */
47701#include <ctype.h>
47702#include <stdlib.h>
47703#if ((' ' & 0x0FF) == 0x020)
47704# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47705# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47706#else
47707# define ISLOWER(c) \
47708		   (('a' <= (c) && (c) <= 'i') \
47709		     || ('j' <= (c) && (c) <= 'r') \
47710		     || ('s' <= (c) && (c) <= 'z'))
47711# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47712#endif
47713
47714#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47715int
47716main ()
47717{
47718  int i;
47719  for (i = 0; i < 256; i++)
47720    if (XOR (islower (i), ISLOWER (i))
47721	|| toupper (i) != TOUPPER (i))
47722      return 2;
47723  return 0;
47724}
47725_ACEOF
47726if ac_fn_cxx_try_run "$LINENO"; then :
47727
47728else
47729  ac_cv_header_stdc=no
47730fi
47731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47732  conftest.$ac_objext conftest.beam conftest.$ac_ext
47733fi
47734
47735fi
47736fi
47737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47738$as_echo "$ac_cv_header_stdc" >&6; }
47739if test $ac_cv_header_stdc = yes; then
47740
47741$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47742
47743fi
47744
47745# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47746for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47747		  inttypes.h stdint.h unistd.h
47748do :
47749  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47750ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47751"
47752if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47753  cat >>confdefs.h <<_ACEOF
47754#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47755_ACEOF
47756
47757fi
47758
47759done
47760
47761
47762
47763  ###############################################################################
47764  #
47765  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47766  # (The JVM can use 32 or 64 bit Java pointers but that decision
47767  # is made at runtime.)
47768  #
47769
47770  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47771    # Always specify -m flag on Solaris
47772    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47773
47774  # When we add flags to the "official" CFLAGS etc, we need to
47775  # keep track of these additions in ADDED_CFLAGS etc. These
47776  # will later be checked to make sure only controlled additions
47777  # have been made to CFLAGS etc.
47778  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47779  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47780  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47781
47782  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47783  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47784  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47785
47786  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47787  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47788  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47789
47790  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47791  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47792  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47793
47794  elif test "x$COMPILE_TYPE" = xreduced; then
47795    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47796      # Specify -m if running reduced on unix platforms
47797
47798  # When we add flags to the "official" CFLAGS etc, we need to
47799  # keep track of these additions in ADDED_CFLAGS etc. These
47800  # will later be checked to make sure only controlled additions
47801  # have been made to CFLAGS etc.
47802  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47803  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47804  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47805
47806  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47807  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47808  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47809
47810  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47811  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47812  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47813
47814  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47815  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47816  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47817
47818    fi
47819  fi
47820  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47821    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47822    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47823    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47824  fi
47825
47826  # Make compilation sanity check
47827  for ac_header in stdio.h
47828do :
47829  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47830if test "x$ac_cv_header_stdio_h" = xyes; then :
47831  cat >>confdefs.h <<_ACEOF
47832#define HAVE_STDIO_H 1
47833_ACEOF
47834
47835else
47836
47837    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47838$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47839    if test "x$COMPILE_TYPE" = xreduced; then
47840
47841  # Print a helpful message on how to acquire the necessary build dependency.
47842  # reduced is the help tag: freetype, cups, alsa etc
47843  MISSING_DEPENDENCY=reduced
47844
47845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47846    cygwin_help $MISSING_DEPENDENCY
47847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47848    msys_help $MISSING_DEPENDENCY
47849  else
47850    PKGHANDLER_COMMAND=
47851
47852    case $PKGHANDLER in
47853      apt-get)
47854        apt_help     $MISSING_DEPENDENCY ;;
47855      yum)
47856        yum_help     $MISSING_DEPENDENCY ;;
47857      port)
47858        port_help    $MISSING_DEPENDENCY ;;
47859      pkgutil)
47860        pkgutil_help $MISSING_DEPENDENCY ;;
47861      pkgadd)
47862        pkgadd_help  $MISSING_DEPENDENCY ;;
47863    esac
47864
47865    if test "x$PKGHANDLER_COMMAND" != x; then
47866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47867    fi
47868  fi
47869
47870      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47871$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47872    elif test "x$COMPILE_TYPE" = xcross; then
47873      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47874$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47875    fi
47876    as_fn_error $? "Cannot continue." "$LINENO" 5
47877
47878fi
47879
47880done
47881
47882
47883  # The cast to long int works around a bug in the HP C Compiler
47884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47886# This bug is HP SR number 8606223364.
47887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47888$as_echo_n "checking size of int *... " >&6; }
47889if ${ac_cv_sizeof_int_p+:} false; then :
47890  $as_echo_n "(cached) " >&6
47891else
47892  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47893
47894else
47895  if test "$ac_cv_type_int_p" = yes; then
47896     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47898as_fn_error 77 "cannot compute sizeof (int *)
47899See \`config.log' for more details" "$LINENO" 5; }
47900   else
47901     ac_cv_sizeof_int_p=0
47902   fi
47903fi
47904
47905fi
47906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47907$as_echo "$ac_cv_sizeof_int_p" >&6; }
47908
47909
47910
47911cat >>confdefs.h <<_ACEOF
47912#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47913_ACEOF
47914
47915
47916
47917  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47918  if test "x$ac_cv_sizeof_int_p" = x; then
47919    # The test failed, lets stick to the assumed value.
47920    { $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
47921$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47922  else
47923    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47924
47925    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47926      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47927      # Let's try to implicitely set the compilers target architecture and retry the test
47928      { $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
47929$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;}
47930      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47931$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47932
47933  # When we add flags to the "official" CFLAGS etc, we need to
47934  # keep track of these additions in ADDED_CFLAGS etc. These
47935  # will later be checked to make sure only controlled additions
47936  # have been made to CFLAGS etc.
47937  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47938  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47939  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47940
47941  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47942  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47943  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47944
47945  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47946  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47947  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47948
47949  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47950  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47951  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47952
47953
47954      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47955      unset ac_cv_sizeof_int_p
47956      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47957      cat >>confdefs.h <<_ACEOF
47958#undef SIZEOF_INT_P
47959_ACEOF
47960
47961      # The cast to long int works around a bug in the HP C Compiler
47962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47964# This bug is HP SR number 8606223364.
47965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47966$as_echo_n "checking size of int *... " >&6; }
47967if ${ac_cv_sizeof_int_p+:} false; then :
47968  $as_echo_n "(cached) " >&6
47969else
47970  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47971
47972else
47973  if test "$ac_cv_type_int_p" = yes; then
47974     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47976as_fn_error 77 "cannot compute sizeof (int *)
47977See \`config.log' for more details" "$LINENO" 5; }
47978   else
47979     ac_cv_sizeof_int_p=0
47980   fi
47981fi
47982
47983fi
47984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47985$as_echo "$ac_cv_sizeof_int_p" >&6; }
47986
47987
47988
47989cat >>confdefs.h <<_ACEOF
47990#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47991_ACEOF
47992
47993
47994
47995      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47996
47997      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47998        { $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
47999$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;}
48000        if test "x$COMPILE_TYPE" = xreduced; then
48001
48002  # Print a helpful message on how to acquire the necessary build dependency.
48003  # reduced is the help tag: freetype, cups, alsa etc
48004  MISSING_DEPENDENCY=reduced
48005
48006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48007    cygwin_help $MISSING_DEPENDENCY
48008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48009    msys_help $MISSING_DEPENDENCY
48010  else
48011    PKGHANDLER_COMMAND=
48012
48013    case $PKGHANDLER in
48014      apt-get)
48015        apt_help     $MISSING_DEPENDENCY ;;
48016      yum)
48017        yum_help     $MISSING_DEPENDENCY ;;
48018      port)
48019        port_help    $MISSING_DEPENDENCY ;;
48020      pkgutil)
48021        pkgutil_help $MISSING_DEPENDENCY ;;
48022      pkgadd)
48023        pkgadd_help  $MISSING_DEPENDENCY ;;
48024    esac
48025
48026    if test "x$PKGHANDLER_COMMAND" != x; then
48027      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48028    fi
48029  fi
48030
48031          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48032$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48033        elif test "x$COMPILE_TYPE" = xcross; then
48034          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48035$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48036        fi
48037        as_fn_error $? "Cannot continue." "$LINENO" 5
48038      fi
48039    fi
48040  fi
48041
48042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48043$as_echo_n "checking for target address size... " >&6; }
48044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48045$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48046
48047
48048  ###############################################################################
48049  #
48050  # Is the target little of big endian?
48051  #
48052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48053$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48054if ${ac_cv_c_bigendian+:} false; then :
48055  $as_echo_n "(cached) " >&6
48056else
48057  ac_cv_c_bigendian=unknown
48058    # See if we're dealing with a universal compiler.
48059    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48060/* end confdefs.h.  */
48061#ifndef __APPLE_CC__
48062	       not a universal capable compiler
48063	     #endif
48064	     typedef int dummy;
48065
48066_ACEOF
48067if ac_fn_cxx_try_compile "$LINENO"; then :
48068
48069	# Check for potential -arch flags.  It is not universal unless
48070	# there are at least two -arch flags with different values.
48071	ac_arch=
48072	ac_prev=
48073	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48074	 if test -n "$ac_prev"; then
48075	   case $ac_word in
48076	     i?86 | x86_64 | ppc | ppc64)
48077	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48078		 ac_arch=$ac_word
48079	       else
48080		 ac_cv_c_bigendian=universal
48081		 break
48082	       fi
48083	       ;;
48084	   esac
48085	   ac_prev=
48086	 elif test "x$ac_word" = "x-arch"; then
48087	   ac_prev=arch
48088	 fi
48089       done
48090fi
48091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48092    if test $ac_cv_c_bigendian = unknown; then
48093      # See if sys/param.h defines the BYTE_ORDER macro.
48094      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48095/* end confdefs.h.  */
48096#include <sys/types.h>
48097	     #include <sys/param.h>
48098
48099int
48100main ()
48101{
48102#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48103		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48104		     && LITTLE_ENDIAN)
48105	      bogus endian macros
48106	     #endif
48107
48108  ;
48109  return 0;
48110}
48111_ACEOF
48112if ac_fn_cxx_try_compile "$LINENO"; then :
48113  # It does; now see whether it defined to BIG_ENDIAN or not.
48114	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48115/* end confdefs.h.  */
48116#include <sys/types.h>
48117		#include <sys/param.h>
48118
48119int
48120main ()
48121{
48122#if BYTE_ORDER != BIG_ENDIAN
48123		 not big endian
48124		#endif
48125
48126  ;
48127  return 0;
48128}
48129_ACEOF
48130if ac_fn_cxx_try_compile "$LINENO"; then :
48131  ac_cv_c_bigendian=yes
48132else
48133  ac_cv_c_bigendian=no
48134fi
48135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48136fi
48137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48138    fi
48139    if test $ac_cv_c_bigendian = unknown; then
48140      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48141      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48142/* end confdefs.h.  */
48143#include <limits.h>
48144
48145int
48146main ()
48147{
48148#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48149	      bogus endian macros
48150	     #endif
48151
48152  ;
48153  return 0;
48154}
48155_ACEOF
48156if ac_fn_cxx_try_compile "$LINENO"; then :
48157  # It does; now see whether it defined to _BIG_ENDIAN or not.
48158	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48159/* end confdefs.h.  */
48160#include <limits.h>
48161
48162int
48163main ()
48164{
48165#ifndef _BIG_ENDIAN
48166		 not big endian
48167		#endif
48168
48169  ;
48170  return 0;
48171}
48172_ACEOF
48173if ac_fn_cxx_try_compile "$LINENO"; then :
48174  ac_cv_c_bigendian=yes
48175else
48176  ac_cv_c_bigendian=no
48177fi
48178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48179fi
48180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48181    fi
48182    if test $ac_cv_c_bigendian = unknown; then
48183      # Compile a test program.
48184      if test "$cross_compiling" = yes; then :
48185  # Try to guess by grepping values from an object file.
48186	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48187/* end confdefs.h.  */
48188short int ascii_mm[] =
48189		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48190		short int ascii_ii[] =
48191		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48192		int use_ascii (int i) {
48193		  return ascii_mm[i] + ascii_ii[i];
48194		}
48195		short int ebcdic_ii[] =
48196		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48197		short int ebcdic_mm[] =
48198		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48199		int use_ebcdic (int i) {
48200		  return ebcdic_mm[i] + ebcdic_ii[i];
48201		}
48202		extern int foo;
48203
48204int
48205main ()
48206{
48207return use_ascii (foo) == use_ebcdic (foo);
48208  ;
48209  return 0;
48210}
48211_ACEOF
48212if ac_fn_cxx_try_compile "$LINENO"; then :
48213  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48214	      ac_cv_c_bigendian=yes
48215	    fi
48216	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48217	      if test "$ac_cv_c_bigendian" = unknown; then
48218		ac_cv_c_bigendian=no
48219	      else
48220		# finding both strings is unlikely to happen, but who knows?
48221		ac_cv_c_bigendian=unknown
48222	      fi
48223	    fi
48224fi
48225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48226else
48227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48228/* end confdefs.h.  */
48229$ac_includes_default
48230int
48231main ()
48232{
48233
48234	     /* Are we little or big endian?  From Harbison&Steele.  */
48235	     union
48236	     {
48237	       long int l;
48238	       char c[sizeof (long int)];
48239	     } u;
48240	     u.l = 1;
48241	     return u.c[sizeof (long int) - 1] == 1;
48242
48243  ;
48244  return 0;
48245}
48246_ACEOF
48247if ac_fn_cxx_try_run "$LINENO"; then :
48248  ac_cv_c_bigendian=no
48249else
48250  ac_cv_c_bigendian=yes
48251fi
48252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48253  conftest.$ac_objext conftest.beam conftest.$ac_ext
48254fi
48255
48256    fi
48257fi
48258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48259$as_echo "$ac_cv_c_bigendian" >&6; }
48260 case $ac_cv_c_bigendian in #(
48261   yes)
48262     ENDIAN="big";; #(
48263   no)
48264     ENDIAN="little" ;; #(
48265   universal)
48266     ENDIAN="universal_endianness"
48267     ;; #(
48268   *)
48269     ENDIAN="unknown" ;;
48270 esac
48271
48272
48273  if test "x$ENDIAN" = xuniversal_endianness; then
48274    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48275  fi
48276  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48277    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
48278  fi
48279
48280
48281# Configure flags for the tools
48282
48283  ###############################################################################
48284  #
48285  # How to compile shared libraries.
48286  #
48287
48288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48289    PICFLAG="-fPIC"
48290    C_FLAG_REORDER=''
48291    CXX_FLAG_REORDER=''
48292
48293    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48294      # Linking is different on MacOSX
48295      if test "x$STATIC_BUILD" = xtrue; then
48296        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48297      else
48298        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48299        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48300      fi
48301      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48302      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48303      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48304      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48305    else
48306      # Default works for linux, might work on other platforms as well.
48307      SHARED_LIBRARY_FLAGS='-shared'
48308      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48309      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48310      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48311      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48312    fi
48313  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48314    C_FLAG_REORDER=''
48315    CXX_FLAG_REORDER=''
48316
48317    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48318      # Linking is different on MacOSX
48319      PICFLAG=''
48320      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48321      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48322      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48323      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48324      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48325
48326      if test "x$STATIC_BUILD" = xfalse; then
48327        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48328      fi
48329    else
48330      # Default works for linux, might work on other platforms as well.
48331      PICFLAG='-fPIC'
48332      SHARED_LIBRARY_FLAGS='-shared'
48333      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48334      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48335      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48336      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48337    fi
48338  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48339    PICFLAG="-KPIC"
48340    C_FLAG_REORDER='-xF'
48341    CXX_FLAG_REORDER='-xF'
48342    SHARED_LIBRARY_FLAGS="-G"
48343    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48344    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48345    SET_SHARED_LIBRARY_NAME='-h $1'
48346    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48347  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48348    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48349    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48350    # will have to patch this single instruction with a call to some out-of-order code which
48351    # does the load from the TOC. This is of course slow. But in that case we also would have
48352    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48353    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48354    # can be patched directly by the linker and does not require a jump to out-of-order code.
48355    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48356    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48357    # loads for accessing a global variable). But there are rumors that this may be seen as a
48358    # 'performance feature' because of improved code locality of the symbols used in a
48359    # compilation unit.
48360    PICFLAG="-qpic"
48361    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48362    C_FLAG_REORDER=''
48363    CXX_FLAG_REORDER=''
48364    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48365    SET_EXECUTABLE_ORIGIN=""
48366    SET_SHARED_LIBRARY_ORIGIN=''
48367    SET_SHARED_LIBRARY_NAME=''
48368    SET_SHARED_LIBRARY_MAPFILE=''
48369  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48370    PICFLAG=""
48371    C_FLAG_REORDER=''
48372    CXX_FLAG_REORDER=''
48373    SHARED_LIBRARY_FLAGS="-dll"
48374    SET_EXECUTABLE_ORIGIN=''
48375    SET_SHARED_LIBRARY_ORIGIN=''
48376    SET_SHARED_LIBRARY_NAME=''
48377    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48378  fi
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388  # The (cross) compiler is now configured, we can now test capabilities
48389  # of the target platform.
48390
48391
48392
48393  ###############################################################################
48394  #
48395  # Setup the opt flags for different compilers
48396  # and different operating systems.
48397  #
48398
48399  # FIXME: this was indirectly the old default, but just inherited.
48400  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48401  #   C_FLAG_DEPS="-MMD -MF"
48402  # fi
48403
48404  # Generate make dependency files
48405  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48406    C_FLAG_DEPS="-MMD -MF"
48407  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48408    C_FLAG_DEPS="-MMD -MF"
48409  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48410    C_FLAG_DEPS="-xMMD -xMF"
48411  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48412    C_FLAG_DEPS="-qmakedep=gcc -MF"
48413  fi
48414  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48415
48416
48417
48418  # Debug symbols
48419  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48420    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48421      # reduce from default "-g2" option to save space
48422      CFLAGS_DEBUG_SYMBOLS="-g1"
48423      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48424    else
48425      CFLAGS_DEBUG_SYMBOLS="-g"
48426      CXXFLAGS_DEBUG_SYMBOLS="-g"
48427    fi
48428  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48429    CFLAGS_DEBUG_SYMBOLS="-g"
48430    CXXFLAGS_DEBUG_SYMBOLS="-g"
48431  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48432    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48433    # -g0 enables debug symbols without disabling inlining.
48434    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48435  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48436    CFLAGS_DEBUG_SYMBOLS="-g"
48437    CXXFLAGS_DEBUG_SYMBOLS="-g"
48438  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48439    CFLAGS_DEBUG_SYMBOLS="-Zi"
48440    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48441  fi
48442
48443
48444
48445  # Debug symbols for JVM_CFLAGS
48446  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48447    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48448    if test "x$DEBUG_LEVEL" = xslowdebug; then
48449      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48450    else
48451      # -g0 does not disable inlining, which -g does.
48452      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48453    fi
48454  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48455    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48456  else
48457    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48458  fi
48459
48460
48461  # bounds, memory and behavior checking options
48462  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48463    case $DEBUG_LEVEL in
48464    release )
48465      # no adjustment
48466      ;;
48467    fastdebug )
48468      # no adjustment
48469      ;;
48470    slowdebug )
48471      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48472      # get's added conditionally on whether we produce debug symbols or not.
48473      # This is most likely not really correct.
48474
48475      # Add runtime stack smashing and undefined behavior checks.
48476      # Not all versions of gcc support -fstack-protector
48477      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520    # Execute function body
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
48567
48568
48569    # Execute function body
48570
48571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48572$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48573  supports=yes
48574
48575  saved_cflags="$CFLAGS"
48576  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48577  ac_ext=c
48578ac_cpp='$CPP $CPPFLAGS'
48579ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48580ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48581ac_compiler_gnu=$ac_cv_c_compiler_gnu
48582
48583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48584/* end confdefs.h.  */
48585int i;
48586_ACEOF
48587if ac_fn_c_try_compile "$LINENO"; then :
48588
48589else
48590  supports=no
48591fi
48592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48593  ac_ext=cpp
48594ac_cpp='$CXXCPP $CPPFLAGS'
48595ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48596ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48597ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48598
48599  CFLAGS="$saved_cflags"
48600
48601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48602$as_echo "$supports" >&6; }
48603  if test "x$supports" = "xyes" ; then
48604    :
48605    C_COMP_SUPPORTS="yes"
48606  else
48607    :
48608    C_COMP_SUPPORTS="no"
48609  fi
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
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    # Execute function body
48670
48671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48672$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48673  supports=yes
48674
48675  saved_cxxflags="$CXXFLAGS"
48676  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48677  ac_ext=cpp
48678ac_cpp='$CXXCPP $CPPFLAGS'
48679ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48680ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48681ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48682
48683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48684/* end confdefs.h.  */
48685int i;
48686_ACEOF
48687if ac_fn_cxx_try_compile "$LINENO"; then :
48688
48689else
48690  supports=no
48691fi
48692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48693  ac_ext=cpp
48694ac_cpp='$CXXCPP $CPPFLAGS'
48695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48698
48699  CXXFLAGS="$saved_cxxflags"
48700
48701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48702$as_echo "$supports" >&6; }
48703  if test "x$supports" = "xyes" ; then
48704    :
48705    CXX_COMP_SUPPORTS="yes"
48706  else
48707    :
48708    CXX_COMP_SUPPORTS="no"
48709  fi
48710
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722
48723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48724$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48725  supports=no
48726  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48727
48728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48729$as_echo "$supports" >&6; }
48730  if test "x$supports" = "xyes" ; then
48731    :
48732
48733  else
48734    :
48735    STACK_PROTECTOR_CFLAG=""
48736  fi
48737
48738
48739
48740
48741
48742
48743
48744      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48745      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48746      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48747        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48748      fi
48749      ;;
48750    esac
48751  fi
48752
48753  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48754    if test "x$DEBUG_LEVEL" != xrelease; then
48755      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48756        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48757      fi
48758    fi
48759  fi
48760
48761  # Optimization levels
48762  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48763    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48764
48765    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48766      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48767      C_O_FLAG_HIGHEST_JVM="-xO4"
48768      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48769      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48770      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48771      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48772      C_O_FLAG_DEBUG_JVM=""
48773      C_O_FLAG_NONE="-xregs=no%frameptr"
48774      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48775      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48776      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48777      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48778      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48779      CXX_O_FLAG_DEBUG_JVM=""
48780      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48781      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48782        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48783        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48784      fi
48785    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48786      C_O_FLAG_HIGHEST_JVM="-xO4"
48787      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48788      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48789      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48790      C_O_FLAG_DEBUG=""
48791      C_O_FLAG_DEBUG_JVM=""
48792      C_O_FLAG_NONE=""
48793      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48794      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48795      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48796      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48797      CXX_O_FLAG_DEBUG=""
48798      CXX_O_FLAG_DEBUG_JVM=""
48799      CXX_O_FLAG_NONE=""
48800    fi
48801  else
48802    # The remaining toolchains share opt flags between CC and CXX;
48803    # setup for C and duplicate afterwards.
48804    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48805      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48806        # On MacOSX we optimize for size, something
48807        # we should do for all platforms?
48808        C_O_FLAG_HIGHEST_JVM="-Os"
48809        C_O_FLAG_HIGHEST="-Os"
48810        C_O_FLAG_HI="-Os"
48811        C_O_FLAG_NORM="-Os"
48812        C_O_FLAG_SIZE="-Os"
48813      else
48814        C_O_FLAG_HIGHEST_JVM="-O3"
48815        C_O_FLAG_HIGHEST="-O3"
48816        C_O_FLAG_HI="-O3"
48817        C_O_FLAG_NORM="-O2"
48818        C_O_FLAG_SIZE="-Os"
48819      fi
48820      C_O_FLAG_DEBUG="-O0"
48821      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48822        C_O_FLAG_DEBUG_JVM=""
48823      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48824        C_O_FLAG_DEBUG_JVM="-O0"
48825      fi
48826      C_O_FLAG_NONE="-O0"
48827    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48828      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48829        # On MacOSX we optimize for size, something
48830        # we should do for all platforms?
48831        C_O_FLAG_HIGHEST_JVM="-Os"
48832        C_O_FLAG_HIGHEST="-Os"
48833        C_O_FLAG_HI="-Os"
48834        C_O_FLAG_NORM="-Os"
48835        C_O_FLAG_SIZE="-Os"
48836      else
48837        C_O_FLAG_HIGHEST_JVM="-O3"
48838        C_O_FLAG_HIGHEST="-O3"
48839        C_O_FLAG_HI="-O3"
48840        C_O_FLAG_NORM="-O2"
48841        C_O_FLAG_SIZE="-Os"
48842      fi
48843      C_O_FLAG_DEBUG="-O0"
48844      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48845        C_O_FLAG_DEBUG_JVM=""
48846      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48847        C_O_FLAG_DEBUG_JVM="-O0"
48848      fi
48849      C_O_FLAG_NONE="-O0"
48850    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48851      C_O_FLAG_HIGHEST_JVM="-O3"
48852      C_O_FLAG_HIGHEST="-O3"
48853      C_O_FLAG_HI="-O3 -qstrict"
48854      C_O_FLAG_NORM="-O2"
48855      C_O_FLAG_DEBUG="-qnoopt"
48856      # FIXME: Value below not verified.
48857      C_O_FLAG_DEBUG_JVM=""
48858      C_O_FLAG_NONE="-qnoopt"
48859    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48860      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48861      C_O_FLAG_HIGHEST="-O2"
48862      C_O_FLAG_HI="-O1"
48863      C_O_FLAG_NORM="-O1"
48864      C_O_FLAG_DEBUG="-Od"
48865      C_O_FLAG_DEBUG_JVM=""
48866      C_O_FLAG_NONE="-Od"
48867      C_O_FLAG_SIZE="-Os"
48868    fi
48869    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48870    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48871    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48872    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48873    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48874    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48875    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48876    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48877  fi
48878
48879  # Adjust optimization flags according to debug level.
48880  case $DEBUG_LEVEL in
48881    release )
48882      # no adjustment
48883      ;;
48884    fastdebug )
48885      # Not quite so much optimization
48886      C_O_FLAG_HI="$C_O_FLAG_NORM"
48887      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48888      ;;
48889    slowdebug )
48890      # Disable optimization
48891      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48892      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48893      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48894      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48895      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48896      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48897      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48898      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48899      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48900      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48901      ;;
48902  esac
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922  # Special extras...
48923  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48924    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48925      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48926      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48927    fi
48928    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48929    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48930  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48931    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48932    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48933  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48934    CXXSTD_CXXFLAG="-std=gnu++98"
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977    # Execute function body
48978
48979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48980$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48981  supports=yes
48982
48983  saved_cxxflags="$CXXFLAGS"
48984  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48985  ac_ext=cpp
48986ac_cpp='$CXXCPP $CPPFLAGS'
48987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48988ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48990
48991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48992/* end confdefs.h.  */
48993int i;
48994_ACEOF
48995if ac_fn_cxx_try_compile "$LINENO"; then :
48996
48997else
48998  supports=no
48999fi
49000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49001  ac_ext=cpp
49002ac_cpp='$CXXCPP $CPPFLAGS'
49003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49006
49007  CXXFLAGS="$saved_cxxflags"
49008
49009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49010$as_echo "$supports" >&6; }
49011  if test "x$supports" = "xyes" ; then
49012    :
49013
49014  else
49015    :
49016    CXXSTD_CXXFLAG=""
49017  fi
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029
49030    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49031
49032  fi
49033  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49034    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49035    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49036    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49037    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49038    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49039  fi
49040
49041  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49042    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49043    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49044    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49045  fi
49046
49047  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49048  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49049  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49050
49051  ###############################################################################
49052  #
49053  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49054  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49055  #
49056
49057  # Setup compiler/platform specific flags into
49058  #    CFLAGS_JDK    - C Compiler flags
49059  #    CXXFLAGS_JDK  - C++ Compiler flags
49060  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49061  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49062    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49063    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49064    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49065    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49066      # Force compatibility with i586 on 32 bit intel platforms.
49067      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49068      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49069    fi
49070    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49071        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49072    case $OPENJDK_TARGET_CPU_ARCH in
49073      arm )
49074        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49075        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49076        ;;
49077      ppc )
49078        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49079        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49080        ;;
49081      * )
49082        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49083        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49084        ;;
49085    esac
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112
49113
49114
49115
49116
49117
49118
49119
49120
49121
49122
49123
49124
49125
49126
49127
49128    # Execute function body
49129
49130  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49131  REFERENCE_VERSION=6
49132
49133  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49134    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49135  fi
49136
49137  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49138    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49139  fi
49140
49141  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49142  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49143
49144  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49145    :
49146
49147  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49148  # runs afoul of the more aggressive versions of these optimisations.
49149  # Notably, value range propagation now assumes that the this pointer of C++
49150  # member functions is non-null.
49151  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194    # Execute function body
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243    # Execute function body
49244
49245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49246$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49247  supports=yes
49248
49249  saved_cflags="$CFLAGS"
49250  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49251  ac_ext=c
49252ac_cpp='$CPP $CPPFLAGS'
49253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49255ac_compiler_gnu=$ac_cv_c_compiler_gnu
49256
49257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49258/* end confdefs.h.  */
49259int i;
49260_ACEOF
49261if ac_fn_c_try_compile "$LINENO"; then :
49262
49263else
49264  supports=no
49265fi
49266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49267  ac_ext=cpp
49268ac_cpp='$CXXCPP $CPPFLAGS'
49269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49272
49273  CFLAGS="$saved_cflags"
49274
49275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49276$as_echo "$supports" >&6; }
49277  if test "x$supports" = "xyes" ; then
49278    :
49279    C_COMP_SUPPORTS="yes"
49280  else
49281    :
49282    C_COMP_SUPPORTS="no"
49283  fi
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343    # Execute function body
49344
49345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49346$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49347  supports=yes
49348
49349  saved_cxxflags="$CXXFLAGS"
49350  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49351  ac_ext=cpp
49352ac_cpp='$CXXCPP $CPPFLAGS'
49353ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49354ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49355ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49356
49357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49358/* end confdefs.h.  */
49359int i;
49360_ACEOF
49361if ac_fn_cxx_try_compile "$LINENO"; then :
49362
49363else
49364  supports=no
49365fi
49366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49367  ac_ext=cpp
49368ac_cpp='$CXXCPP $CPPFLAGS'
49369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49372
49373  CXXFLAGS="$saved_cxxflags"
49374
49375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49376$as_echo "$supports" >&6; }
49377  if test "x$supports" = "xyes" ; then
49378    :
49379    CXX_COMP_SUPPORTS="yes"
49380  else
49381    :
49382    CXX_COMP_SUPPORTS="no"
49383  fi
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49398$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49399  supports=no
49400  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49401
49402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49403$as_echo "$supports" >&6; }
49404  if test "x$supports" = "xyes" ; then
49405    :
49406
49407  else
49408    :
49409    NO_NULL_POINTER_CHECK_CFLAG=""
49410  fi
49411
49412
49413
49414
49415
49416
49417
49418  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461    # Execute function body
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510    # Execute function body
49511
49512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49513$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49514  supports=yes
49515
49516  saved_cflags="$CFLAGS"
49517  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49518  ac_ext=c
49519ac_cpp='$CPP $CPPFLAGS'
49520ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49521ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49522ac_compiler_gnu=$ac_cv_c_compiler_gnu
49523
49524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49525/* end confdefs.h.  */
49526int i;
49527_ACEOF
49528if ac_fn_c_try_compile "$LINENO"; then :
49529
49530else
49531  supports=no
49532fi
49533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49534  ac_ext=cpp
49535ac_cpp='$CXXCPP $CPPFLAGS'
49536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49539
49540  CFLAGS="$saved_cflags"
49541
49542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49543$as_echo "$supports" >&6; }
49544  if test "x$supports" = "xyes" ; then
49545    :
49546    C_COMP_SUPPORTS="yes"
49547  else
49548    :
49549    C_COMP_SUPPORTS="no"
49550  fi
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605
49606
49607
49608
49609
49610    # Execute function body
49611
49612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49613$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49614  supports=yes
49615
49616  saved_cxxflags="$CXXFLAGS"
49617  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49618  ac_ext=cpp
49619ac_cpp='$CXXCPP $CPPFLAGS'
49620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49623
49624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49625/* end confdefs.h.  */
49626int i;
49627_ACEOF
49628if ac_fn_cxx_try_compile "$LINENO"; then :
49629
49630else
49631  supports=no
49632fi
49633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49634  ac_ext=cpp
49635ac_cpp='$CXXCPP $CPPFLAGS'
49636ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49637ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49638ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49639
49640  CXXFLAGS="$saved_cxxflags"
49641
49642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49643$as_echo "$supports" >&6; }
49644  if test "x$supports" = "xyes" ; then
49645    :
49646    CXX_COMP_SUPPORTS="yes"
49647  else
49648    :
49649    CXX_COMP_SUPPORTS="no"
49650  fi
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49665$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49666  supports=no
49667  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49668
49669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49670$as_echo "$supports" >&6; }
49671  if test "x$supports" = "xyes" ; then
49672    :
49673
49674  else
49675    :
49676    NO_LIFETIME_DSE_CFLAG=""
49677  fi
49678
49679
49680
49681
49682
49683
49684  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49685
49686
49687
49688  else
49689    :
49690
49691  fi
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49705    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49706
49707    # Restrict the debug information created by Clang to avoid
49708    # too big object files and speed the build up a little bit
49709    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49710    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49711    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49712      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49713        # Force compatibility with i586 on 32 bit intel platforms.
49714        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49715        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49716      fi
49717      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49718      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49719          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49720      case $OPENJDK_TARGET_CPU_ARCH in
49721        ppc )
49722          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49723          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49724          ;;
49725        * )
49726          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49727          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49728          ;;
49729      esac
49730    fi
49731  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49732    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49733    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49734    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49735      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49736    fi
49737
49738    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49739    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49740  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49741    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49742    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49743    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49744  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49745    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49746        -MD -Zc:wchar_t- -W3 -wd4800 \
49747        -DWIN32_LEAN_AND_MEAN \
49748        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49749        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49750        -DWIN32 -DIAL"
49751    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49752      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49753    else
49754      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49755    fi
49756    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49757    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49758    # studio.
49759    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49760      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49761      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49762      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49763    fi
49764  fi
49765
49766  ###############################################################################
49767
49768  # Adjust flags according to debug level.
49769  case $DEBUG_LEVEL in
49770    fastdebug | slowdebug )
49771      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49772      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49773      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49774      ;;
49775    release )
49776      ;;
49777    * )
49778      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49779      ;;
49780  esac
49781
49782  # Set some common defines. These works for all compilers, but assume
49783  # -D is universally accepted.
49784
49785  # Setup endianness
49786  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49787    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49788    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49789    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49790    #   Note: -Dmacro         is the same as    #define macro 1
49791    #         -Dmacro=        is the same as    #define macro
49792    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49793      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49794    else
49795      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49796    fi
49797  else
49798    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49799    # are defined in the system?
49800    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49801      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49802    else
49803      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49804    fi
49805  fi
49806
49807  # Setup target OS define. Use OS target name but in upper case.
49808  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49809  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49810
49811  # Setup target CPU
49812  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49813      $OPENJDK_TARGET_ADD_LP64 \
49814      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49815
49816  # Setup debug/release defines
49817  if test "x$DEBUG_LEVEL" = xrelease; then
49818    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49819    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49820      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49821    fi
49822  else
49823    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49824  fi
49825
49826  # Set some additional per-OS defines.
49827  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49828    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49829    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49830        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49831  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49832    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49833    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49834        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49835  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49836    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49837    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49838    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49839    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49840        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49841        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49842        -fno-omit-frame-pointer"
49843  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49844    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49845    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49846    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49847        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49848        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49849  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49850    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49851  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49852    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49853    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49854  fi
49855
49856  # Set some additional per-CPU defines.
49857  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49858    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49859  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49860    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49861  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49862    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49863      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49864      # fixes `relocation truncated to fit' error for gcc 4.1.
49865      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49866      # Use ppc64 instructions, but schedule for power5
49867      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49868    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49869      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49870    fi
49871  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49872    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49873      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49874      # Little endian machine uses ELFv2 ABI.
49875      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49876      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49877      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49878    fi
49879  fi
49880
49881  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49882    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49883  fi
49884
49885  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49886    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49887      # Solaris does not have _LP64=1 in the old build.
49888      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49889      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49890    fi
49891  fi
49892
49893  # Set JVM_CFLAGS warning handling
49894  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49895    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49896        -Wunused-value -Woverloaded-virtual"
49897
49898    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941    # Execute function body
49942
49943  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49944  REFERENCE_VERSION=4.8
49945
49946  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49947    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49948  fi
49949
49950  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49951    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49952  fi
49953
49954  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49955  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49956
49957  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49958    :
49959
49960            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49961            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49962
49963
49964  else
49965    :
49966
49967  fi
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980    fi
49981    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49982      # Non-zero builds have stricter warnings
49983      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49984    else
49985      if test "x$TOOLCHAIN_TYPE" = xclang; then
49986        # Some versions of llvm do not like -Wundef
49987        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49988      fi
49989    fi
49990  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49991    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49992        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49993  fi
49994
49995  # Additional macosx handling
49996  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49997    # Setting these parameters makes it an error to link to macosx APIs that are
49998    # newer than the given OS version and makes the linked binaries compatible
49999    # even if built on a newer version of the OS.
50000    # The expected format is X.Y.Z
50001    MACOSX_VERSION_MIN=10.7.0
50002
50003
50004    # The macro takes the version with no dots, ex: 1070
50005    # Let the flags variables get resolved in make for easier override on make
50006    # command line.
50007    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50008    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50009  fi
50010
50011  # Setup some hard coded includes
50012  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50013      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50014      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50015      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50016      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50017      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50018
50019  # The shared libraries are compiled using the picflag.
50020  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50021      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50022  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50023      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50024
50025  # Executable flags
50026  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50027  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50028
50029
50030
50031
50032
50033
50034  # Setup LDFLAGS et al.
50035  #
50036
50037  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50038    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50039    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50040    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50041    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50042      LDFLAGS_SAFESH="-safeseh"
50043      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50044      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50045      # NOTE: Old build added -machine. Probably not needed.
50046      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50047    else
50048      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50049    fi
50050  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50051      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50052      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50053        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50054        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50055    fi
50056  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50057    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50058    # We have previously set HAS_GNU_HASH if this is the case
50059    if test -n "$HAS_GNU_HASH"; then
50060      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50061      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50062      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50063    fi
50064      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50065        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50066    fi
50067    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50068      # And since we now know that the linker is gnu, then add -z defs, to forbid
50069      # undefined symbols in object files.
50070      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50071      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50072      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50073      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50074      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50075      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50076        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50077      fi
50078      case $DEBUG_LEVEL in
50079        release )
50080          # tell linker to optimize libraries.
50081          # Should this be supplied to the OSS linker as well?
50082          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50083          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50084          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50085          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50086            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50087          fi
50088          ;;
50089        slowdebug )
50090          # Hotspot always let the linker optimize
50091          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50092          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50093            # do relocations at load
50094            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50095            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50096            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50097          fi
50098          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50099            # mark relocations read only
50100            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50101            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50102            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50103          fi
50104          ;;
50105        fastdebug )
50106          # Hotspot always let the linker optimize
50107          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50108          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50109            # mark relocations read only
50110            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50111            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50112            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50113          fi
50114          ;;
50115        * )
50116          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50117          ;;
50118        esac
50119    fi
50120  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50121    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50122    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50123    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50124    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50125    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50126    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50127      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50128    fi
50129  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50130    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50131    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50132    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50133  fi
50134
50135  # Customize LDFLAGS for executables
50136
50137  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50138
50139  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50140    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50141      LDFLAGS_STACK_SIZE=1048576
50142    else
50143      LDFLAGS_STACK_SIZE=327680
50144    fi
50145    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50146  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50147    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50148  fi
50149
50150  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50151
50152  # Customize LDFLAGS for libs
50153  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50154
50155  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50156  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50157    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50158        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50159    JDKLIB_LIBS=""
50160  else
50161    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50162        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50163
50164    if test "xTARGET" = "xTARGET"; then
50165    # On some platforms (mac) the linker warns about non existing -L dirs.
50166    # Add server first if available. Linking aginst client does not always produce the same results.
50167      # Only add client/minimal dir if client/minimal is being built.
50168    # Default to server for other variants.
50169      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50170        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50171      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50172        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50173      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50174        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50175    else
50176        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50177    fi
50178    elif test "xTARGET" = "xBUILD"; then
50179      # When building a buildjdk, it's always only the server variant
50180      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50181          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50182    fi
50183
50184    JDKLIB_LIBS="-ljava -ljvm"
50185    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50186      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50187    fi
50188
50189  fi
50190
50191  # Set JVM_LIBS (per os)
50192  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50193    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50194  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50195    # FIXME: This hard-coded path is not really proper.
50196    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50197      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50198    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50199      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50200    fi
50201    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50202        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50203  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50204    JVM_LIBS="$JVM_LIBS -lm"
50205  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50206    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50207  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50208    JVM_LIBS="$JVM_LIBS -lm"
50209  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50210    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50211        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50212        wsock32.lib winmm.lib version.lib psapi.lib"
50213    fi
50214
50215  # Set JVM_ASFLAGS
50216  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50217    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50218      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50219    fi
50220  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50221    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50222  fi
50223
50224  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240  # Special extras...
50241  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50242    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50243      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50244      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50245    fi
50246    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50247    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50248  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50249    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50250    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50251  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50252    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295    # Execute function body
50296
50297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50298$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50299  supports=yes
50300
50301  saved_cxxflags="$CXXFLAGS"
50302  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50303  ac_ext=cpp
50304ac_cpp='$CXXCPP $CPPFLAGS'
50305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50308
50309  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50310/* end confdefs.h.  */
50311int i;
50312_ACEOF
50313if ac_fn_cxx_try_compile "$LINENO"; then :
50314
50315else
50316  supports=no
50317fi
50318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50319  ac_ext=cpp
50320ac_cpp='$CXXCPP $CPPFLAGS'
50321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50324
50325  CXXFLAGS="$saved_cxxflags"
50326
50327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50328$as_echo "$supports" >&6; }
50329  if test "x$supports" = "xyes" ; then
50330    :
50331
50332  else
50333    :
50334    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50335  fi
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50349
50350  fi
50351  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50352    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50353    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50354    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50355    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50356    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50357  fi
50358
50359  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50360    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50361    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50362    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50363  fi
50364
50365  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50366  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50367  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50368
50369  ###############################################################################
50370  #
50371  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50372  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50373  #
50374
50375  # Setup compiler/platform specific flags into
50376  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50377  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50378  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50379  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50380    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50381    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50382    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50383    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50384      # Force compatibility with i586 on 32 bit intel platforms.
50385      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50386      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50387    fi
50388    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50389        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50390    case $OPENJDK_BUILD_CPU_ARCH in
50391      arm )
50392        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50393        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50394        ;;
50395      ppc )
50396        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50397        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50398        ;;
50399      * )
50400        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50401        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50402        ;;
50403    esac
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446    # Execute function body
50447
50448  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50449  REFERENCE_VERSION=6
50450
50451  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50452    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50453  fi
50454
50455  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50456    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50457  fi
50458
50459  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50460  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50461
50462  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50463    :
50464
50465  else
50466    :
50467
50468  fi
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50482    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50483
50484    # Restrict the debug information created by Clang to avoid
50485    # too big object files and speed the build up a little bit
50486    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50487    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50488    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50489      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50490        # Force compatibility with i586 on 32 bit intel platforms.
50491        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50492        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50493      fi
50494      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50495      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50496          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50497      case $OPENJDK_BUILD_CPU_ARCH in
50498        ppc )
50499          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50500          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50501          ;;
50502        * )
50503          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50504          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50505          ;;
50506      esac
50507    fi
50508  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50509    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50510    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50511    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50512      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50513    fi
50514
50515    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50516    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50517  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50518    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50519    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50520    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50521  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50522    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50523        -MD -Zc:wchar_t- -W3 -wd4800 \
50524        -DWIN32_LEAN_AND_MEAN \
50525        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50526        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50527        -DWIN32 -DIAL"
50528    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50529      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50530    else
50531      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50532    fi
50533    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50534    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50535    # studio.
50536    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50537      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50538      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50539      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50540    fi
50541  fi
50542
50543  ###############################################################################
50544
50545  # Adjust flags according to debug level.
50546  case $DEBUG_LEVEL in
50547    fastdebug | slowdebug )
50548      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50549      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50550      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50551      ;;
50552    release )
50553      ;;
50554    * )
50555      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50556      ;;
50557  esac
50558
50559  # Set some common defines. These works for all compilers, but assume
50560  # -D is universally accepted.
50561
50562  # Setup endianness
50563  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50564    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50565    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50566    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50567    #   Note: -Dmacro         is the same as    #define macro 1
50568    #         -Dmacro=        is the same as    #define macro
50569    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50570      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50571    else
50572      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50573    fi
50574  else
50575    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50576    # are defined in the system?
50577    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50578      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50579    else
50580      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50581    fi
50582  fi
50583
50584  # Setup target OS define. Use OS target name but in upper case.
50585  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50586  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50587
50588  # Setup target CPU
50589  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50590      $OPENJDK_BUILD_ADD_LP64 \
50591      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50592
50593  # Setup debug/release defines
50594  if test "x$DEBUG_LEVEL" = xrelease; then
50595    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50596    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50597      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50598    fi
50599  else
50600    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50601  fi
50602
50603  # Set some additional per-OS defines.
50604  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50605    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50606    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50607        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50608  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50609    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50610    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50611        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50612  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50613    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50614    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50615    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50616    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50617        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50618        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50619        -fno-omit-frame-pointer"
50620  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50621    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50622    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50623    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50624        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50625        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50626  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50627    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50628  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50629    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50630    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50631  fi
50632
50633  # Set some additional per-CPU defines.
50634  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50635    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50636  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50637    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50638  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50639    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50640      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50641      # fixes `relocation truncated to fit' error for gcc 4.1.
50642      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50643      # Use ppc64 instructions, but schedule for power5
50644      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50645    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50646      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50647    fi
50648  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50649    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50650      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50651      # Little endian machine uses ELFv2 ABI.
50652      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50653      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50654      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50655    fi
50656  fi
50657
50658  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50659    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50660  fi
50661
50662  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50663    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50664      # Solaris does not have _LP64=1 in the old build.
50665      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50666      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50667    fi
50668  fi
50669
50670  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50671  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50672    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50673        -Wunused-value -Woverloaded-virtual"
50674
50675    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718    # Execute function body
50719
50720  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50721  REFERENCE_VERSION=4.8
50722
50723  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50724    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50725  fi
50726
50727  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50728    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50729  fi
50730
50731  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50732  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50733
50734  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50735    :
50736
50737            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50738            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50739
50740
50741  else
50742    :
50743
50744  fi
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757    fi
50758    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50759      # Non-zero builds have stricter warnings
50760      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50761    else
50762      if test "x$TOOLCHAIN_TYPE" = xclang; then
50763        # Some versions of llvm do not like -Wundef
50764        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50765      fi
50766    fi
50767  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50768    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50769        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50770  fi
50771
50772  # Additional macosx handling
50773  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50774    # Setting these parameters makes it an error to link to macosx APIs that are
50775    # newer than the given OS version and makes the linked binaries compatible
50776    # even if built on a newer version of the OS.
50777    # The expected format is X.Y.Z
50778    MACOSX_VERSION_MIN=10.7.0
50779
50780
50781    # The macro takes the version with no dots, ex: 1070
50782    # Let the flags variables get resolved in make for easier override on make
50783    # command line.
50784    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)"
50785    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50786  fi
50787
50788  # Setup some hard coded includes
50789  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50790      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50791      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50792      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50793      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50794      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50795
50796  # The shared libraries are compiled using the picflag.
50797  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50798      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50799  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50800      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50801
50802  # Executable flags
50803  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50804  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50805
50806
50807
50808
50809
50810
50811  # Setup LDFLAGS et al.
50812  #
50813
50814  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50815    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50816    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50817    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50818    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50819      LDFLAGS_SAFESH="-safeseh"
50820      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50821      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50822      # NOTE: Old build added -machine. Probably not needed.
50823      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50824    else
50825      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50826    fi
50827  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50828      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50829      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50830        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50831        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50832    fi
50833  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50834    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50835    # We have previously set HAS_GNU_HASH if this is the case
50836    if test -n "$HAS_GNU_HASH"; then
50837      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50838      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50839      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50840    fi
50841      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50842        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50843    fi
50844    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50845      # And since we now know that the linker is gnu, then add -z defs, to forbid
50846      # undefined symbols in object files.
50847      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50848      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50849      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50850      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50851      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50852      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50853        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50854      fi
50855      case $DEBUG_LEVEL in
50856        release )
50857          # tell linker to optimize libraries.
50858          # Should this be supplied to the OSS linker as well?
50859          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50860          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50861          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50862          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50863            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50864          fi
50865          ;;
50866        slowdebug )
50867          # Hotspot always let the linker optimize
50868          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50869          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50870            # do relocations at load
50871            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50872            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50873            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50874          fi
50875          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50876            # mark relocations read only
50877            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50878            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50879            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50880          fi
50881          ;;
50882        fastdebug )
50883          # Hotspot always let the linker optimize
50884          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50885          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50886            # mark relocations read only
50887            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50888            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50889            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50890          fi
50891          ;;
50892        * )
50893          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50894          ;;
50895        esac
50896    fi
50897  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50898    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50899    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50900    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50901    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50902    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50903    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50904      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50905    fi
50906  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50907    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50908    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50909    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50910  fi
50911
50912  # Customize LDFLAGS for executables
50913
50914  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50915
50916  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50917    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50918      LDFLAGS_STACK_SIZE=1048576
50919    else
50920      LDFLAGS_STACK_SIZE=327680
50921    fi
50922    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50923  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50924    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50925  fi
50926
50927  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50928
50929  # Customize LDFLAGS for libs
50930  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50931
50932  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50933  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50934    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50935        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50936    OPENJDK_BUILD_JDKLIB_LIBS=""
50937  else
50938    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50939        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50940
50941    if test "xBUILD" = "xTARGET"; then
50942    # On some platforms (mac) the linker warns about non existing -L dirs.
50943    # Add server first if available. Linking aginst client does not always produce the same results.
50944      # Only add client/minimal dir if client/minimal is being built.
50945    # Default to server for other variants.
50946      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50947        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50948      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50949        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50950      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50951        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50952    else
50953        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50954    fi
50955    elif test "xBUILD" = "xBUILD"; then
50956      # When building a buildjdk, it's always only the server variant
50957      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50958          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50959    fi
50960
50961    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50962    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50963      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50964    fi
50965
50966  fi
50967
50968  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50969  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50970    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50971  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50972    # FIXME: This hard-coded path is not really proper.
50973    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50974      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50975    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50976      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50977    fi
50978    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50979        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50980  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50981    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50982  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50983    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50984  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50985    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50986  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50987    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50988        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50989        wsock32.lib winmm.lib version.lib psapi.lib"
50990    fi
50991
50992  # Set OPENJDK_BUILD_JVM_ASFLAGS
50993  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50994    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50995      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50996    fi
50997  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50998    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50999  fi
51000
51001  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017  # Tests are only ever compiled for TARGET
51018  # Flags for compiling test libraries
51019  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51020  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51021
51022  # Flags for compiling test executables
51023  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51024  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51025
51026
51027
51028
51029
51030
51031  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51032  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51033
51034
51035
51036
51037
51038
51039  # Some Zero and Shark settings.
51040  # ZERO_ARCHFLAG tells the compiler which mode to build for
51041  case "${OPENJDK_TARGET_CPU}" in
51042    s390)
51043      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51044      ;;
51045    *)
51046      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51047  esac
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090    # Execute function body
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139    # Execute function body
51140
51141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51142$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51143  supports=yes
51144
51145  saved_cflags="$CFLAGS"
51146  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51147  ac_ext=c
51148ac_cpp='$CPP $CPPFLAGS'
51149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51150ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51151ac_compiler_gnu=$ac_cv_c_compiler_gnu
51152
51153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51154/* end confdefs.h.  */
51155int i;
51156_ACEOF
51157if ac_fn_c_try_compile "$LINENO"; then :
51158
51159else
51160  supports=no
51161fi
51162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51163  ac_ext=cpp
51164ac_cpp='$CXXCPP $CPPFLAGS'
51165ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51166ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51167ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51168
51169  CFLAGS="$saved_cflags"
51170
51171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51172$as_echo "$supports" >&6; }
51173  if test "x$supports" = "xyes" ; then
51174    :
51175    C_COMP_SUPPORTS="yes"
51176  else
51177    :
51178    C_COMP_SUPPORTS="no"
51179  fi
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239    # Execute function body
51240
51241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51242$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51243  supports=yes
51244
51245  saved_cxxflags="$CXXFLAGS"
51246  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51247  ac_ext=cpp
51248ac_cpp='$CXXCPP $CPPFLAGS'
51249ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51250ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51251ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51252
51253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51254/* end confdefs.h.  */
51255int i;
51256_ACEOF
51257if ac_fn_cxx_try_compile "$LINENO"; then :
51258
51259else
51260  supports=no
51261fi
51262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51263  ac_ext=cpp
51264ac_cpp='$CXXCPP $CPPFLAGS'
51265ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51266ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51267ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51268
51269  CXXFLAGS="$saved_cxxflags"
51270
51271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51272$as_echo "$supports" >&6; }
51273  if test "x$supports" = "xyes" ; then
51274    :
51275    CXX_COMP_SUPPORTS="yes"
51276  else
51277    :
51278    CXX_COMP_SUPPORTS="no"
51279  fi
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51294$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51295  supports=no
51296  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51297
51298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51299$as_echo "$supports" >&6; }
51300  if test "x$supports" = "xyes" ; then
51301    :
51302
51303  else
51304    :
51305    ZERO_ARCHFLAG=""
51306  fi
51307
51308
51309
51310
51311
51312
51313
51314
51315  # Check that the compiler supports -mX (or -qX on AIX) flags
51316  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364    # Execute function body
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413    # Execute function body
51414
51415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51416$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51417  supports=yes
51418
51419  saved_cflags="$CFLAGS"
51420  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51421  ac_ext=c
51422ac_cpp='$CPP $CPPFLAGS'
51423ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51424ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51425ac_compiler_gnu=$ac_cv_c_compiler_gnu
51426
51427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51428/* end confdefs.h.  */
51429int i;
51430_ACEOF
51431if ac_fn_c_try_compile "$LINENO"; then :
51432
51433else
51434  supports=no
51435fi
51436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51437  ac_ext=cpp
51438ac_cpp='$CXXCPP $CPPFLAGS'
51439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51442
51443  CFLAGS="$saved_cflags"
51444
51445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51446$as_echo "$supports" >&6; }
51447  if test "x$supports" = "xyes" ; then
51448    :
51449    C_COMP_SUPPORTS="yes"
51450  else
51451    :
51452    C_COMP_SUPPORTS="no"
51453  fi
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513    # Execute function body
51514
51515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51516$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51517  supports=yes
51518
51519  saved_cxxflags="$CXXFLAGS"
51520  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51521  ac_ext=cpp
51522ac_cpp='$CXXCPP $CPPFLAGS'
51523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51526
51527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51528/* end confdefs.h.  */
51529int i;
51530_ACEOF
51531if ac_fn_cxx_try_compile "$LINENO"; then :
51532
51533else
51534  supports=no
51535fi
51536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51537  ac_ext=cpp
51538ac_cpp='$CXXCPP $CPPFLAGS'
51539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51542
51543  CXXFLAGS="$saved_cxxflags"
51544
51545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51546$as_echo "$supports" >&6; }
51547  if test "x$supports" = "xyes" ; then
51548    :
51549    CXX_COMP_SUPPORTS="yes"
51550  else
51551    :
51552    CXX_COMP_SUPPORTS="no"
51553  fi
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51568$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51569  supports=no
51570  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51571
51572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51573$as_echo "$supports" >&6; }
51574  if test "x$supports" = "xyes" ; then
51575    :
51576    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51577  else
51578    :
51579    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51580  fi
51581
51582
51583
51584
51585
51586
51587
51588
51589  # Check whether --enable-warnings-as-errors was given.
51590if test "${enable_warnings_as_errors+set}" = set; then :
51591  enableval=$enable_warnings_as_errors;
51592fi
51593
51594
51595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51596$as_echo_n "checking if native warnings are errors... " >&6; }
51597  if test "x$enable_warnings_as_errors" = "xyes"; then
51598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51599$as_echo "yes (explicitely set)" >&6; }
51600    WARNINGS_AS_ERRORS=true
51601  elif test "x$enable_warnings_as_errors" = "xno"; then
51602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51603$as_echo "no" >&6; }
51604    WARNINGS_AS_ERRORS=false
51605  elif test "x$enable_warnings_as_errors" = "x"; then
51606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51607$as_echo "yes (default)" >&6; }
51608    WARNINGS_AS_ERRORS=true
51609  else
51610    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51611  fi
51612
51613  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51614    # Set legacy hotspot variable
51615    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51616  else
51617    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51618  fi
51619
51620
51621
51622
51623  case "${TOOLCHAIN_TYPE}" in
51624    microsoft)
51625      DISABLE_WARNING_PREFIX="-wd"
51626      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51627      ;;
51628    solstudio)
51629      DISABLE_WARNING_PREFIX="-erroff="
51630      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51631      ;;
51632    gcc)
51633      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681    # Execute function body
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730    # Execute function body
51731
51732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51733$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51734  supports=yes
51735
51736  saved_cflags="$CFLAGS"
51737  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51738  ac_ext=c
51739ac_cpp='$CPP $CPPFLAGS'
51740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51742ac_compiler_gnu=$ac_cv_c_compiler_gnu
51743
51744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51745/* end confdefs.h.  */
51746int i;
51747_ACEOF
51748if ac_fn_c_try_compile "$LINENO"; then :
51749
51750else
51751  supports=no
51752fi
51753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51754  ac_ext=cpp
51755ac_cpp='$CXXCPP $CPPFLAGS'
51756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51759
51760  CFLAGS="$saved_cflags"
51761
51762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51763$as_echo "$supports" >&6; }
51764  if test "x$supports" = "xyes" ; then
51765    :
51766    C_COMP_SUPPORTS="yes"
51767  else
51768    :
51769    C_COMP_SUPPORTS="no"
51770  fi
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830    # Execute function body
51831
51832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51833$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51834  supports=yes
51835
51836  saved_cxxflags="$CXXFLAGS"
51837  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51838  ac_ext=cpp
51839ac_cpp='$CXXCPP $CPPFLAGS'
51840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51843
51844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51845/* end confdefs.h.  */
51846int i;
51847_ACEOF
51848if ac_fn_cxx_try_compile "$LINENO"; then :
51849
51850else
51851  supports=no
51852fi
51853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51854  ac_ext=cpp
51855ac_cpp='$CXXCPP $CPPFLAGS'
51856ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51857ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51858ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51859
51860  CXXFLAGS="$saved_cxxflags"
51861
51862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51863$as_echo "$supports" >&6; }
51864  if test "x$supports" = "xyes" ; then
51865    :
51866    CXX_COMP_SUPPORTS="yes"
51867  else
51868    :
51869    CXX_COMP_SUPPORTS="no"
51870  fi
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51885$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51886  supports=no
51887  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51888
51889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51890$as_echo "$supports" >&6; }
51891  if test "x$supports" = "xyes" ; then
51892    :
51893    GCC_CAN_DISABLE_WARNINGS=true
51894  else
51895    :
51896    GCC_CAN_DISABLE_WARNINGS=false
51897
51898  fi
51899
51900
51901
51902
51903
51904
51905      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51906        DISABLE_WARNING_PREFIX="-Wno-"
51907      else
51908        DISABLE_WARNING_PREFIX=
51909      fi
51910      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51911      # Repeate the check for the BUILD_CC
51912      CC_OLD="$CC"
51913      CC="$BUILD_CC"
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961    # Execute function body
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
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    # Execute function body
52011
52012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52013$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52014  supports=yes
52015
52016  saved_cflags="$CFLAGS"
52017  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52018  ac_ext=c
52019ac_cpp='$CPP $CPPFLAGS'
52020ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52021ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52022ac_compiler_gnu=$ac_cv_c_compiler_gnu
52023
52024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52025/* end confdefs.h.  */
52026int i;
52027_ACEOF
52028if ac_fn_c_try_compile "$LINENO"; then :
52029
52030else
52031  supports=no
52032fi
52033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52034  ac_ext=cpp
52035ac_cpp='$CXXCPP $CPPFLAGS'
52036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52039
52040  CFLAGS="$saved_cflags"
52041
52042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52043$as_echo "$supports" >&6; }
52044  if test "x$supports" = "xyes" ; then
52045    :
52046    C_COMP_SUPPORTS="yes"
52047  else
52048    :
52049    C_COMP_SUPPORTS="no"
52050  fi
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110    # Execute function body
52111
52112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52113$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52114  supports=yes
52115
52116  saved_cxxflags="$CXXFLAGS"
52117  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52118  ac_ext=cpp
52119ac_cpp='$CXXCPP $CPPFLAGS'
52120ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52121ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52122ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52123
52124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52125/* end confdefs.h.  */
52126int i;
52127_ACEOF
52128if ac_fn_cxx_try_compile "$LINENO"; then :
52129
52130else
52131  supports=no
52132fi
52133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52134  ac_ext=cpp
52135ac_cpp='$CXXCPP $CPPFLAGS'
52136ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52137ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52138ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52139
52140  CXXFLAGS="$saved_cxxflags"
52141
52142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52143$as_echo "$supports" >&6; }
52144  if test "x$supports" = "xyes" ; then
52145    :
52146    CXX_COMP_SUPPORTS="yes"
52147  else
52148    :
52149    CXX_COMP_SUPPORTS="no"
52150  fi
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52165$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52166  supports=no
52167  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52168
52169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52170$as_echo "$supports" >&6; }
52171  if test "x$supports" = "xyes" ; then
52172    :
52173    BUILD_CC_CAN_DISABLE_WARNINGS=true
52174  else
52175    :
52176    BUILD_CC_CAN_DISABLE_WARNINGS=false
52177
52178  fi
52179
52180
52181
52182
52183
52184
52185      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52186        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52187      else
52188        BUILD_CC_DISABLE_WARNING_PREFIX=
52189      fi
52190      CC="$CC_OLD"
52191      ;;
52192    clang)
52193      DISABLE_WARNING_PREFIX="-Wno-"
52194      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52195      ;;
52196    xlc)
52197      DISABLE_WARNING_PREFIX="-qsuppress="
52198      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52199      ;;
52200  esac
52201
52202
52203
52204
52205
52206# Setup debug symbols (need objcopy from the toolchain for that)
52207
52208  #
52209  # NATIVE_DEBUG_SYMBOLS
52210  # This must be done after the toolchain is setup, since we're looking at objcopy.
52211  #
52212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52213$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52214
52215# Check whether --with-native-debug-symbols was given.
52216if test "${with_native_debug_symbols+set}" = set; then :
52217  withval=$with_native_debug_symbols;
52218        if test "x$OPENJDK_TARGET_OS" = xaix; then
52219          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52220            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52221          fi
52222        fi
52223
52224else
52225
52226        if test "x$OPENJDK_TARGET_OS" = xaix; then
52227          # AIX doesn't support 'zipped' so use 'internal' as default
52228          with_native_debug_symbols="internal"
52229        else
52230          if test "x$STATIC_BUILD" = xtrue; then
52231            with_native_debug_symbols="none"
52232          else
52233            with_native_debug_symbols="zipped"
52234          fi
52235        fi
52236
52237fi
52238
52239  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52241$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52242
52243  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52244
52245    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52246      if test "x$OBJCOPY" = x; then
52247        # enabling of enable-debug-symbols and can't find objcopy
52248        # this is an error
52249        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52250      fi
52251    fi
52252
52253    COMPILE_WITH_DEBUG_SYMBOLS=true
52254    COPY_DEBUG_SYMBOLS=true
52255    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52256
52257    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52258    DEBUG_BINARIES=false
52259    STRIP_POLICY=min_strip
52260
52261  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52262    COMPILE_WITH_DEBUG_SYMBOLS=false
52263    COPY_DEBUG_SYMBOLS=false
52264    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52265
52266    DEBUG_BINARIES=false
52267    STRIP_POLICY=no_strip
52268  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52269    COMPILE_WITH_DEBUG_SYMBOLS=true
52270    COPY_DEBUG_SYMBOLS=false
52271    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52272
52273    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52274    DEBUG_BINARIES=true
52275    STRIP_POLICY=no_strip
52276    STRIP=""
52277
52278  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52279
52280    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52281      if test "x$OBJCOPY" = x; then
52282        # enabling of enable-debug-symbols and can't find objcopy
52283        # this is an error
52284        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52285      fi
52286    fi
52287
52288    COMPILE_WITH_DEBUG_SYMBOLS=true
52289    COPY_DEBUG_SYMBOLS=true
52290    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52291
52292    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52293    DEBUG_BINARIES=false
52294    STRIP_POLICY=min_strip
52295  else
52296    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52297  fi
52298
52299  # --enable-debug-symbols is deprecated.
52300  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52301
52302  # Check whether --enable-debug-symbols was given.
52303if test "${enable_debug_symbols+set}" = set; then :
52304  enableval=$enable_debug_symbols;
52305fi
52306
52307  if test "x$enable_debug_symbols" != x; then
52308    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52309$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52310
52311    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52312      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52313$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52314    fi
52315
52316  fi
52317
52318
52319  # --enable-zip-debug-info is deprecated.
52320  # Please use --with-native-debug-symbols=zipped .
52321
52322  # Check whether --enable-zip-debug-info was given.
52323if test "${enable_zip_debug_info+set}" = set; then :
52324  enableval=$enable_zip_debug_info;
52325fi
52326
52327  if test "x$enable_zip_debug_info" != x; then
52328    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52329$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52330
52331    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52332      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52333$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52334    fi
52335
52336  fi
52337
52338
52339
52340
52341
52342
52343  # Legacy values
52344
52345
52346
52347
52348  # Check whether --enable-native-coverage was given.
52349if test "${enable_native_coverage+set}" = set; then :
52350  enableval=$enable_native_coverage;
52351fi
52352
52353  GCOV_ENABLED="false"
52354  if test "x$enable_native_coverage" = "xyes"; then
52355    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52357$as_echo_n "checking if native coverage is enabled... " >&6; }
52358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52359$as_echo "yes" >&6; }
52360      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52361      GCOV_LDFLAGS="-fprofile-arcs"
52362      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52363      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52364      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52365      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52366      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52367      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52368      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52369      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52370      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52371      GCOV_ENABLED="true"
52372    else
52373      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52374    fi
52375  elif test "x$enable_native_coverage" = "xno"; then
52376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52377$as_echo_n "checking if native coverage is enabled... " >&6; }
52378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52379$as_echo "no" >&6; }
52380  elif test "x$enable_native_coverage" != "x"; then
52381    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52382  fi
52383
52384
52385
52386
52387# Need toolchain to setup dtrace
52388
52389  # Test for dtrace dependencies
52390  # Check whether --enable-dtrace was given.
52391if test "${enable_dtrace+set}" = set; then :
52392  enableval=$enable_dtrace;
52393fi
52394
52395
52396  DTRACE_DEP_MISSING=false
52397
52398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52399$as_echo_n "checking for dtrace tool... " >&6; }
52400  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52402$as_echo "$DTRACE" >&6; }
52403  else
52404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52405$as_echo "not found, cannot build dtrace" >&6; }
52406    DTRACE_DEP_MISSING=true
52407  fi
52408
52409  for ac_header in sys/sdt.h
52410do :
52411  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52412if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52413  cat >>confdefs.h <<_ACEOF
52414#define HAVE_SYS_SDT_H 1
52415_ACEOF
52416 DTRACE_HEADERS_OK=yes
52417else
52418  DTRACE_HEADERS_OK=no
52419fi
52420
52421done
52422
52423  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52424    DTRACE_DEP_MISSING=true
52425  fi
52426
52427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52428$as_echo_n "checking if dtrace should be built... " >&6; }
52429  if test "x$enable_dtrace" = "xyes"; then
52430    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52432$as_echo "no, missing dependencies" >&6; }
52433
52434  # Print a helpful message on how to acquire the necessary build dependency.
52435  # dtrace is the help tag: freetype, cups, alsa etc
52436  MISSING_DEPENDENCY=dtrace
52437
52438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52439    cygwin_help $MISSING_DEPENDENCY
52440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52441    msys_help $MISSING_DEPENDENCY
52442  else
52443    PKGHANDLER_COMMAND=
52444
52445    case $PKGHANDLER in
52446      apt-get)
52447        apt_help     $MISSING_DEPENDENCY ;;
52448      yum)
52449        yum_help     $MISSING_DEPENDENCY ;;
52450      port)
52451        port_help    $MISSING_DEPENDENCY ;;
52452      pkgutil)
52453        pkgutil_help $MISSING_DEPENDENCY ;;
52454      pkgadd)
52455        pkgadd_help  $MISSING_DEPENDENCY ;;
52456    esac
52457
52458    if test "x$PKGHANDLER_COMMAND" != x; then
52459      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52460    fi
52461  fi
52462
52463      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52464    else
52465      INCLUDE_DTRACE=true
52466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52467$as_echo "yes, forced" >&6; }
52468    fi
52469  elif test "x$enable_dtrace" = "xno"; then
52470    INCLUDE_DTRACE=false
52471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52472$as_echo "no, forced" >&6; }
52473  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52474    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52475      INCLUDE_DTRACE=false
52476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52477$as_echo "no, non-open linux build" >&6; }
52478    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52479      INCLUDE_DTRACE=false
52480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52481$as_echo "no, missing dependencies" >&6; }
52482    else
52483      INCLUDE_DTRACE=true
52484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52485$as_echo "yes, dependencies present" >&6; }
52486    fi
52487  else
52488    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52489  fi
52490
52491
52492
52493  # The user can in some cases supply additional jvm features. For the custom
52494  # variant, this defines the entire variant.
52495
52496# Check whether --with-jvm-features was given.
52497if test "${with_jvm_features+set}" = set; then :
52498  withval=$with_jvm_features;
52499fi
52500
52501  if test "x$with_jvm_features" != x; then
52502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52503$as_echo_n "checking additional JVM features... " >&6; }
52504    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52506$as_echo "$JVM_FEATURES" >&6; }
52507  fi
52508
52509  # Verify that dependencies are met for explicitly set features.
52510  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52511    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52512  fi
52513
52514  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52515    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52516  fi
52517
52518  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52519    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52520  fi
52521
52522  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52523    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52524  fi
52525
52526  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52527    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52528  fi
52529
52530  # Turn on additional features based on other parts of configure
52531  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52532    JVM_FEATURES="$JVM_FEATURES dtrace"
52533  else
52534    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52535      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52536    fi
52537  fi
52538
52539  if test "x$STATIC_BUILD" = "xtrue"; then
52540    JVM_FEATURES="$JVM_FEATURES static-build"
52541  else
52542    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52543      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52544    fi
52545  fi
52546
52547  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52548    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52549      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52550    fi
52551  fi
52552
52553  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52554    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52555      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52556    fi
52557  fi
52558
52559  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52560  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52561      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52562      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52563    JVM_FEATURES_jvmci="jvmci"
52564  else
52565    JVM_FEATURES_jvmci=""
52566  fi
52567
52568  # All variants but minimal (and custom) get these features
52569  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52570
52571  # Enable features depending on variant.
52572  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52573  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52574  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52575  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52576  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52577  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52578  JVM_FEATURES_custom="$JVM_FEATURES"
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588  # Used for verification of Makefiles by check-jvm-feature
52589
52590
52591  # We don't support --with-jvm-interpreter anymore, use zero instead.
52592
52593
52594# Check whether --with-jvm-interpreter was given.
52595if test "${with_jvm_interpreter+set}" = set; then :
52596  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52597$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52598fi
52599
52600
52601
52602
52603###############################################################################
52604#
52605# Check dependencies for external and internal libraries.
52606#
52607###############################################################################
52608
52609# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52610
52611  # When using cygwin or msys, we need a wrapper binary that renames
52612  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52613  # @files and rewrites these too! This wrapper binary is
52614  # called fixpath.
52615  FIXPATH=
52616  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52618$as_echo_n "checking if fixpath can be created... " >&6; }
52619    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52620    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52621    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52622    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52623      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52624      FIXPATH="$FIXPATH_BIN -c"
52625    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52626      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52627      # @ was chosen as separator to minimize risk of other tools messing around with it
52628      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52629          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52630      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52631      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52632    fi
52633    FIXPATH_SRC_W="$FIXPATH_SRC"
52634    FIXPATH_BIN_W="$FIXPATH_BIN"
52635
52636  unix_path="$FIXPATH_SRC_W"
52637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52638    windows_path=`$CYGPATH -m "$unix_path"`
52639    FIXPATH_SRC_W="$windows_path"
52640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52641    windows_path=`cmd //c echo $unix_path`
52642    FIXPATH_SRC_W="$windows_path"
52643  fi
52644
52645
52646  unix_path="$FIXPATH_BIN_W"
52647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52648    windows_path=`$CYGPATH -m "$unix_path"`
52649    FIXPATH_BIN_W="$windows_path"
52650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52651    windows_path=`cmd //c echo $unix_path`
52652    FIXPATH_BIN_W="$windows_path"
52653  fi
52654
52655    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52656    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52657    cd $FIXPATH_DIR
52658    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52659    cd $CURDIR
52660
52661    if test ! -x $FIXPATH_BIN; then
52662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52663$as_echo "no" >&6; }
52664      cat $FIXPATH_DIR/fixpath1.log
52665      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52666    fi
52667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52668$as_echo "yes" >&6; }
52669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52670$as_echo_n "checking if fixpath.exe works... " >&6; }
52671    cd $FIXPATH_DIR
52672    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52673        > $FIXPATH_DIR/fixpath2.log 2>&1
52674    cd $CURDIR
52675    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52677$as_echo "no" >&6; }
52678      cat $FIXPATH_DIR/fixpath2.log
52679      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52680    fi
52681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52682$as_echo "yes" >&6; }
52683
52684    FIXPATH_DETACH_FLAG="--detach"
52685  fi
52686
52687
52688
52689
52690
52691
52692  # Check if X11 is needed
52693  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52694    # No X11 support on windows or macosx
52695    NEEDS_LIB_X11=false
52696  else
52697    if test "x$SUPPORT_HEADFUL" = xno; then
52698      # No X11 support if building headless-only
52699      NEEDS_LIB_X11=false
52700    else
52701      # All other instances need X11
52702      NEEDS_LIB_X11=true
52703    fi
52704  fi
52705
52706  # Check if cups is needed
52707  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52708    # Windows have a separate print system
52709    NEEDS_LIB_CUPS=false
52710  else
52711    NEEDS_LIB_CUPS=true
52712  fi
52713
52714  # Check if freetype is needed
52715  if test "x$OPENJDK" = "xtrue"; then
52716    NEEDS_LIB_FREETYPE=true
52717  else
52718    NEEDS_LIB_FREETYPE=false
52719  fi
52720
52721  # Check if alsa is needed
52722  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52723    NEEDS_LIB_ALSA=true
52724  else
52725    NEEDS_LIB_ALSA=false
52726  fi
52727
52728  # Check if ffi is needed
52729  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52730    NEEDS_LIB_FFI=true
52731  else
52732    NEEDS_LIB_FFI=false
52733  fi
52734
52735
52736  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52737  # dynamic build is configured on command line.
52738
52739# Check whether --with-stdc++lib was given.
52740if test "${with_stdc__lib+set}" = set; then :
52741  withval=$with_stdc__lib;
52742        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52743                && test "x$with_stdc__lib" != xdefault; then
52744          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52745        fi
52746
52747else
52748  with_stdc__lib=default
52749
52750fi
52751
52752
52753  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52754    # Test if -lstdc++ works.
52755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52756$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52757    ac_ext=cpp
52758ac_cpp='$CXXCPP $CPPFLAGS'
52759ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52760ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52761ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52762
52763    OLD_CXXFLAGS="$CXXFLAGS"
52764    CXXFLAGS="$CXXFLAGS -lstdc++"
52765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52766/* end confdefs.h.  */
52767
52768int
52769main ()
52770{
52771return 0;
52772  ;
52773  return 0;
52774}
52775_ACEOF
52776if ac_fn_cxx_try_link "$LINENO"; then :
52777  has_dynamic_libstdcxx=yes
52778else
52779  has_dynamic_libstdcxx=no
52780fi
52781rm -f core conftest.err conftest.$ac_objext \
52782    conftest$ac_exeext conftest.$ac_ext
52783    CXXFLAGS="$OLD_CXXFLAGS"
52784    ac_ext=cpp
52785ac_cpp='$CXXCPP $CPPFLAGS'
52786ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52787ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52788ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52789
52790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52791$as_echo "$has_dynamic_libstdcxx" >&6; }
52792
52793    # Test if stdc++ can be linked statically.
52794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52795$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52796    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52797    ac_ext=cpp
52798ac_cpp='$CXXCPP $CPPFLAGS'
52799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52802
52803    OLD_LIBS="$LIBS"
52804    OLD_CXX="$CXX"
52805    LIBS="$STATIC_STDCXX_FLAGS"
52806    CXX="$CC"
52807    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52808/* end confdefs.h.  */
52809
52810int
52811main ()
52812{
52813return 0;
52814  ;
52815  return 0;
52816}
52817_ACEOF
52818if ac_fn_cxx_try_link "$LINENO"; then :
52819  has_static_libstdcxx=yes
52820else
52821  has_static_libstdcxx=no
52822fi
52823rm -f core conftest.err conftest.$ac_objext \
52824    conftest$ac_exeext conftest.$ac_ext
52825    LIBS="$OLD_LIBS"
52826    CXX="$OLD_CXX"
52827    ac_ext=cpp
52828ac_cpp='$CXXCPP $CPPFLAGS'
52829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52832
52833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52834$as_echo "$has_static_libstdcxx" >&6; }
52835
52836    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52837      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52838    fi
52839
52840    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52841      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52842    fi
52843
52844    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52845      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52846    fi
52847
52848    # If dynamic was requested, it's available since it would fail above otherwise.
52849    # If dynamic wasn't requested, go with static unless it isn't available.
52850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52851$as_echo_n "checking how to link with libstdc++... " >&6; }
52852    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52853      LIBCXX="$LIBCXX -lstdc++"
52854      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52855      JVM_LIBS="-lstdc++ $JVM_LIBS"
52856      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52857      # just use the same setting as for the TARGET toolchain.
52858      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52859      LDCXX="$CXX"
52860      STATIC_CXX_SETTING="STATIC_CXX=false"
52861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52862$as_echo "dynamic" >&6; }
52863    else
52864      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52865      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52866      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52867      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52868      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52869      # just use the same setting as for the TARGET toolchain.
52870      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52871      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52872      LDCXX="$CC"
52873      STATIC_CXX_SETTING="STATIC_CXX=true"
52874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52875$as_echo "static" >&6; }
52876    fi
52877  fi
52878
52879
52880  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52881  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52882    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52883  fi
52884
52885  # TODO better (platform agnostic) test
52886  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52887    LIBCXX="-lstdc++"
52888  fi
52889
52890
52891  # Setup Windows runtime dlls
52892  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52893
52894
52895# Check whether --with-msvcr-dll was given.
52896if test "${with_msvcr_dll+set}" = set; then :
52897  withval=$with_msvcr_dll;
52898fi
52899
52900
52901  if test "x$with_msvcr_dll" != x; then
52902    # If given explicitely by user, do not probe. If not present, fail directly.
52903
52904  DLL_NAME="$MSVCR_NAME"
52905  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52906  METHOD="--with-msvcr-dll"
52907  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52908    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52909$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52910
52911    # Need to check if the found msvcr is correct architecture
52912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52913$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52914    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52916      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52917      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52918      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52919        CORRECT_MSVCR_ARCH="PE32 executable"
52920      else
52921        CORRECT_MSVCR_ARCH="PE32+ executable"
52922      fi
52923    else
52924      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52925        CORRECT_MSVCR_ARCH=386
52926      else
52927        CORRECT_MSVCR_ARCH=x86-64
52928      fi
52929    fi
52930    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52932$as_echo "ok" >&6; }
52933      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52934
52935  # Only process if variable expands to non-empty
52936
52937  if test "x$MSVC_DLL" != x; then
52938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52939
52940  # Input might be given as Windows format, start by converting to
52941  # unix format.
52942  path="$MSVC_DLL"
52943  new_path=`$CYGPATH -u "$path"`
52944
52945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52948  # "foo.exe" is OK but "foo" is an error.
52949  #
52950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52951  # It is also a way to make sure we got the proper file name for the real test later on.
52952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52953  if test "x$test_shortpath" = x; then
52954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52955$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52956    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52957  fi
52958
52959  # Call helper function which possibly converts this using DOS-style short mode.
52960  # If so, the updated path is stored in $new_path.
52961
52962  input_path="$new_path"
52963  # Check if we need to convert this using DOS-style short mode. If the path
52964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52965  # take no chances and rewrite it.
52966  # Note: m4 eats our [], so we need to use [ and ] instead.
52967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52968  if test "x$has_forbidden_chars" != x; then
52969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52973      # Going to short mode and back again did indeed matter. Since short mode is
52974      # case insensitive, let's make it lowercase to improve readability.
52975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52976      # Now convert it back to Unix-style (cygpath)
52977      input_path=`$CYGPATH -u "$shortmode_path"`
52978      new_path="$input_path"
52979    fi
52980  fi
52981
52982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52983  if test "x$test_cygdrive_prefix" = x; then
52984    # As a simple fix, exclude /usr/bin since it's not a real path.
52985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52987      # a path prefixed by /cygdrive for fixpath to work.
52988      new_path="$CYGWIN_ROOT_PATH$input_path"
52989    fi
52990  fi
52991
52992
52993  if test "x$path" != "x$new_path"; then
52994    MSVC_DLL="$new_path"
52995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52996$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52997  fi
52998
52999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53000
53001  path="$MSVC_DLL"
53002  has_colon=`$ECHO $path | $GREP ^.:`
53003  new_path="$path"
53004  if test "x$has_colon" = x; then
53005    # Not in mixed or Windows style, start by that.
53006    new_path=`cmd //c echo $path`
53007  fi
53008
53009
53010  input_path="$new_path"
53011  # Check if we need to convert this using DOS-style short mode. If the path
53012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53013  # take no chances and rewrite it.
53014  # Note: m4 eats our [], so we need to use [ and ] instead.
53015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53016  if test "x$has_forbidden_chars" != x; then
53017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53019  fi
53020
53021
53022  windows_path="$new_path"
53023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53024    unix_path=`$CYGPATH -u "$windows_path"`
53025    new_path="$unix_path"
53026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53028    new_path="$unix_path"
53029  fi
53030
53031  if test "x$path" != "x$new_path"; then
53032    MSVC_DLL="$new_path"
53033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53034$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53035  fi
53036
53037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53039
53040    else
53041      # We're on a unix platform. Hooray! :)
53042      path="$MSVC_DLL"
53043      has_space=`$ECHO "$path" | $GREP " "`
53044      if test "x$has_space" != x; then
53045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53046$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53048      fi
53049
53050      # Use eval to expand a potential ~
53051      eval path="$path"
53052      if test ! -f "$path" && test ! -d "$path"; then
53053        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53054      fi
53055
53056      if test -d "$path"; then
53057        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53058      else
53059        dir="`$DIRNAME "$path"`"
53060        base="`$BASENAME "$path"`"
53061        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53062      fi
53063    fi
53064  fi
53065
53066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53067$as_echo_n "checking for $DLL_NAME... " >&6; }
53068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53069$as_echo "$MSVC_DLL" >&6; }
53070    else
53071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53072$as_echo "incorrect, ignoring" >&6; }
53073      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53074$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53075    fi
53076  fi
53077
53078    if test "x$MSVC_DLL" = x; then
53079      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53080    fi
53081    MSVCR_DLL="$MSVC_DLL"
53082  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53083
53084  DLL_NAME="$MSVCR_NAME"
53085  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53086  METHOD="devkit"
53087  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53089$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53090
53091    # Need to check if the found msvcr is correct architecture
53092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53093$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53094    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53096      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53097      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53098      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53099        CORRECT_MSVCR_ARCH="PE32 executable"
53100      else
53101        CORRECT_MSVCR_ARCH="PE32+ executable"
53102      fi
53103    else
53104      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53105        CORRECT_MSVCR_ARCH=386
53106      else
53107        CORRECT_MSVCR_ARCH=x86-64
53108      fi
53109    fi
53110    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53112$as_echo "ok" >&6; }
53113      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53114
53115  # Only process if variable expands to non-empty
53116
53117  if test "x$MSVC_DLL" != x; then
53118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53119
53120  # Input might be given as Windows format, start by converting to
53121  # unix format.
53122  path="$MSVC_DLL"
53123  new_path=`$CYGPATH -u "$path"`
53124
53125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53128  # "foo.exe" is OK but "foo" is an error.
53129  #
53130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53131  # It is also a way to make sure we got the proper file name for the real test later on.
53132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53133  if test "x$test_shortpath" = x; then
53134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53135$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53136    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53137  fi
53138
53139  # Call helper function which possibly converts this using DOS-style short mode.
53140  # If so, the updated path is stored in $new_path.
53141
53142  input_path="$new_path"
53143  # Check if we need to convert this using DOS-style short mode. If the path
53144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53145  # take no chances and rewrite it.
53146  # Note: m4 eats our [], so we need to use [ and ] instead.
53147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53148  if test "x$has_forbidden_chars" != x; then
53149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53153      # Going to short mode and back again did indeed matter. Since short mode is
53154      # case insensitive, let's make it lowercase to improve readability.
53155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53156      # Now convert it back to Unix-style (cygpath)
53157      input_path=`$CYGPATH -u "$shortmode_path"`
53158      new_path="$input_path"
53159    fi
53160  fi
53161
53162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53163  if test "x$test_cygdrive_prefix" = x; then
53164    # As a simple fix, exclude /usr/bin since it's not a real path.
53165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53167      # a path prefixed by /cygdrive for fixpath to work.
53168      new_path="$CYGWIN_ROOT_PATH$input_path"
53169    fi
53170  fi
53171
53172
53173  if test "x$path" != "x$new_path"; then
53174    MSVC_DLL="$new_path"
53175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53177  fi
53178
53179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53180
53181  path="$MSVC_DLL"
53182  has_colon=`$ECHO $path | $GREP ^.:`
53183  new_path="$path"
53184  if test "x$has_colon" = x; then
53185    # Not in mixed or Windows style, start by that.
53186    new_path=`cmd //c echo $path`
53187  fi
53188
53189
53190  input_path="$new_path"
53191  # Check if we need to convert this using DOS-style short mode. If the path
53192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53193  # take no chances and rewrite it.
53194  # Note: m4 eats our [], so we need to use [ and ] instead.
53195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53196  if test "x$has_forbidden_chars" != x; then
53197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53199  fi
53200
53201
53202  windows_path="$new_path"
53203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53204    unix_path=`$CYGPATH -u "$windows_path"`
53205    new_path="$unix_path"
53206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53208    new_path="$unix_path"
53209  fi
53210
53211  if test "x$path" != "x$new_path"; then
53212    MSVC_DLL="$new_path"
53213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53215  fi
53216
53217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53219
53220    else
53221      # We're on a unix platform. Hooray! :)
53222      path="$MSVC_DLL"
53223      has_space=`$ECHO "$path" | $GREP " "`
53224      if test "x$has_space" != x; then
53225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53226$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53228      fi
53229
53230      # Use eval to expand a potential ~
53231      eval path="$path"
53232      if test ! -f "$path" && test ! -d "$path"; then
53233        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53234      fi
53235
53236      if test -d "$path"; then
53237        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53238      else
53239        dir="`$DIRNAME "$path"`"
53240        base="`$BASENAME "$path"`"
53241        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53242      fi
53243    fi
53244  fi
53245
53246      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53247$as_echo_n "checking for $DLL_NAME... " >&6; }
53248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53249$as_echo "$MSVC_DLL" >&6; }
53250    else
53251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53252$as_echo "incorrect, ignoring" >&6; }
53253      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53254$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53255    fi
53256  fi
53257
53258    if test "x$MSVC_DLL" = x; then
53259      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53260    fi
53261    MSVCR_DLL="$MSVC_DLL"
53262  else
53263
53264  DLL_NAME="${MSVCR_NAME}"
53265  MSVC_DLL=
53266
53267  if test "x$MSVC_DLL" = x; then
53268    # Probe: Using well-known location from Visual Studio 10.0
53269    if test "x$VCINSTALLDIR" != x; then
53270      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53271
53272  windows_path="$CYGWIN_VC_INSTALL_DIR"
53273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53274    unix_path=`$CYGPATH -u "$windows_path"`
53275    CYGWIN_VC_INSTALL_DIR="$unix_path"
53276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53278    CYGWIN_VC_INSTALL_DIR="$unix_path"
53279  fi
53280
53281      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53282        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53283      else
53284        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53285      fi
53286      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53287
53288  DLL_NAME="$DLL_NAME"
53289  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53290  METHOD="well-known location in VCINSTALLDIR"
53291  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53292    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53293$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53294
53295    # Need to check if the found msvcr is correct architecture
53296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53297$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53298    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53300      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53301      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53302      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53303        CORRECT_MSVCR_ARCH="PE32 executable"
53304      else
53305        CORRECT_MSVCR_ARCH="PE32+ executable"
53306      fi
53307    else
53308      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53309        CORRECT_MSVCR_ARCH=386
53310      else
53311        CORRECT_MSVCR_ARCH=x86-64
53312      fi
53313    fi
53314    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53316$as_echo "ok" >&6; }
53317      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53318
53319  # Only process if variable expands to non-empty
53320
53321  if test "x$MSVC_DLL" != x; then
53322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53323
53324  # Input might be given as Windows format, start by converting to
53325  # unix format.
53326  path="$MSVC_DLL"
53327  new_path=`$CYGPATH -u "$path"`
53328
53329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53332  # "foo.exe" is OK but "foo" is an error.
53333  #
53334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53335  # It is also a way to make sure we got the proper file name for the real test later on.
53336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53337  if test "x$test_shortpath" = x; then
53338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53339$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53340    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53341  fi
53342
53343  # Call helper function which possibly converts this using DOS-style short mode.
53344  # If so, the updated path is stored in $new_path.
53345
53346  input_path="$new_path"
53347  # Check if we need to convert this using DOS-style short mode. If the path
53348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53349  # take no chances and rewrite it.
53350  # Note: m4 eats our [], so we need to use [ and ] instead.
53351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53352  if test "x$has_forbidden_chars" != x; then
53353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53357      # Going to short mode and back again did indeed matter. Since short mode is
53358      # case insensitive, let's make it lowercase to improve readability.
53359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53360      # Now convert it back to Unix-style (cygpath)
53361      input_path=`$CYGPATH -u "$shortmode_path"`
53362      new_path="$input_path"
53363    fi
53364  fi
53365
53366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53367  if test "x$test_cygdrive_prefix" = x; then
53368    # As a simple fix, exclude /usr/bin since it's not a real path.
53369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53371      # a path prefixed by /cygdrive for fixpath to work.
53372      new_path="$CYGWIN_ROOT_PATH$input_path"
53373    fi
53374  fi
53375
53376
53377  if test "x$path" != "x$new_path"; then
53378    MSVC_DLL="$new_path"
53379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53380$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53381  fi
53382
53383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53384
53385  path="$MSVC_DLL"
53386  has_colon=`$ECHO $path | $GREP ^.:`
53387  new_path="$path"
53388  if test "x$has_colon" = x; then
53389    # Not in mixed or Windows style, start by that.
53390    new_path=`cmd //c echo $path`
53391  fi
53392
53393
53394  input_path="$new_path"
53395  # Check if we need to convert this using DOS-style short mode. If the path
53396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53397  # take no chances and rewrite it.
53398  # Note: m4 eats our [], so we need to use [ and ] instead.
53399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53400  if test "x$has_forbidden_chars" != x; then
53401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53403  fi
53404
53405
53406  windows_path="$new_path"
53407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53408    unix_path=`$CYGPATH -u "$windows_path"`
53409    new_path="$unix_path"
53410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53412    new_path="$unix_path"
53413  fi
53414
53415  if test "x$path" != "x$new_path"; then
53416    MSVC_DLL="$new_path"
53417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53418$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53419  fi
53420
53421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53423
53424    else
53425      # We're on a unix platform. Hooray! :)
53426      path="$MSVC_DLL"
53427      has_space=`$ECHO "$path" | $GREP " "`
53428      if test "x$has_space" != x; then
53429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53430$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53432      fi
53433
53434      # Use eval to expand a potential ~
53435      eval path="$path"
53436      if test ! -f "$path" && test ! -d "$path"; then
53437        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53438      fi
53439
53440      if test -d "$path"; then
53441        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53442      else
53443        dir="`$DIRNAME "$path"`"
53444        base="`$BASENAME "$path"`"
53445        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53446      fi
53447    fi
53448  fi
53449
53450      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53451$as_echo_n "checking for $DLL_NAME... " >&6; }
53452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53453$as_echo "$MSVC_DLL" >&6; }
53454    else
53455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53456$as_echo "incorrect, ignoring" >&6; }
53457      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53458$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53459    fi
53460  fi
53461
53462    fi
53463  fi
53464
53465  if test "x$MSVC_DLL" = x; then
53466    # Probe: Check in the Boot JDK directory.
53467    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53468
53469  DLL_NAME="$DLL_NAME"
53470  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53471  METHOD="well-known location in Boot JDK"
53472  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53473    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53474$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53475
53476    # Need to check if the found msvcr is correct architecture
53477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53478$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53479    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53481      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53482      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53484        CORRECT_MSVCR_ARCH="PE32 executable"
53485      else
53486        CORRECT_MSVCR_ARCH="PE32+ executable"
53487      fi
53488    else
53489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53490        CORRECT_MSVCR_ARCH=386
53491      else
53492        CORRECT_MSVCR_ARCH=x86-64
53493      fi
53494    fi
53495    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53497$as_echo "ok" >&6; }
53498      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53499
53500  # Only process if variable expands to non-empty
53501
53502  if test "x$MSVC_DLL" != x; then
53503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53504
53505  # Input might be given as Windows format, start by converting to
53506  # unix format.
53507  path="$MSVC_DLL"
53508  new_path=`$CYGPATH -u "$path"`
53509
53510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53513  # "foo.exe" is OK but "foo" is an error.
53514  #
53515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53516  # It is also a way to make sure we got the proper file name for the real test later on.
53517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53518  if test "x$test_shortpath" = x; then
53519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53520$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53521    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53522  fi
53523
53524  # Call helper function which possibly converts this using DOS-style short mode.
53525  # If so, the updated path is stored in $new_path.
53526
53527  input_path="$new_path"
53528  # Check if we need to convert this using DOS-style short mode. If the path
53529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53530  # take no chances and rewrite it.
53531  # Note: m4 eats our [], so we need to use [ and ] instead.
53532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53533  if test "x$has_forbidden_chars" != x; then
53534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53538      # Going to short mode and back again did indeed matter. Since short mode is
53539      # case insensitive, let's make it lowercase to improve readability.
53540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53541      # Now convert it back to Unix-style (cygpath)
53542      input_path=`$CYGPATH -u "$shortmode_path"`
53543      new_path="$input_path"
53544    fi
53545  fi
53546
53547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53548  if test "x$test_cygdrive_prefix" = x; then
53549    # As a simple fix, exclude /usr/bin since it's not a real path.
53550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53552      # a path prefixed by /cygdrive for fixpath to work.
53553      new_path="$CYGWIN_ROOT_PATH$input_path"
53554    fi
53555  fi
53556
53557
53558  if test "x$path" != "x$new_path"; then
53559    MSVC_DLL="$new_path"
53560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53561$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53562  fi
53563
53564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53565
53566  path="$MSVC_DLL"
53567  has_colon=`$ECHO $path | $GREP ^.:`
53568  new_path="$path"
53569  if test "x$has_colon" = x; then
53570    # Not in mixed or Windows style, start by that.
53571    new_path=`cmd //c echo $path`
53572  fi
53573
53574
53575  input_path="$new_path"
53576  # Check if we need to convert this using DOS-style short mode. If the path
53577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53578  # take no chances and rewrite it.
53579  # Note: m4 eats our [], so we need to use [ and ] instead.
53580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53581  if test "x$has_forbidden_chars" != x; then
53582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53584  fi
53585
53586
53587  windows_path="$new_path"
53588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53589    unix_path=`$CYGPATH -u "$windows_path"`
53590    new_path="$unix_path"
53591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53593    new_path="$unix_path"
53594  fi
53595
53596  if test "x$path" != "x$new_path"; then
53597    MSVC_DLL="$new_path"
53598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53599$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53600  fi
53601
53602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53604
53605    else
53606      # We're on a unix platform. Hooray! :)
53607      path="$MSVC_DLL"
53608      has_space=`$ECHO "$path" | $GREP " "`
53609      if test "x$has_space" != x; then
53610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53611$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53613      fi
53614
53615      # Use eval to expand a potential ~
53616      eval path="$path"
53617      if test ! -f "$path" && test ! -d "$path"; then
53618        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53619      fi
53620
53621      if test -d "$path"; then
53622        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53623      else
53624        dir="`$DIRNAME "$path"`"
53625        base="`$BASENAME "$path"`"
53626        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53627      fi
53628    fi
53629  fi
53630
53631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53632$as_echo_n "checking for $DLL_NAME... " >&6; }
53633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53634$as_echo "$MSVC_DLL" >&6; }
53635    else
53636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53637$as_echo "incorrect, ignoring" >&6; }
53638      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53639$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53640    fi
53641  fi
53642
53643  fi
53644
53645  if test "x$MSVC_DLL" = x; then
53646    # Probe: Look in the Windows system32 directory
53647    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53648
53649  windows_path="$CYGWIN_SYSTEMROOT"
53650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53651    unix_path=`$CYGPATH -u "$windows_path"`
53652    CYGWIN_SYSTEMROOT="$unix_path"
53653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53655    CYGWIN_SYSTEMROOT="$unix_path"
53656  fi
53657
53658    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53659
53660  DLL_NAME="$DLL_NAME"
53661  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53662  METHOD="well-known location in SYSTEMROOT"
53663  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53664    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53665$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53666
53667    # Need to check if the found msvcr is correct architecture
53668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53669$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53670    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53672      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53673      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53674      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53675        CORRECT_MSVCR_ARCH="PE32 executable"
53676      else
53677        CORRECT_MSVCR_ARCH="PE32+ executable"
53678      fi
53679    else
53680      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53681        CORRECT_MSVCR_ARCH=386
53682      else
53683        CORRECT_MSVCR_ARCH=x86-64
53684      fi
53685    fi
53686    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53688$as_echo "ok" >&6; }
53689      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53690
53691  # Only process if variable expands to non-empty
53692
53693  if test "x$MSVC_DLL" != x; then
53694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53695
53696  # Input might be given as Windows format, start by converting to
53697  # unix format.
53698  path="$MSVC_DLL"
53699  new_path=`$CYGPATH -u "$path"`
53700
53701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53704  # "foo.exe" is OK but "foo" is an error.
53705  #
53706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53707  # It is also a way to make sure we got the proper file name for the real test later on.
53708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53709  if test "x$test_shortpath" = x; then
53710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53711$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53712    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53713  fi
53714
53715  # Call helper function which possibly converts this using DOS-style short mode.
53716  # If so, the updated path is stored in $new_path.
53717
53718  input_path="$new_path"
53719  # Check if we need to convert this using DOS-style short mode. If the path
53720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53721  # take no chances and rewrite it.
53722  # Note: m4 eats our [], so we need to use [ and ] instead.
53723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53724  if test "x$has_forbidden_chars" != x; then
53725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53729      # Going to short mode and back again did indeed matter. Since short mode is
53730      # case insensitive, let's make it lowercase to improve readability.
53731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53732      # Now convert it back to Unix-style (cygpath)
53733      input_path=`$CYGPATH -u "$shortmode_path"`
53734      new_path="$input_path"
53735    fi
53736  fi
53737
53738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53739  if test "x$test_cygdrive_prefix" = x; then
53740    # As a simple fix, exclude /usr/bin since it's not a real path.
53741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53743      # a path prefixed by /cygdrive for fixpath to work.
53744      new_path="$CYGWIN_ROOT_PATH$input_path"
53745    fi
53746  fi
53747
53748
53749  if test "x$path" != "x$new_path"; then
53750    MSVC_DLL="$new_path"
53751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53752$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53753  fi
53754
53755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53756
53757  path="$MSVC_DLL"
53758  has_colon=`$ECHO $path | $GREP ^.:`
53759  new_path="$path"
53760  if test "x$has_colon" = x; then
53761    # Not in mixed or Windows style, start by that.
53762    new_path=`cmd //c echo $path`
53763  fi
53764
53765
53766  input_path="$new_path"
53767  # Check if we need to convert this using DOS-style short mode. If the path
53768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53769  # take no chances and rewrite it.
53770  # Note: m4 eats our [], so we need to use [ and ] instead.
53771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53772  if test "x$has_forbidden_chars" != x; then
53773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53775  fi
53776
53777
53778  windows_path="$new_path"
53779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53780    unix_path=`$CYGPATH -u "$windows_path"`
53781    new_path="$unix_path"
53782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53784    new_path="$unix_path"
53785  fi
53786
53787  if test "x$path" != "x$new_path"; then
53788    MSVC_DLL="$new_path"
53789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53790$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53791  fi
53792
53793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53795
53796    else
53797      # We're on a unix platform. Hooray! :)
53798      path="$MSVC_DLL"
53799      has_space=`$ECHO "$path" | $GREP " "`
53800      if test "x$has_space" != x; then
53801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53802$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53804      fi
53805
53806      # Use eval to expand a potential ~
53807      eval path="$path"
53808      if test ! -f "$path" && test ! -d "$path"; then
53809        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53810      fi
53811
53812      if test -d "$path"; then
53813        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53814      else
53815        dir="`$DIRNAME "$path"`"
53816        base="`$BASENAME "$path"`"
53817        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53818      fi
53819    fi
53820  fi
53821
53822      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53823$as_echo_n "checking for $DLL_NAME... " >&6; }
53824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53825$as_echo "$MSVC_DLL" >&6; }
53826    else
53827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53828$as_echo "incorrect, ignoring" >&6; }
53829      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53830$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53831    fi
53832  fi
53833
53834  fi
53835
53836  if test "x$MSVC_DLL" = x; then
53837    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53838    if test "x$VS100COMNTOOLS" != x; then
53839      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53840
53841  windows_path="$CYGWIN_VS_TOOLS_DIR"
53842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53843    unix_path=`$CYGPATH -u "$windows_path"`
53844    CYGWIN_VS_TOOLS_DIR="$unix_path"
53845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53847    CYGWIN_VS_TOOLS_DIR="$unix_path"
53848  fi
53849
53850      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53851        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53852	    | $GREP -i /x64/ | $HEAD --lines 1`
53853      else
53854        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53855	    | $GREP -i /x86/ | $HEAD --lines 1`
53856      fi
53857
53858  DLL_NAME="$DLL_NAME"
53859  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53860  METHOD="search of VS100COMNTOOLS"
53861  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53863$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53864
53865    # Need to check if the found msvcr is correct architecture
53866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53867$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53868    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53870      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53871      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53873        CORRECT_MSVCR_ARCH="PE32 executable"
53874      else
53875        CORRECT_MSVCR_ARCH="PE32+ executable"
53876      fi
53877    else
53878      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53879        CORRECT_MSVCR_ARCH=386
53880      else
53881        CORRECT_MSVCR_ARCH=x86-64
53882      fi
53883    fi
53884    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53886$as_echo "ok" >&6; }
53887      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53888
53889  # Only process if variable expands to non-empty
53890
53891  if test "x$MSVC_DLL" != x; then
53892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53893
53894  # Input might be given as Windows format, start by converting to
53895  # unix format.
53896  path="$MSVC_DLL"
53897  new_path=`$CYGPATH -u "$path"`
53898
53899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53902  # "foo.exe" is OK but "foo" is an error.
53903  #
53904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53905  # It is also a way to make sure we got the proper file name for the real test later on.
53906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53907  if test "x$test_shortpath" = x; then
53908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53909$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53910    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53911  fi
53912
53913  # Call helper function which possibly converts this using DOS-style short mode.
53914  # If so, the updated path is stored in $new_path.
53915
53916  input_path="$new_path"
53917  # Check if we need to convert this using DOS-style short mode. If the path
53918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53919  # take no chances and rewrite it.
53920  # Note: m4 eats our [], so we need to use [ and ] instead.
53921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53922  if test "x$has_forbidden_chars" != x; then
53923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53927      # Going to short mode and back again did indeed matter. Since short mode is
53928      # case insensitive, let's make it lowercase to improve readability.
53929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53930      # Now convert it back to Unix-style (cygpath)
53931      input_path=`$CYGPATH -u "$shortmode_path"`
53932      new_path="$input_path"
53933    fi
53934  fi
53935
53936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53937  if test "x$test_cygdrive_prefix" = x; then
53938    # As a simple fix, exclude /usr/bin since it's not a real path.
53939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53941      # a path prefixed by /cygdrive for fixpath to work.
53942      new_path="$CYGWIN_ROOT_PATH$input_path"
53943    fi
53944  fi
53945
53946
53947  if test "x$path" != "x$new_path"; then
53948    MSVC_DLL="$new_path"
53949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53950$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53951  fi
53952
53953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53954
53955  path="$MSVC_DLL"
53956  has_colon=`$ECHO $path | $GREP ^.:`
53957  new_path="$path"
53958  if test "x$has_colon" = x; then
53959    # Not in mixed or Windows style, start by that.
53960    new_path=`cmd //c echo $path`
53961  fi
53962
53963
53964  input_path="$new_path"
53965  # Check if we need to convert this using DOS-style short mode. If the path
53966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53967  # take no chances and rewrite it.
53968  # Note: m4 eats our [], so we need to use [ and ] instead.
53969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53970  if test "x$has_forbidden_chars" != x; then
53971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53973  fi
53974
53975
53976  windows_path="$new_path"
53977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53978    unix_path=`$CYGPATH -u "$windows_path"`
53979    new_path="$unix_path"
53980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53982    new_path="$unix_path"
53983  fi
53984
53985  if test "x$path" != "x$new_path"; then
53986    MSVC_DLL="$new_path"
53987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53988$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53989  fi
53990
53991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53993
53994    else
53995      # We're on a unix platform. Hooray! :)
53996      path="$MSVC_DLL"
53997      has_space=`$ECHO "$path" | $GREP " "`
53998      if test "x$has_space" != x; then
53999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54000$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54002      fi
54003
54004      # Use eval to expand a potential ~
54005      eval path="$path"
54006      if test ! -f "$path" && test ! -d "$path"; then
54007        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54008      fi
54009
54010      if test -d "$path"; then
54011        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54012      else
54013        dir="`$DIRNAME "$path"`"
54014        base="`$BASENAME "$path"`"
54015        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54016      fi
54017    fi
54018  fi
54019
54020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54021$as_echo_n "checking for $DLL_NAME... " >&6; }
54022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54023$as_echo "$MSVC_DLL" >&6; }
54024    else
54025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54026$as_echo "incorrect, ignoring" >&6; }
54027      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54028$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54029    fi
54030  fi
54031
54032    fi
54033  fi
54034
54035  if test "x$MSVC_DLL" = x; then
54036    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54037    # (This was the original behaviour; kept since it might turn something up)
54038    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54039      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54040        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54041	    | $GREP x64 | $HEAD --lines 1`
54042      else
54043        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54044	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54045        if test "x$POSSIBLE_MSVC_DLL" = x; then
54046          # We're grasping at straws now...
54047          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54048	      | $HEAD --lines 1`
54049        fi
54050      fi
54051
54052
54053  DLL_NAME="$DLL_NAME"
54054  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54055  METHOD="search of VCINSTALLDIR"
54056  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54058$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54059
54060    # Need to check if the found msvcr is correct architecture
54061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54062$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54063    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54065      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54066      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54068        CORRECT_MSVCR_ARCH="PE32 executable"
54069      else
54070        CORRECT_MSVCR_ARCH="PE32+ executable"
54071      fi
54072    else
54073      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54074        CORRECT_MSVCR_ARCH=386
54075      else
54076        CORRECT_MSVCR_ARCH=x86-64
54077      fi
54078    fi
54079    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54081$as_echo "ok" >&6; }
54082      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54083
54084  # Only process if variable expands to non-empty
54085
54086  if test "x$MSVC_DLL" != x; then
54087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54088
54089  # Input might be given as Windows format, start by converting to
54090  # unix format.
54091  path="$MSVC_DLL"
54092  new_path=`$CYGPATH -u "$path"`
54093
54094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54097  # "foo.exe" is OK but "foo" is an error.
54098  #
54099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54100  # It is also a way to make sure we got the proper file name for the real test later on.
54101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54102  if test "x$test_shortpath" = x; then
54103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54104$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54105    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54106  fi
54107
54108  # Call helper function which possibly converts this using DOS-style short mode.
54109  # If so, the updated path is stored in $new_path.
54110
54111  input_path="$new_path"
54112  # Check if we need to convert this using DOS-style short mode. If the path
54113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54114  # take no chances and rewrite it.
54115  # Note: m4 eats our [], so we need to use [ and ] instead.
54116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54117  if test "x$has_forbidden_chars" != x; then
54118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54122      # Going to short mode and back again did indeed matter. Since short mode is
54123      # case insensitive, let's make it lowercase to improve readability.
54124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54125      # Now convert it back to Unix-style (cygpath)
54126      input_path=`$CYGPATH -u "$shortmode_path"`
54127      new_path="$input_path"
54128    fi
54129  fi
54130
54131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54132  if test "x$test_cygdrive_prefix" = x; then
54133    # As a simple fix, exclude /usr/bin since it's not a real path.
54134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54136      # a path prefixed by /cygdrive for fixpath to work.
54137      new_path="$CYGWIN_ROOT_PATH$input_path"
54138    fi
54139  fi
54140
54141
54142  if test "x$path" != "x$new_path"; then
54143    MSVC_DLL="$new_path"
54144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54145$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54146  fi
54147
54148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54149
54150  path="$MSVC_DLL"
54151  has_colon=`$ECHO $path | $GREP ^.:`
54152  new_path="$path"
54153  if test "x$has_colon" = x; then
54154    # Not in mixed or Windows style, start by that.
54155    new_path=`cmd //c echo $path`
54156  fi
54157
54158
54159  input_path="$new_path"
54160  # Check if we need to convert this using DOS-style short mode. If the path
54161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54162  # take no chances and rewrite it.
54163  # Note: m4 eats our [], so we need to use [ and ] instead.
54164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54165  if test "x$has_forbidden_chars" != x; then
54166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54168  fi
54169
54170
54171  windows_path="$new_path"
54172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54173    unix_path=`$CYGPATH -u "$windows_path"`
54174    new_path="$unix_path"
54175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54177    new_path="$unix_path"
54178  fi
54179
54180  if test "x$path" != "x$new_path"; then
54181    MSVC_DLL="$new_path"
54182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54183$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54184  fi
54185
54186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54188
54189    else
54190      # We're on a unix platform. Hooray! :)
54191      path="$MSVC_DLL"
54192      has_space=`$ECHO "$path" | $GREP " "`
54193      if test "x$has_space" != x; then
54194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54195$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54197      fi
54198
54199      # Use eval to expand a potential ~
54200      eval path="$path"
54201      if test ! -f "$path" && test ! -d "$path"; then
54202        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54203      fi
54204
54205      if test -d "$path"; then
54206        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54207      else
54208        dir="`$DIRNAME "$path"`"
54209        base="`$BASENAME "$path"`"
54210        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54211      fi
54212    fi
54213  fi
54214
54215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54216$as_echo_n "checking for $DLL_NAME... " >&6; }
54217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54218$as_echo "$MSVC_DLL" >&6; }
54219    else
54220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54221$as_echo "incorrect, ignoring" >&6; }
54222      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54223$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54224    fi
54225  fi
54226
54227    fi
54228  fi
54229
54230  if test "x$MSVC_DLL" = x; then
54231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54232$as_echo_n "checking for $DLL_NAME... " >&6; }
54233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54234$as_echo "no" >&6; }
54235    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54236  fi
54237
54238    MSVCR_DLL="$MSVC_DLL"
54239  fi
54240
54241
54242
54243# Check whether --with-msvcp-dll was given.
54244if test "${with_msvcp_dll+set}" = set; then :
54245  withval=$with_msvcp_dll;
54246fi
54247
54248
54249  if test "x$MSVCP_NAME" != "x"; then
54250    if test "x$with_msvcp_dll" != x; then
54251      # If given explicitely by user, do not probe. If not present, fail directly.
54252
54253  DLL_NAME="$MSVCP_NAME"
54254  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54255  METHOD="--with-msvcp-dll"
54256  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54258$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54259
54260    # Need to check if the found msvcr is correct architecture
54261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54262$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54263    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54265      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54266      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54267      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54268        CORRECT_MSVCR_ARCH="PE32 executable"
54269      else
54270        CORRECT_MSVCR_ARCH="PE32+ executable"
54271      fi
54272    else
54273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54274        CORRECT_MSVCR_ARCH=386
54275      else
54276        CORRECT_MSVCR_ARCH=x86-64
54277      fi
54278    fi
54279    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54281$as_echo "ok" >&6; }
54282      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54283
54284  # Only process if variable expands to non-empty
54285
54286  if test "x$MSVC_DLL" != x; then
54287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54288
54289  # Input might be given as Windows format, start by converting to
54290  # unix format.
54291  path="$MSVC_DLL"
54292  new_path=`$CYGPATH -u "$path"`
54293
54294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54297  # "foo.exe" is OK but "foo" is an error.
54298  #
54299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54300  # It is also a way to make sure we got the proper file name for the real test later on.
54301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54302  if test "x$test_shortpath" = x; then
54303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54305    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54306  fi
54307
54308  # Call helper function which possibly converts this using DOS-style short mode.
54309  # If so, the updated path is stored in $new_path.
54310
54311  input_path="$new_path"
54312  # Check if we need to convert this using DOS-style short mode. If the path
54313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54314  # take no chances and rewrite it.
54315  # Note: m4 eats our [], so we need to use [ and ] instead.
54316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54317  if test "x$has_forbidden_chars" != x; then
54318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54322      # Going to short mode and back again did indeed matter. Since short mode is
54323      # case insensitive, let's make it lowercase to improve readability.
54324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54325      # Now convert it back to Unix-style (cygpath)
54326      input_path=`$CYGPATH -u "$shortmode_path"`
54327      new_path="$input_path"
54328    fi
54329  fi
54330
54331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54332  if test "x$test_cygdrive_prefix" = x; then
54333    # As a simple fix, exclude /usr/bin since it's not a real path.
54334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54336      # a path prefixed by /cygdrive for fixpath to work.
54337      new_path="$CYGWIN_ROOT_PATH$input_path"
54338    fi
54339  fi
54340
54341
54342  if test "x$path" != "x$new_path"; then
54343    MSVC_DLL="$new_path"
54344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54345$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54346  fi
54347
54348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54349
54350  path="$MSVC_DLL"
54351  has_colon=`$ECHO $path | $GREP ^.:`
54352  new_path="$path"
54353  if test "x$has_colon" = x; then
54354    # Not in mixed or Windows style, start by that.
54355    new_path=`cmd //c echo $path`
54356  fi
54357
54358
54359  input_path="$new_path"
54360  # Check if we need to convert this using DOS-style short mode. If the path
54361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54362  # take no chances and rewrite it.
54363  # Note: m4 eats our [], so we need to use [ and ] instead.
54364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54365  if test "x$has_forbidden_chars" != x; then
54366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54368  fi
54369
54370
54371  windows_path="$new_path"
54372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54373    unix_path=`$CYGPATH -u "$windows_path"`
54374    new_path="$unix_path"
54375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54377    new_path="$unix_path"
54378  fi
54379
54380  if test "x$path" != "x$new_path"; then
54381    MSVC_DLL="$new_path"
54382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54384  fi
54385
54386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54388
54389    else
54390      # We're on a unix platform. Hooray! :)
54391      path="$MSVC_DLL"
54392      has_space=`$ECHO "$path" | $GREP " "`
54393      if test "x$has_space" != x; then
54394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54397      fi
54398
54399      # Use eval to expand a potential ~
54400      eval path="$path"
54401      if test ! -f "$path" && test ! -d "$path"; then
54402        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54403      fi
54404
54405      if test -d "$path"; then
54406        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54407      else
54408        dir="`$DIRNAME "$path"`"
54409        base="`$BASENAME "$path"`"
54410        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54411      fi
54412    fi
54413  fi
54414
54415      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54416$as_echo_n "checking for $DLL_NAME... " >&6; }
54417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54418$as_echo "$MSVC_DLL" >&6; }
54419    else
54420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54421$as_echo "incorrect, ignoring" >&6; }
54422      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54423$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54424    fi
54425  fi
54426
54427      if test "x$MSVC_DLL" = x; then
54428        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54429      fi
54430      MSVCP_DLL="$MSVC_DLL"
54431    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54432
54433  DLL_NAME="$MSVCP_NAME"
54434  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54435  METHOD="devkit"
54436  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54437    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54438$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54439
54440    # Need to check if the found msvcr is correct architecture
54441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54442$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54443    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54445      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54446      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54447      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54448        CORRECT_MSVCR_ARCH="PE32 executable"
54449      else
54450        CORRECT_MSVCR_ARCH="PE32+ executable"
54451      fi
54452    else
54453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54454        CORRECT_MSVCR_ARCH=386
54455      else
54456        CORRECT_MSVCR_ARCH=x86-64
54457      fi
54458    fi
54459    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54461$as_echo "ok" >&6; }
54462      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54463
54464  # Only process if variable expands to non-empty
54465
54466  if test "x$MSVC_DLL" != x; then
54467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54468
54469  # Input might be given as Windows format, start by converting to
54470  # unix format.
54471  path="$MSVC_DLL"
54472  new_path=`$CYGPATH -u "$path"`
54473
54474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54477  # "foo.exe" is OK but "foo" is an error.
54478  #
54479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54480  # It is also a way to make sure we got the proper file name for the real test later on.
54481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54482  if test "x$test_shortpath" = x; then
54483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54484$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54485    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54486  fi
54487
54488  # Call helper function which possibly converts this using DOS-style short mode.
54489  # If so, the updated path is stored in $new_path.
54490
54491  input_path="$new_path"
54492  # Check if we need to convert this using DOS-style short mode. If the path
54493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54494  # take no chances and rewrite it.
54495  # Note: m4 eats our [], so we need to use [ and ] instead.
54496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54497  if test "x$has_forbidden_chars" != x; then
54498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54502      # Going to short mode and back again did indeed matter. Since short mode is
54503      # case insensitive, let's make it lowercase to improve readability.
54504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54505      # Now convert it back to Unix-style (cygpath)
54506      input_path=`$CYGPATH -u "$shortmode_path"`
54507      new_path="$input_path"
54508    fi
54509  fi
54510
54511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54512  if test "x$test_cygdrive_prefix" = x; then
54513    # As a simple fix, exclude /usr/bin since it's not a real path.
54514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54516      # a path prefixed by /cygdrive for fixpath to work.
54517      new_path="$CYGWIN_ROOT_PATH$input_path"
54518    fi
54519  fi
54520
54521
54522  if test "x$path" != "x$new_path"; then
54523    MSVC_DLL="$new_path"
54524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54525$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54526  fi
54527
54528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54529
54530  path="$MSVC_DLL"
54531  has_colon=`$ECHO $path | $GREP ^.:`
54532  new_path="$path"
54533  if test "x$has_colon" = x; then
54534    # Not in mixed or Windows style, start by that.
54535    new_path=`cmd //c echo $path`
54536  fi
54537
54538
54539  input_path="$new_path"
54540  # Check if we need to convert this using DOS-style short mode. If the path
54541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54542  # take no chances and rewrite it.
54543  # Note: m4 eats our [], so we need to use [ and ] instead.
54544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54545  if test "x$has_forbidden_chars" != x; then
54546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54548  fi
54549
54550
54551  windows_path="$new_path"
54552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54553    unix_path=`$CYGPATH -u "$windows_path"`
54554    new_path="$unix_path"
54555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54557    new_path="$unix_path"
54558  fi
54559
54560  if test "x$path" != "x$new_path"; then
54561    MSVC_DLL="$new_path"
54562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54564  fi
54565
54566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54568
54569    else
54570      # We're on a unix platform. Hooray! :)
54571      path="$MSVC_DLL"
54572      has_space=`$ECHO "$path" | $GREP " "`
54573      if test "x$has_space" != x; then
54574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54577      fi
54578
54579      # Use eval to expand a potential ~
54580      eval path="$path"
54581      if test ! -f "$path" && test ! -d "$path"; then
54582        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54583      fi
54584
54585      if test -d "$path"; then
54586        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54587      else
54588        dir="`$DIRNAME "$path"`"
54589        base="`$BASENAME "$path"`"
54590        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54591      fi
54592    fi
54593  fi
54594
54595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54596$as_echo_n "checking for $DLL_NAME... " >&6; }
54597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54598$as_echo "$MSVC_DLL" >&6; }
54599    else
54600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54601$as_echo "incorrect, ignoring" >&6; }
54602      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54603$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54604    fi
54605  fi
54606
54607      if test "x$MSVC_DLL" = x; then
54608        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54609      fi
54610      MSVCP_DLL="$MSVC_DLL"
54611    else
54612
54613  DLL_NAME="${MSVCP_NAME}"
54614  MSVC_DLL=
54615
54616  if test "x$MSVC_DLL" = x; then
54617    # Probe: Using well-known location from Visual Studio 10.0
54618    if test "x$VCINSTALLDIR" != x; then
54619      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54620
54621  windows_path="$CYGWIN_VC_INSTALL_DIR"
54622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54623    unix_path=`$CYGPATH -u "$windows_path"`
54624    CYGWIN_VC_INSTALL_DIR="$unix_path"
54625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54627    CYGWIN_VC_INSTALL_DIR="$unix_path"
54628  fi
54629
54630      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54631        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54632      else
54633        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54634      fi
54635      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54636
54637  DLL_NAME="$DLL_NAME"
54638  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54639  METHOD="well-known location in VCINSTALLDIR"
54640  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54641    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54642$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54643
54644    # Need to check if the found msvcr is correct architecture
54645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54646$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54647    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54649      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54650      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54651      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54652        CORRECT_MSVCR_ARCH="PE32 executable"
54653      else
54654        CORRECT_MSVCR_ARCH="PE32+ executable"
54655      fi
54656    else
54657      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54658        CORRECT_MSVCR_ARCH=386
54659      else
54660        CORRECT_MSVCR_ARCH=x86-64
54661      fi
54662    fi
54663    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54665$as_echo "ok" >&6; }
54666      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54667
54668  # Only process if variable expands to non-empty
54669
54670  if test "x$MSVC_DLL" != x; then
54671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54672
54673  # Input might be given as Windows format, start by converting to
54674  # unix format.
54675  path="$MSVC_DLL"
54676  new_path=`$CYGPATH -u "$path"`
54677
54678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54681  # "foo.exe" is OK but "foo" is an error.
54682  #
54683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54684  # It is also a way to make sure we got the proper file name for the real test later on.
54685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54686  if test "x$test_shortpath" = x; then
54687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54688$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54689    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54690  fi
54691
54692  # Call helper function which possibly converts this using DOS-style short mode.
54693  # If so, the updated path is stored in $new_path.
54694
54695  input_path="$new_path"
54696  # Check if we need to convert this using DOS-style short mode. If the path
54697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54698  # take no chances and rewrite it.
54699  # Note: m4 eats our [], so we need to use [ and ] instead.
54700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54701  if test "x$has_forbidden_chars" != x; then
54702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54706      # Going to short mode and back again did indeed matter. Since short mode is
54707      # case insensitive, let's make it lowercase to improve readability.
54708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54709      # Now convert it back to Unix-style (cygpath)
54710      input_path=`$CYGPATH -u "$shortmode_path"`
54711      new_path="$input_path"
54712    fi
54713  fi
54714
54715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54716  if test "x$test_cygdrive_prefix" = x; then
54717    # As a simple fix, exclude /usr/bin since it's not a real path.
54718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54720      # a path prefixed by /cygdrive for fixpath to work.
54721      new_path="$CYGWIN_ROOT_PATH$input_path"
54722    fi
54723  fi
54724
54725
54726  if test "x$path" != "x$new_path"; then
54727    MSVC_DLL="$new_path"
54728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54729$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54730  fi
54731
54732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54733
54734  path="$MSVC_DLL"
54735  has_colon=`$ECHO $path | $GREP ^.:`
54736  new_path="$path"
54737  if test "x$has_colon" = x; then
54738    # Not in mixed or Windows style, start by that.
54739    new_path=`cmd //c echo $path`
54740  fi
54741
54742
54743  input_path="$new_path"
54744  # Check if we need to convert this using DOS-style short mode. If the path
54745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54746  # take no chances and rewrite it.
54747  # Note: m4 eats our [], so we need to use [ and ] instead.
54748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54749  if test "x$has_forbidden_chars" != x; then
54750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54752  fi
54753
54754
54755  windows_path="$new_path"
54756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54757    unix_path=`$CYGPATH -u "$windows_path"`
54758    new_path="$unix_path"
54759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54761    new_path="$unix_path"
54762  fi
54763
54764  if test "x$path" != "x$new_path"; then
54765    MSVC_DLL="$new_path"
54766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54767$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54768  fi
54769
54770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54772
54773    else
54774      # We're on a unix platform. Hooray! :)
54775      path="$MSVC_DLL"
54776      has_space=`$ECHO "$path" | $GREP " "`
54777      if test "x$has_space" != x; then
54778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54779$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54781      fi
54782
54783      # Use eval to expand a potential ~
54784      eval path="$path"
54785      if test ! -f "$path" && test ! -d "$path"; then
54786        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54787      fi
54788
54789      if test -d "$path"; then
54790        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54791      else
54792        dir="`$DIRNAME "$path"`"
54793        base="`$BASENAME "$path"`"
54794        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54795      fi
54796    fi
54797  fi
54798
54799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54800$as_echo_n "checking for $DLL_NAME... " >&6; }
54801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54802$as_echo "$MSVC_DLL" >&6; }
54803    else
54804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54805$as_echo "incorrect, ignoring" >&6; }
54806      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54807$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54808    fi
54809  fi
54810
54811    fi
54812  fi
54813
54814  if test "x$MSVC_DLL" = x; then
54815    # Probe: Check in the Boot JDK directory.
54816    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54817
54818  DLL_NAME="$DLL_NAME"
54819  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54820  METHOD="well-known location in Boot JDK"
54821  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54823$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54824
54825    # Need to check if the found msvcr is correct architecture
54826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54827$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54828    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54830      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54831      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54833        CORRECT_MSVCR_ARCH="PE32 executable"
54834      else
54835        CORRECT_MSVCR_ARCH="PE32+ executable"
54836      fi
54837    else
54838      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54839        CORRECT_MSVCR_ARCH=386
54840      else
54841        CORRECT_MSVCR_ARCH=x86-64
54842      fi
54843    fi
54844    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54846$as_echo "ok" >&6; }
54847      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54848
54849  # Only process if variable expands to non-empty
54850
54851  if test "x$MSVC_DLL" != x; then
54852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54853
54854  # Input might be given as Windows format, start by converting to
54855  # unix format.
54856  path="$MSVC_DLL"
54857  new_path=`$CYGPATH -u "$path"`
54858
54859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54862  # "foo.exe" is OK but "foo" is an error.
54863  #
54864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54865  # It is also a way to make sure we got the proper file name for the real test later on.
54866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54867  if test "x$test_shortpath" = x; then
54868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54869$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54870    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54871  fi
54872
54873  # Call helper function which possibly converts this using DOS-style short mode.
54874  # If so, the updated path is stored in $new_path.
54875
54876  input_path="$new_path"
54877  # Check if we need to convert this using DOS-style short mode. If the path
54878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54879  # take no chances and rewrite it.
54880  # Note: m4 eats our [], so we need to use [ and ] instead.
54881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54882  if test "x$has_forbidden_chars" != x; then
54883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54887      # Going to short mode and back again did indeed matter. Since short mode is
54888      # case insensitive, let's make it lowercase to improve readability.
54889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54890      # Now convert it back to Unix-style (cygpath)
54891      input_path=`$CYGPATH -u "$shortmode_path"`
54892      new_path="$input_path"
54893    fi
54894  fi
54895
54896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54897  if test "x$test_cygdrive_prefix" = x; then
54898    # As a simple fix, exclude /usr/bin since it's not a real path.
54899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54901      # a path prefixed by /cygdrive for fixpath to work.
54902      new_path="$CYGWIN_ROOT_PATH$input_path"
54903    fi
54904  fi
54905
54906
54907  if test "x$path" != "x$new_path"; then
54908    MSVC_DLL="$new_path"
54909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54910$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54911  fi
54912
54913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54914
54915  path="$MSVC_DLL"
54916  has_colon=`$ECHO $path | $GREP ^.:`
54917  new_path="$path"
54918  if test "x$has_colon" = x; then
54919    # Not in mixed or Windows style, start by that.
54920    new_path=`cmd //c echo $path`
54921  fi
54922
54923
54924  input_path="$new_path"
54925  # Check if we need to convert this using DOS-style short mode. If the path
54926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54927  # take no chances and rewrite it.
54928  # Note: m4 eats our [], so we need to use [ and ] instead.
54929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54930  if test "x$has_forbidden_chars" != x; then
54931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54933  fi
54934
54935
54936  windows_path="$new_path"
54937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54938    unix_path=`$CYGPATH -u "$windows_path"`
54939    new_path="$unix_path"
54940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54942    new_path="$unix_path"
54943  fi
54944
54945  if test "x$path" != "x$new_path"; then
54946    MSVC_DLL="$new_path"
54947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54949  fi
54950
54951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54953
54954    else
54955      # We're on a unix platform. Hooray! :)
54956      path="$MSVC_DLL"
54957      has_space=`$ECHO "$path" | $GREP " "`
54958      if test "x$has_space" != x; then
54959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54960$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54962      fi
54963
54964      # Use eval to expand a potential ~
54965      eval path="$path"
54966      if test ! -f "$path" && test ! -d "$path"; then
54967        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54968      fi
54969
54970      if test -d "$path"; then
54971        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54972      else
54973        dir="`$DIRNAME "$path"`"
54974        base="`$BASENAME "$path"`"
54975        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54976      fi
54977    fi
54978  fi
54979
54980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54981$as_echo_n "checking for $DLL_NAME... " >&6; }
54982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54983$as_echo "$MSVC_DLL" >&6; }
54984    else
54985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54986$as_echo "incorrect, ignoring" >&6; }
54987      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54988$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54989    fi
54990  fi
54991
54992  fi
54993
54994  if test "x$MSVC_DLL" = x; then
54995    # Probe: Look in the Windows system32 directory
54996    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54997
54998  windows_path="$CYGWIN_SYSTEMROOT"
54999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55000    unix_path=`$CYGPATH -u "$windows_path"`
55001    CYGWIN_SYSTEMROOT="$unix_path"
55002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55004    CYGWIN_SYSTEMROOT="$unix_path"
55005  fi
55006
55007    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55008
55009  DLL_NAME="$DLL_NAME"
55010  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55011  METHOD="well-known location in SYSTEMROOT"
55012  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55013    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55014$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55015
55016    # Need to check if the found msvcr is correct architecture
55017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55018$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55019    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55021      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55022      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55023      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55024        CORRECT_MSVCR_ARCH="PE32 executable"
55025      else
55026        CORRECT_MSVCR_ARCH="PE32+ executable"
55027      fi
55028    else
55029      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55030        CORRECT_MSVCR_ARCH=386
55031      else
55032        CORRECT_MSVCR_ARCH=x86-64
55033      fi
55034    fi
55035    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55037$as_echo "ok" >&6; }
55038      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55039
55040  # Only process if variable expands to non-empty
55041
55042  if test "x$MSVC_DLL" != x; then
55043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55044
55045  # Input might be given as Windows format, start by converting to
55046  # unix format.
55047  path="$MSVC_DLL"
55048  new_path=`$CYGPATH -u "$path"`
55049
55050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55053  # "foo.exe" is OK but "foo" is an error.
55054  #
55055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55056  # It is also a way to make sure we got the proper file name for the real test later on.
55057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55058  if test "x$test_shortpath" = x; then
55059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55060$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55061    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55062  fi
55063
55064  # Call helper function which possibly converts this using DOS-style short mode.
55065  # If so, the updated path is stored in $new_path.
55066
55067  input_path="$new_path"
55068  # Check if we need to convert this using DOS-style short mode. If the path
55069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55070  # take no chances and rewrite it.
55071  # Note: m4 eats our [], so we need to use [ and ] instead.
55072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55073  if test "x$has_forbidden_chars" != x; then
55074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55078      # Going to short mode and back again did indeed matter. Since short mode is
55079      # case insensitive, let's make it lowercase to improve readability.
55080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55081      # Now convert it back to Unix-style (cygpath)
55082      input_path=`$CYGPATH -u "$shortmode_path"`
55083      new_path="$input_path"
55084    fi
55085  fi
55086
55087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55088  if test "x$test_cygdrive_prefix" = x; then
55089    # As a simple fix, exclude /usr/bin since it's not a real path.
55090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55092      # a path prefixed by /cygdrive for fixpath to work.
55093      new_path="$CYGWIN_ROOT_PATH$input_path"
55094    fi
55095  fi
55096
55097
55098  if test "x$path" != "x$new_path"; then
55099    MSVC_DLL="$new_path"
55100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55101$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55102  fi
55103
55104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55105
55106  path="$MSVC_DLL"
55107  has_colon=`$ECHO $path | $GREP ^.:`
55108  new_path="$path"
55109  if test "x$has_colon" = x; then
55110    # Not in mixed or Windows style, start by that.
55111    new_path=`cmd //c echo $path`
55112  fi
55113
55114
55115  input_path="$new_path"
55116  # Check if we need to convert this using DOS-style short mode. If the path
55117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55118  # take no chances and rewrite it.
55119  # Note: m4 eats our [], so we need to use [ and ] instead.
55120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55121  if test "x$has_forbidden_chars" != x; then
55122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55124  fi
55125
55126
55127  windows_path="$new_path"
55128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55129    unix_path=`$CYGPATH -u "$windows_path"`
55130    new_path="$unix_path"
55131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55133    new_path="$unix_path"
55134  fi
55135
55136  if test "x$path" != "x$new_path"; then
55137    MSVC_DLL="$new_path"
55138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55139$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55140  fi
55141
55142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55144
55145    else
55146      # We're on a unix platform. Hooray! :)
55147      path="$MSVC_DLL"
55148      has_space=`$ECHO "$path" | $GREP " "`
55149      if test "x$has_space" != x; then
55150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55151$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55153      fi
55154
55155      # Use eval to expand a potential ~
55156      eval path="$path"
55157      if test ! -f "$path" && test ! -d "$path"; then
55158        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55159      fi
55160
55161      if test -d "$path"; then
55162        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55163      else
55164        dir="`$DIRNAME "$path"`"
55165        base="`$BASENAME "$path"`"
55166        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55167      fi
55168    fi
55169  fi
55170
55171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55172$as_echo_n "checking for $DLL_NAME... " >&6; }
55173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55174$as_echo "$MSVC_DLL" >&6; }
55175    else
55176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55177$as_echo "incorrect, ignoring" >&6; }
55178      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55179$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55180    fi
55181  fi
55182
55183  fi
55184
55185  if test "x$MSVC_DLL" = x; then
55186    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55187    if test "x$VS100COMNTOOLS" != x; then
55188      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55189
55190  windows_path="$CYGWIN_VS_TOOLS_DIR"
55191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55192    unix_path=`$CYGPATH -u "$windows_path"`
55193    CYGWIN_VS_TOOLS_DIR="$unix_path"
55194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55196    CYGWIN_VS_TOOLS_DIR="$unix_path"
55197  fi
55198
55199      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55200        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55201	    | $GREP -i /x64/ | $HEAD --lines 1`
55202      else
55203        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55204	    | $GREP -i /x86/ | $HEAD --lines 1`
55205      fi
55206
55207  DLL_NAME="$DLL_NAME"
55208  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55209  METHOD="search of VS100COMNTOOLS"
55210  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55211    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55212$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55213
55214    # Need to check if the found msvcr is correct architecture
55215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55216$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55217    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55219      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55220      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55221      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55222        CORRECT_MSVCR_ARCH="PE32 executable"
55223      else
55224        CORRECT_MSVCR_ARCH="PE32+ executable"
55225      fi
55226    else
55227      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55228        CORRECT_MSVCR_ARCH=386
55229      else
55230        CORRECT_MSVCR_ARCH=x86-64
55231      fi
55232    fi
55233    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55235$as_echo "ok" >&6; }
55236      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55237
55238  # Only process if variable expands to non-empty
55239
55240  if test "x$MSVC_DLL" != x; then
55241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55242
55243  # Input might be given as Windows format, start by converting to
55244  # unix format.
55245  path="$MSVC_DLL"
55246  new_path=`$CYGPATH -u "$path"`
55247
55248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55251  # "foo.exe" is OK but "foo" is an error.
55252  #
55253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55254  # It is also a way to make sure we got the proper file name for the real test later on.
55255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55256  if test "x$test_shortpath" = x; then
55257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55258$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55259    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55260  fi
55261
55262  # Call helper function which possibly converts this using DOS-style short mode.
55263  # If so, the updated path is stored in $new_path.
55264
55265  input_path="$new_path"
55266  # Check if we need to convert this using DOS-style short mode. If the path
55267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55268  # take no chances and rewrite it.
55269  # Note: m4 eats our [], so we need to use [ and ] instead.
55270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55271  if test "x$has_forbidden_chars" != x; then
55272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55276      # Going to short mode and back again did indeed matter. Since short mode is
55277      # case insensitive, let's make it lowercase to improve readability.
55278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55279      # Now convert it back to Unix-style (cygpath)
55280      input_path=`$CYGPATH -u "$shortmode_path"`
55281      new_path="$input_path"
55282    fi
55283  fi
55284
55285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55286  if test "x$test_cygdrive_prefix" = x; then
55287    # As a simple fix, exclude /usr/bin since it's not a real path.
55288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55290      # a path prefixed by /cygdrive for fixpath to work.
55291      new_path="$CYGWIN_ROOT_PATH$input_path"
55292    fi
55293  fi
55294
55295
55296  if test "x$path" != "x$new_path"; then
55297    MSVC_DLL="$new_path"
55298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55299$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55300  fi
55301
55302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55303
55304  path="$MSVC_DLL"
55305  has_colon=`$ECHO $path | $GREP ^.:`
55306  new_path="$path"
55307  if test "x$has_colon" = x; then
55308    # Not in mixed or Windows style, start by that.
55309    new_path=`cmd //c echo $path`
55310  fi
55311
55312
55313  input_path="$new_path"
55314  # Check if we need to convert this using DOS-style short mode. If the path
55315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55316  # take no chances and rewrite it.
55317  # Note: m4 eats our [], so we need to use [ and ] instead.
55318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55319  if test "x$has_forbidden_chars" != x; then
55320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55322  fi
55323
55324
55325  windows_path="$new_path"
55326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55327    unix_path=`$CYGPATH -u "$windows_path"`
55328    new_path="$unix_path"
55329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55331    new_path="$unix_path"
55332  fi
55333
55334  if test "x$path" != "x$new_path"; then
55335    MSVC_DLL="$new_path"
55336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55337$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55338  fi
55339
55340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55342
55343    else
55344      # We're on a unix platform. Hooray! :)
55345      path="$MSVC_DLL"
55346      has_space=`$ECHO "$path" | $GREP " "`
55347      if test "x$has_space" != x; then
55348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55349$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55351      fi
55352
55353      # Use eval to expand a potential ~
55354      eval path="$path"
55355      if test ! -f "$path" && test ! -d "$path"; then
55356        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55357      fi
55358
55359      if test -d "$path"; then
55360        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55361      else
55362        dir="`$DIRNAME "$path"`"
55363        base="`$BASENAME "$path"`"
55364        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55365      fi
55366    fi
55367  fi
55368
55369      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55370$as_echo_n "checking for $DLL_NAME... " >&6; }
55371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55372$as_echo "$MSVC_DLL" >&6; }
55373    else
55374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55375$as_echo "incorrect, ignoring" >&6; }
55376      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55377$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55378    fi
55379  fi
55380
55381    fi
55382  fi
55383
55384  if test "x$MSVC_DLL" = x; then
55385    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55386    # (This was the original behaviour; kept since it might turn something up)
55387    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55388      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55389        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55390	    | $GREP x64 | $HEAD --lines 1`
55391      else
55392        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55393	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55394        if test "x$POSSIBLE_MSVC_DLL" = x; then
55395          # We're grasping at straws now...
55396          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55397	      | $HEAD --lines 1`
55398        fi
55399      fi
55400
55401
55402  DLL_NAME="$DLL_NAME"
55403  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55404  METHOD="search of VCINSTALLDIR"
55405  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55407$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55408
55409    # Need to check if the found msvcr is correct architecture
55410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55411$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55412    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55414      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55415      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55416      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55417        CORRECT_MSVCR_ARCH="PE32 executable"
55418      else
55419        CORRECT_MSVCR_ARCH="PE32+ executable"
55420      fi
55421    else
55422      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55423        CORRECT_MSVCR_ARCH=386
55424      else
55425        CORRECT_MSVCR_ARCH=x86-64
55426      fi
55427    fi
55428    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55430$as_echo "ok" >&6; }
55431      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55432
55433  # Only process if variable expands to non-empty
55434
55435  if test "x$MSVC_DLL" != x; then
55436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55437
55438  # Input might be given as Windows format, start by converting to
55439  # unix format.
55440  path="$MSVC_DLL"
55441  new_path=`$CYGPATH -u "$path"`
55442
55443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55446  # "foo.exe" is OK but "foo" is an error.
55447  #
55448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55449  # It is also a way to make sure we got the proper file name for the real test later on.
55450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55451  if test "x$test_shortpath" = x; then
55452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55453$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55454    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55455  fi
55456
55457  # Call helper function which possibly converts this using DOS-style short mode.
55458  # If so, the updated path is stored in $new_path.
55459
55460  input_path="$new_path"
55461  # Check if we need to convert this using DOS-style short mode. If the path
55462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55463  # take no chances and rewrite it.
55464  # Note: m4 eats our [], so we need to use [ and ] instead.
55465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55466  if test "x$has_forbidden_chars" != x; then
55467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55471      # Going to short mode and back again did indeed matter. Since short mode is
55472      # case insensitive, let's make it lowercase to improve readability.
55473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55474      # Now convert it back to Unix-style (cygpath)
55475      input_path=`$CYGPATH -u "$shortmode_path"`
55476      new_path="$input_path"
55477    fi
55478  fi
55479
55480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55481  if test "x$test_cygdrive_prefix" = x; then
55482    # As a simple fix, exclude /usr/bin since it's not a real path.
55483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55485      # a path prefixed by /cygdrive for fixpath to work.
55486      new_path="$CYGWIN_ROOT_PATH$input_path"
55487    fi
55488  fi
55489
55490
55491  if test "x$path" != "x$new_path"; then
55492    MSVC_DLL="$new_path"
55493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55494$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55495  fi
55496
55497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55498
55499  path="$MSVC_DLL"
55500  has_colon=`$ECHO $path | $GREP ^.:`
55501  new_path="$path"
55502  if test "x$has_colon" = x; then
55503    # Not in mixed or Windows style, start by that.
55504    new_path=`cmd //c echo $path`
55505  fi
55506
55507
55508  input_path="$new_path"
55509  # Check if we need to convert this using DOS-style short mode. If the path
55510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55511  # take no chances and rewrite it.
55512  # Note: m4 eats our [], so we need to use [ and ] instead.
55513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55514  if test "x$has_forbidden_chars" != x; then
55515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55517  fi
55518
55519
55520  windows_path="$new_path"
55521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55522    unix_path=`$CYGPATH -u "$windows_path"`
55523    new_path="$unix_path"
55524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55526    new_path="$unix_path"
55527  fi
55528
55529  if test "x$path" != "x$new_path"; then
55530    MSVC_DLL="$new_path"
55531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55533  fi
55534
55535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55537
55538    else
55539      # We're on a unix platform. Hooray! :)
55540      path="$MSVC_DLL"
55541      has_space=`$ECHO "$path" | $GREP " "`
55542      if test "x$has_space" != x; then
55543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55546      fi
55547
55548      # Use eval to expand a potential ~
55549      eval path="$path"
55550      if test ! -f "$path" && test ! -d "$path"; then
55551        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55552      fi
55553
55554      if test -d "$path"; then
55555        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55556      else
55557        dir="`$DIRNAME "$path"`"
55558        base="`$BASENAME "$path"`"
55559        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55560      fi
55561    fi
55562  fi
55563
55564      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55565$as_echo_n "checking for $DLL_NAME... " >&6; }
55566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55567$as_echo "$MSVC_DLL" >&6; }
55568    else
55569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55570$as_echo "incorrect, ignoring" >&6; }
55571      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55572$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55573    fi
55574  fi
55575
55576    fi
55577  fi
55578
55579  if test "x$MSVC_DLL" = x; then
55580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55581$as_echo_n "checking for $DLL_NAME... " >&6; }
55582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55583$as_echo "no" >&6; }
55584    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55585  fi
55586
55587      MSVCP_DLL="$MSVC_DLL"
55588    fi
55589
55590  fi
55591
55592  fi
55593
55594
55595  if test "x$NEEDS_LIB_X11" = xfalse; then
55596    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55597      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55598$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55599    fi
55600    X_CFLAGS=
55601    X_LIBS=
55602  else
55603
55604    if test "x${with_x}" = xno; then
55605      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55606    fi
55607
55608    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55609      # The user has specified a X11 base directory. Use it for includes and
55610      # libraries, unless explicitely overridden.
55611      if test "x$x_includes" = xNONE; then
55612        x_includes="${with_x}/include"
55613      fi
55614      if test "x$x_libraries" = xNONE; then
55615        x_libraries="${with_x}/lib"
55616      fi
55617    else
55618      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55619      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55620      # --x-libraries for the sysroot, if that seems to be correct.
55621      if test "x$SYSROOT" != "x"; then
55622        if test "x$x_includes" = xNONE; then
55623          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55624            x_includes="$SYSROOT/usr/X11R6/include"
55625          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55626            x_includes="$SYSROOT/usr/include"
55627          fi
55628        fi
55629        if test "x$x_libraries" = xNONE; then
55630          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55631            x_libraries="$SYSROOT/usr/X11R6/lib"
55632          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55633            x_libraries="$SYSROOT/usr/lib64"
55634          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55635            x_libraries="$SYSROOT/usr/lib"
55636          fi
55637        fi
55638      fi
55639    fi
55640
55641    # Now let autoconf do it's magic
55642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55643$as_echo_n "checking for X... " >&6; }
55644
55645
55646# Check whether --with-x was given.
55647if test "${with_x+set}" = set; then :
55648  withval=$with_x;
55649fi
55650
55651# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55652if test "x$with_x" = xno; then
55653  # The user explicitly disabled X.
55654  have_x=disabled
55655else
55656  case $x_includes,$x_libraries in #(
55657    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55658    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55659  $as_echo_n "(cached) " >&6
55660else
55661  # One or both of the vars are not set, and there is no cached value.
55662ac_x_includes=no ac_x_libraries=no
55663rm -f -r conftest.dir
55664if mkdir conftest.dir; then
55665  cd conftest.dir
55666  cat >Imakefile <<'_ACEOF'
55667incroot:
55668	@echo incroot='${INCROOT}'
55669usrlibdir:
55670	@echo usrlibdir='${USRLIBDIR}'
55671libdir:
55672	@echo libdir='${LIBDIR}'
55673_ACEOF
55674  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55675    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55676    for ac_var in incroot usrlibdir libdir; do
55677      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55678    done
55679    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55680    for ac_extension in a so sl dylib la dll; do
55681      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55682	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55683	ac_im_usrlibdir=$ac_im_libdir; break
55684      fi
55685    done
55686    # Screen out bogus values from the imake configuration.  They are
55687    # bogus both because they are the default anyway, and because
55688    # using them would break gcc on systems where it needs fixed includes.
55689    case $ac_im_incroot in
55690	/usr/include) ac_x_includes= ;;
55691	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55692    esac
55693    case $ac_im_usrlibdir in
55694	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55695	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55696    esac
55697  fi
55698  cd ..
55699  rm -f -r conftest.dir
55700fi
55701
55702# Standard set of common directories for X headers.
55703# Check X11 before X11Rn because it is often a symlink to the current release.
55704ac_x_header_dirs='
55705/usr/X11/include
55706/usr/X11R7/include
55707/usr/X11R6/include
55708/usr/X11R5/include
55709/usr/X11R4/include
55710
55711/usr/include/X11
55712/usr/include/X11R7
55713/usr/include/X11R6
55714/usr/include/X11R5
55715/usr/include/X11R4
55716
55717/usr/local/X11/include
55718/usr/local/X11R7/include
55719/usr/local/X11R6/include
55720/usr/local/X11R5/include
55721/usr/local/X11R4/include
55722
55723/usr/local/include/X11
55724/usr/local/include/X11R7
55725/usr/local/include/X11R6
55726/usr/local/include/X11R5
55727/usr/local/include/X11R4
55728
55729/usr/X386/include
55730/usr/x386/include
55731/usr/XFree86/include/X11
55732
55733/usr/include
55734/usr/local/include
55735/usr/unsupported/include
55736/usr/athena/include
55737/usr/local/x11r5/include
55738/usr/lpp/Xamples/include
55739
55740/usr/openwin/include
55741/usr/openwin/share/include'
55742
55743if test "$ac_x_includes" = no; then
55744  # Guess where to find include files, by looking for Xlib.h.
55745  # First, try using that file with no special directory specified.
55746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55747/* end confdefs.h.  */
55748#include <X11/Xlib.h>
55749_ACEOF
55750if ac_fn_cxx_try_cpp "$LINENO"; then :
55751  # We can compile using X headers with no special include directory.
55752ac_x_includes=
55753else
55754  for ac_dir in $ac_x_header_dirs; do
55755  if test -r "$ac_dir/X11/Xlib.h"; then
55756    ac_x_includes=$ac_dir
55757    break
55758  fi
55759done
55760fi
55761rm -f conftest.err conftest.i conftest.$ac_ext
55762fi # $ac_x_includes = no
55763
55764if test "$ac_x_libraries" = no; then
55765  # Check for the libraries.
55766  # See if we find them without any special options.
55767  # Don't add to $LIBS permanently.
55768  ac_save_LIBS=$LIBS
55769  LIBS="-lX11 $LIBS"
55770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55771/* end confdefs.h.  */
55772#include <X11/Xlib.h>
55773int
55774main ()
55775{
55776XrmInitialize ()
55777  ;
55778  return 0;
55779}
55780_ACEOF
55781if ac_fn_cxx_try_link "$LINENO"; then :
55782  LIBS=$ac_save_LIBS
55783# We can link X programs with no special library path.
55784ac_x_libraries=
55785else
55786  LIBS=$ac_save_LIBS
55787for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55788do
55789  # Don't even attempt the hair of trying to link an X program!
55790  for ac_extension in a so sl dylib la dll; do
55791    if test -r "$ac_dir/libX11.$ac_extension"; then
55792      ac_x_libraries=$ac_dir
55793      break 2
55794    fi
55795  done
55796done
55797fi
55798rm -f core conftest.err conftest.$ac_objext \
55799    conftest$ac_exeext conftest.$ac_ext
55800fi # $ac_x_libraries = no
55801
55802case $ac_x_includes,$ac_x_libraries in #(
55803  no,* | *,no | *\'*)
55804    # Didn't find X, or a directory has "'" in its name.
55805    ac_cv_have_x="have_x=no";; #(
55806  *)
55807    # Record where we found X for the cache.
55808    ac_cv_have_x="have_x=yes\
55809	ac_x_includes='$ac_x_includes'\
55810	ac_x_libraries='$ac_x_libraries'"
55811esac
55812fi
55813;; #(
55814    *) have_x=yes;;
55815  esac
55816  eval "$ac_cv_have_x"
55817fi # $with_x != no
55818
55819if test "$have_x" != yes; then
55820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55821$as_echo "$have_x" >&6; }
55822  no_x=yes
55823else
55824  # If each of the values was on the command line, it overrides each guess.
55825  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55826  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55827  # Update the cache value to reflect the command line values.
55828  ac_cv_have_x="have_x=yes\
55829	ac_x_includes='$x_includes'\
55830	ac_x_libraries='$x_libraries'"
55831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55832$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55833fi
55834
55835    if test "$no_x" = yes; then
55836  # Not all programs may use this symbol, but it does not hurt to define it.
55837
55838$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55839
55840  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55841else
55842  if test -n "$x_includes"; then
55843    X_CFLAGS="$X_CFLAGS -I$x_includes"
55844  fi
55845
55846  # It would also be nice to do this for all -L options, not just this one.
55847  if test -n "$x_libraries"; then
55848    X_LIBS="$X_LIBS -L$x_libraries"
55849    # For Solaris; some versions of Sun CC require a space after -R and
55850    # others require no space.  Words are not sufficient . . . .
55851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55852$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55853    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55854    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55855    ac_cxx_werror_flag=yes
55856    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55857/* end confdefs.h.  */
55858
55859int
55860main ()
55861{
55862
55863  ;
55864  return 0;
55865}
55866_ACEOF
55867if ac_fn_cxx_try_link "$LINENO"; then :
55868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55869$as_echo "no" >&6; }
55870       X_LIBS="$X_LIBS -R$x_libraries"
55871else
55872  LIBS="$ac_xsave_LIBS -R $x_libraries"
55873       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55874/* end confdefs.h.  */
55875
55876int
55877main ()
55878{
55879
55880  ;
55881  return 0;
55882}
55883_ACEOF
55884if ac_fn_cxx_try_link "$LINENO"; then :
55885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55886$as_echo "yes" >&6; }
55887	  X_LIBS="$X_LIBS -R $x_libraries"
55888else
55889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55890$as_echo "neither works" >&6; }
55891fi
55892rm -f core conftest.err conftest.$ac_objext \
55893    conftest$ac_exeext conftest.$ac_ext
55894fi
55895rm -f core conftest.err conftest.$ac_objext \
55896    conftest$ac_exeext conftest.$ac_ext
55897    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55898    LIBS=$ac_xsave_LIBS
55899  fi
55900
55901  # Check for system-dependent libraries X programs must link with.
55902  # Do this before checking for the system-independent R6 libraries
55903  # (-lICE), since we may need -lsocket or whatever for X linking.
55904
55905  if test "$ISC" = yes; then
55906    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55907  else
55908    # Martyn Johnson says this is needed for Ultrix, if the X
55909    # libraries were built with DECnet support.  And Karl Berry says
55910    # the Alpha needs dnet_stub (dnet does not exist).
55911    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55912    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55913/* end confdefs.h.  */
55914
55915/* Override any GCC internal prototype to avoid an error.
55916   Use char because int might match the return type of a GCC
55917   builtin and then its argument prototype would still apply.  */
55918#ifdef __cplusplus
55919extern "C"
55920#endif
55921char XOpenDisplay ();
55922int
55923main ()
55924{
55925return XOpenDisplay ();
55926  ;
55927  return 0;
55928}
55929_ACEOF
55930if ac_fn_cxx_try_link "$LINENO"; then :
55931
55932else
55933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55934$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55935if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55936  $as_echo_n "(cached) " >&6
55937else
55938  ac_check_lib_save_LIBS=$LIBS
55939LIBS="-ldnet  $LIBS"
55940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55941/* end confdefs.h.  */
55942
55943/* Override any GCC internal prototype to avoid an error.
55944   Use char because int might match the return type of a GCC
55945   builtin and then its argument prototype would still apply.  */
55946#ifdef __cplusplus
55947extern "C"
55948#endif
55949char dnet_ntoa ();
55950int
55951main ()
55952{
55953return dnet_ntoa ();
55954  ;
55955  return 0;
55956}
55957_ACEOF
55958if ac_fn_cxx_try_link "$LINENO"; then :
55959  ac_cv_lib_dnet_dnet_ntoa=yes
55960else
55961  ac_cv_lib_dnet_dnet_ntoa=no
55962fi
55963rm -f core conftest.err conftest.$ac_objext \
55964    conftest$ac_exeext conftest.$ac_ext
55965LIBS=$ac_check_lib_save_LIBS
55966fi
55967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55968$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55969if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55970  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55971fi
55972
55973    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55975$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55976if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55977  $as_echo_n "(cached) " >&6
55978else
55979  ac_check_lib_save_LIBS=$LIBS
55980LIBS="-ldnet_stub  $LIBS"
55981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55982/* end confdefs.h.  */
55983
55984/* Override any GCC internal prototype to avoid an error.
55985   Use char because int might match the return type of a GCC
55986   builtin and then its argument prototype would still apply.  */
55987#ifdef __cplusplus
55988extern "C"
55989#endif
55990char dnet_ntoa ();
55991int
55992main ()
55993{
55994return dnet_ntoa ();
55995  ;
55996  return 0;
55997}
55998_ACEOF
55999if ac_fn_cxx_try_link "$LINENO"; then :
56000  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56001else
56002  ac_cv_lib_dnet_stub_dnet_ntoa=no
56003fi
56004rm -f core conftest.err conftest.$ac_objext \
56005    conftest$ac_exeext conftest.$ac_ext
56006LIBS=$ac_check_lib_save_LIBS
56007fi
56008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56009$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56010if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56011  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56012fi
56013
56014    fi
56015fi
56016rm -f core conftest.err conftest.$ac_objext \
56017    conftest$ac_exeext conftest.$ac_ext
56018    LIBS="$ac_xsave_LIBS"
56019
56020    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56021    # to get the SysV transport functions.
56022    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56023    # needs -lnsl.
56024    # The nsl library prevents programs from opening the X display
56025    # on Irix 5.2, according to T.E. Dickey.
56026    # The functions gethostbyname, getservbyname, and inet_addr are
56027    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56028    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56029if test "x$ac_cv_func_gethostbyname" = xyes; then :
56030
56031fi
56032
56033    if test $ac_cv_func_gethostbyname = no; then
56034      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56035$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56036if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56037  $as_echo_n "(cached) " >&6
56038else
56039  ac_check_lib_save_LIBS=$LIBS
56040LIBS="-lnsl  $LIBS"
56041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56042/* end confdefs.h.  */
56043
56044/* Override any GCC internal prototype to avoid an error.
56045   Use char because int might match the return type of a GCC
56046   builtin and then its argument prototype would still apply.  */
56047#ifdef __cplusplus
56048extern "C"
56049#endif
56050char gethostbyname ();
56051int
56052main ()
56053{
56054return gethostbyname ();
56055  ;
56056  return 0;
56057}
56058_ACEOF
56059if ac_fn_cxx_try_link "$LINENO"; then :
56060  ac_cv_lib_nsl_gethostbyname=yes
56061else
56062  ac_cv_lib_nsl_gethostbyname=no
56063fi
56064rm -f core conftest.err conftest.$ac_objext \
56065    conftest$ac_exeext conftest.$ac_ext
56066LIBS=$ac_check_lib_save_LIBS
56067fi
56068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56069$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56070if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56071  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56072fi
56073
56074      if test $ac_cv_lib_nsl_gethostbyname = no; then
56075	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56076$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56077if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56078  $as_echo_n "(cached) " >&6
56079else
56080  ac_check_lib_save_LIBS=$LIBS
56081LIBS="-lbsd  $LIBS"
56082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56083/* end confdefs.h.  */
56084
56085/* Override any GCC internal prototype to avoid an error.
56086   Use char because int might match the return type of a GCC
56087   builtin and then its argument prototype would still apply.  */
56088#ifdef __cplusplus
56089extern "C"
56090#endif
56091char gethostbyname ();
56092int
56093main ()
56094{
56095return gethostbyname ();
56096  ;
56097  return 0;
56098}
56099_ACEOF
56100if ac_fn_cxx_try_link "$LINENO"; then :
56101  ac_cv_lib_bsd_gethostbyname=yes
56102else
56103  ac_cv_lib_bsd_gethostbyname=no
56104fi
56105rm -f core conftest.err conftest.$ac_objext \
56106    conftest$ac_exeext conftest.$ac_ext
56107LIBS=$ac_check_lib_save_LIBS
56108fi
56109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56110$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56111if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56112  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56113fi
56114
56115      fi
56116    fi
56117
56118    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56119    # socket/setsockopt and other routines are undefined under SCO ODT
56120    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56121    # on later versions), says Simon Leinen: it contains gethostby*
56122    # variants that don't use the name server (or something).  -lsocket
56123    # must be given before -lnsl if both are needed.  We assume that
56124    # if connect needs -lnsl, so does gethostbyname.
56125    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56126if test "x$ac_cv_func_connect" = xyes; then :
56127
56128fi
56129
56130    if test $ac_cv_func_connect = no; then
56131      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56132$as_echo_n "checking for connect in -lsocket... " >&6; }
56133if ${ac_cv_lib_socket_connect+:} false; then :
56134  $as_echo_n "(cached) " >&6
56135else
56136  ac_check_lib_save_LIBS=$LIBS
56137LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56139/* end confdefs.h.  */
56140
56141/* Override any GCC internal prototype to avoid an error.
56142   Use char because int might match the return type of a GCC
56143   builtin and then its argument prototype would still apply.  */
56144#ifdef __cplusplus
56145extern "C"
56146#endif
56147char connect ();
56148int
56149main ()
56150{
56151return connect ();
56152  ;
56153  return 0;
56154}
56155_ACEOF
56156if ac_fn_cxx_try_link "$LINENO"; then :
56157  ac_cv_lib_socket_connect=yes
56158else
56159  ac_cv_lib_socket_connect=no
56160fi
56161rm -f core conftest.err conftest.$ac_objext \
56162    conftest$ac_exeext conftest.$ac_ext
56163LIBS=$ac_check_lib_save_LIBS
56164fi
56165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56166$as_echo "$ac_cv_lib_socket_connect" >&6; }
56167if test "x$ac_cv_lib_socket_connect" = xyes; then :
56168  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56169fi
56170
56171    fi
56172
56173    # Guillermo Gomez says -lposix is necessary on A/UX.
56174    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56175if test "x$ac_cv_func_remove" = xyes; then :
56176
56177fi
56178
56179    if test $ac_cv_func_remove = no; then
56180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56181$as_echo_n "checking for remove in -lposix... " >&6; }
56182if ${ac_cv_lib_posix_remove+:} false; then :
56183  $as_echo_n "(cached) " >&6
56184else
56185  ac_check_lib_save_LIBS=$LIBS
56186LIBS="-lposix  $LIBS"
56187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56188/* end confdefs.h.  */
56189
56190/* Override any GCC internal prototype to avoid an error.
56191   Use char because int might match the return type of a GCC
56192   builtin and then its argument prototype would still apply.  */
56193#ifdef __cplusplus
56194extern "C"
56195#endif
56196char remove ();
56197int
56198main ()
56199{
56200return remove ();
56201  ;
56202  return 0;
56203}
56204_ACEOF
56205if ac_fn_cxx_try_link "$LINENO"; then :
56206  ac_cv_lib_posix_remove=yes
56207else
56208  ac_cv_lib_posix_remove=no
56209fi
56210rm -f core conftest.err conftest.$ac_objext \
56211    conftest$ac_exeext conftest.$ac_ext
56212LIBS=$ac_check_lib_save_LIBS
56213fi
56214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56215$as_echo "$ac_cv_lib_posix_remove" >&6; }
56216if test "x$ac_cv_lib_posix_remove" = xyes; then :
56217  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56218fi
56219
56220    fi
56221
56222    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56223    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56224if test "x$ac_cv_func_shmat" = xyes; then :
56225
56226fi
56227
56228    if test $ac_cv_func_shmat = no; then
56229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56230$as_echo_n "checking for shmat in -lipc... " >&6; }
56231if ${ac_cv_lib_ipc_shmat+:} false; then :
56232  $as_echo_n "(cached) " >&6
56233else
56234  ac_check_lib_save_LIBS=$LIBS
56235LIBS="-lipc  $LIBS"
56236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56237/* end confdefs.h.  */
56238
56239/* Override any GCC internal prototype to avoid an error.
56240   Use char because int might match the return type of a GCC
56241   builtin and then its argument prototype would still apply.  */
56242#ifdef __cplusplus
56243extern "C"
56244#endif
56245char shmat ();
56246int
56247main ()
56248{
56249return shmat ();
56250  ;
56251  return 0;
56252}
56253_ACEOF
56254if ac_fn_cxx_try_link "$LINENO"; then :
56255  ac_cv_lib_ipc_shmat=yes
56256else
56257  ac_cv_lib_ipc_shmat=no
56258fi
56259rm -f core conftest.err conftest.$ac_objext \
56260    conftest$ac_exeext conftest.$ac_ext
56261LIBS=$ac_check_lib_save_LIBS
56262fi
56263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56264$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56265if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56266  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56267fi
56268
56269    fi
56270  fi
56271
56272  # Check for libraries that X11R6 Xt/Xaw programs need.
56273  ac_save_LDFLAGS=$LDFLAGS
56274  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56275  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56276  # check for ICE first), but we must link in the order -lSM -lICE or
56277  # we get undefined symbols.  So assume we have SM if we have ICE.
56278  # These have to be linked with before -lX11, unlike the other
56279  # libraries we check for below, so use a different variable.
56280  # John Interrante, Karl Berry
56281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56282$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56283if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56284  $as_echo_n "(cached) " >&6
56285else
56286  ac_check_lib_save_LIBS=$LIBS
56287LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56289/* end confdefs.h.  */
56290
56291/* Override any GCC internal prototype to avoid an error.
56292   Use char because int might match the return type of a GCC
56293   builtin and then its argument prototype would still apply.  */
56294#ifdef __cplusplus
56295extern "C"
56296#endif
56297char IceConnectionNumber ();
56298int
56299main ()
56300{
56301return IceConnectionNumber ();
56302  ;
56303  return 0;
56304}
56305_ACEOF
56306if ac_fn_cxx_try_link "$LINENO"; then :
56307  ac_cv_lib_ICE_IceConnectionNumber=yes
56308else
56309  ac_cv_lib_ICE_IceConnectionNumber=no
56310fi
56311rm -f core conftest.err conftest.$ac_objext \
56312    conftest$ac_exeext conftest.$ac_ext
56313LIBS=$ac_check_lib_save_LIBS
56314fi
56315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56316$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56317if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56318  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56319fi
56320
56321  LDFLAGS=$ac_save_LDFLAGS
56322
56323fi
56324
56325
56326    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56327    # this doesn't make sense so we remove it.
56328    if test "x$COMPILE_TYPE" = xcross; then
56329      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56330    fi
56331
56332    if test "x$no_x" = xyes; then
56333
56334  # Print a helpful message on how to acquire the necessary build dependency.
56335  # x11 is the help tag: freetype, cups, alsa etc
56336  MISSING_DEPENDENCY=x11
56337
56338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56339    cygwin_help $MISSING_DEPENDENCY
56340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56341    msys_help $MISSING_DEPENDENCY
56342  else
56343    PKGHANDLER_COMMAND=
56344
56345    case $PKGHANDLER in
56346      apt-get)
56347        apt_help     $MISSING_DEPENDENCY ;;
56348      yum)
56349        yum_help     $MISSING_DEPENDENCY ;;
56350      port)
56351        port_help    $MISSING_DEPENDENCY ;;
56352      pkgutil)
56353        pkgutil_help $MISSING_DEPENDENCY ;;
56354      pkgadd)
56355        pkgadd_help  $MISSING_DEPENDENCY ;;
56356    esac
56357
56358    if test "x$PKGHANDLER_COMMAND" != x; then
56359      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56360    fi
56361  fi
56362
56363      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56364    fi
56365
56366    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56367      OPENWIN_HOME="/usr/openwin"
56368      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56369      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56370          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56371          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56372          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56373    fi
56374
56375    ac_ext=c
56376ac_cpp='$CPP $CPPFLAGS'
56377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56379ac_compiler_gnu=$ac_cv_c_compiler_gnu
56380
56381    OLD_CFLAGS="$CFLAGS"
56382    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56383
56384    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56385    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56386do :
56387  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56388ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56389          # include <X11/Xlib.h>
56390          # include <X11/Xutil.h>
56391
56392
56393"
56394if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56395  cat >>confdefs.h <<_ACEOF
56396#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56397_ACEOF
56398 X11_HEADERS_OK=yes
56399else
56400  X11_HEADERS_OK=no; break
56401fi
56402
56403done
56404
56405
56406    if test "x$X11_HEADERS_OK" = xno; then
56407
56408  # Print a helpful message on how to acquire the necessary build dependency.
56409  # x11 is the help tag: freetype, cups, alsa etc
56410  MISSING_DEPENDENCY=x11
56411
56412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56413    cygwin_help $MISSING_DEPENDENCY
56414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56415    msys_help $MISSING_DEPENDENCY
56416  else
56417    PKGHANDLER_COMMAND=
56418
56419    case $PKGHANDLER in
56420      apt-get)
56421        apt_help     $MISSING_DEPENDENCY ;;
56422      yum)
56423        yum_help     $MISSING_DEPENDENCY ;;
56424      port)
56425        port_help    $MISSING_DEPENDENCY ;;
56426      pkgutil)
56427        pkgutil_help $MISSING_DEPENDENCY ;;
56428      pkgadd)
56429        pkgadd_help  $MISSING_DEPENDENCY ;;
56430    esac
56431
56432    if test "x$PKGHANDLER_COMMAND" != x; then
56433      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56434    fi
56435  fi
56436
56437      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56438    fi
56439
56440    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56441    # defined in libawt_xawt.
56442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56443$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56444    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56445/* end confdefs.h.  */
56446#include <X11/extensions/Xrender.h>
56447int
56448main ()
56449{
56450XLinearGradient x;
56451  ;
56452  return 0;
56453}
56454_ACEOF
56455if ac_fn_c_try_compile "$LINENO"; then :
56456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56457$as_echo "yes" >&6; }
56458else
56459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56460$as_echo "no" >&6; }
56461         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56462fi
56463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56464
56465    CFLAGS="$OLD_CFLAGS"
56466    ac_ext=cpp
56467ac_cpp='$CXXCPP $CPPFLAGS'
56468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56471
56472  fi # NEEDS_LIB_X11
56473
56474
56475
56476
56477
56478
56479# Check whether --with-cups was given.
56480if test "${with_cups+set}" = set; then :
56481  withval=$with_cups;
56482fi
56483
56484
56485# Check whether --with-cups-include was given.
56486if test "${with_cups_include+set}" = set; then :
56487  withval=$with_cups_include;
56488fi
56489
56490
56491  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56492    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56493        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56494      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56495$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56496    fi
56497    CUPS_CFLAGS=
56498  else
56499    CUPS_FOUND=no
56500
56501    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56502      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56503    fi
56504
56505    if test "x${with_cups}" != x; then
56506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56507$as_echo_n "checking for cups headers... " >&6; }
56508      if test -s "${with_cups}/include/cups/cups.h"; then
56509        CUPS_CFLAGS="-I${with_cups}/include"
56510        CUPS_FOUND=yes
56511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56512$as_echo "$CUPS_FOUND" >&6; }
56513      else
56514        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56515      fi
56516    fi
56517    if test "x${with_cups_include}" != x; then
56518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56519$as_echo_n "checking for cups headers... " >&6; }
56520      if test -s "${with_cups_include}/cups/cups.h"; then
56521        CUPS_CFLAGS="-I${with_cups_include}"
56522        CUPS_FOUND=yes
56523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56524$as_echo "$CUPS_FOUND" >&6; }
56525      else
56526        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56527      fi
56528    fi
56529    if test "x$CUPS_FOUND" = xno; then
56530      # Are the cups headers installed in the default /usr/include location?
56531      for ac_header in cups/cups.h cups/ppd.h
56532do :
56533  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56534ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56535if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56536  cat >>confdefs.h <<_ACEOF
56537#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56538_ACEOF
56539
56540          CUPS_FOUND=yes
56541          CUPS_CFLAGS=
56542          DEFAULT_CUPS=yes
56543
56544fi
56545
56546done
56547
56548    fi
56549    if test "x$CUPS_FOUND" = xno; then
56550      # Getting nervous now? Lets poke around for standard Solaris third-party
56551      # package installation locations.
56552      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56553$as_echo_n "checking for cups headers... " >&6; }
56554      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56555        # An SFW package seems to be installed!
56556        CUPS_FOUND=yes
56557        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56558      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56559        # A CSW package seems to be installed!
56560        CUPS_FOUND=yes
56561        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56562      fi
56563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56564$as_echo "$CUPS_FOUND" >&6; }
56565    fi
56566    if test "x$CUPS_FOUND" = xno; then
56567
56568  # Print a helpful message on how to acquire the necessary build dependency.
56569  # cups is the help tag: freetype, cups, alsa etc
56570  MISSING_DEPENDENCY=cups
56571
56572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56573    cygwin_help $MISSING_DEPENDENCY
56574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56575    msys_help $MISSING_DEPENDENCY
56576  else
56577    PKGHANDLER_COMMAND=
56578
56579    case $PKGHANDLER in
56580      apt-get)
56581        apt_help     $MISSING_DEPENDENCY ;;
56582      yum)
56583        yum_help     $MISSING_DEPENDENCY ;;
56584      port)
56585        port_help    $MISSING_DEPENDENCY ;;
56586      pkgutil)
56587        pkgutil_help $MISSING_DEPENDENCY ;;
56588      pkgadd)
56589        pkgadd_help  $MISSING_DEPENDENCY ;;
56590    esac
56591
56592    if test "x$PKGHANDLER_COMMAND" != x; then
56593      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56594    fi
56595  fi
56596
56597      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56598    fi
56599  fi
56600
56601
56602
56603
56604
56605# Check whether --with-freetype was given.
56606if test "${with_freetype+set}" = set; then :
56607  withval=$with_freetype;
56608fi
56609
56610
56611# Check whether --with-freetype-include was given.
56612if test "${with_freetype_include+set}" = set; then :
56613  withval=$with_freetype_include;
56614fi
56615
56616
56617# Check whether --with-freetype-lib was given.
56618if test "${with_freetype_lib+set}" = set; then :
56619  withval=$with_freetype_lib;
56620fi
56621
56622
56623# Check whether --with-freetype-src was given.
56624if test "${with_freetype_src+set}" = set; then :
56625  withval=$with_freetype_src;
56626fi
56627
56628  # Check whether --enable-freetype-bundling was given.
56629if test "${enable_freetype_bundling+set}" = set; then :
56630  enableval=$enable_freetype_bundling;
56631fi
56632
56633
56634  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56635  FREETYPE_BASE_NAME=freetype
56636  FREETYPE_CFLAGS=
56637  FREETYPE_LIBS=
56638  FREETYPE_BUNDLE_LIB_PATH=
56639
56640  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56641    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56642        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56643        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56644        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56645      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56646$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56647    fi
56648    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56649      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56650$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56651    fi
56652  else
56653    # freetype is needed to build; go get it!
56654
56655    BUNDLE_FREETYPE="$enable_freetype_bundling"
56656
56657    if  test "x$with_freetype_src" != x; then
56658      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56659        # Try to build freetype if --with-freetype-src was given on Windows
56660
56661  FREETYPE_SRC_PATH="$with_freetype_src"
56662  BUILD_FREETYPE=yes
56663
56664  # Check if the freetype sources are acessible..
56665  if ! test -d $FREETYPE_SRC_PATH; then
56666    { $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
56667$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56668    BUILD_FREETYPE=no
56669  fi
56670  # ..and contain a vc2010 project file
56671  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56672  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56673    { $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
56674$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56675    BUILD_FREETYPE=no
56676  fi
56677  # Now check if configure found a version of 'msbuild.exe'
56678  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56679    { $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
56680$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;}
56681    BUILD_FREETYPE=no
56682  fi
56683
56684  # Ready to go..
56685  if test "x$BUILD_FREETYPE" = xyes; then
56686    # msbuild requires trailing slashes for output directories
56687    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56688    freetype_lib_path_unix="$freetype_lib_path"
56689    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56690
56691  unix_path="$vcxproj_path"
56692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56693    windows_path=`$CYGPATH -m "$unix_path"`
56694    vcxproj_path="$windows_path"
56695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56696    windows_path=`cmd //c echo $unix_path`
56697    vcxproj_path="$windows_path"
56698  fi
56699
56700
56701  unix_path="$freetype_lib_path"
56702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56703    windows_path=`$CYGPATH -m "$unix_path"`
56704    freetype_lib_path="$windows_path"
56705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56706    windows_path=`cmd //c echo $unix_path`
56707    freetype_lib_path="$windows_path"
56708  fi
56709
56710
56711  unix_path="$freetype_obj_path"
56712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56713    windows_path=`$CYGPATH -m "$unix_path"`
56714    freetype_obj_path="$windows_path"
56715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56716    windows_path=`cmd //c echo $unix_path`
56717    freetype_obj_path="$windows_path"
56718  fi
56719
56720    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56721      freetype_platform=x64
56722    else
56723      freetype_platform=win32
56724    fi
56725
56726    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56727    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56728    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56729    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56730    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56731$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56732
56733    # First we try to build the freetype.dll
56734    $ECHO -e "@echo off\n"\
56735        "$MSBUILD $vcxproj_path "\
56736        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56737        "/p:Configuration=\"Release Multithreaded\" "\
56738        "/p:Platform=$freetype_platform "\
56739        "/p:ConfigurationType=DynamicLibrary "\
56740        "/p:TargetName=freetype "\
56741        "/p:OutDir=\"$freetype_lib_path\" "\
56742        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56743    cmd /c freetype.bat
56744
56745    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56746      # If that succeeds we also build freetype.lib
56747      $ECHO -e "@echo off\n"\
56748          "$MSBUILD $vcxproj_path "\
56749          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56750          "/p:Configuration=\"Release Multithreaded\" "\
56751          "/p:Platform=$freetype_platform "\
56752          "/p:ConfigurationType=StaticLibrary "\
56753          "/p:TargetName=freetype "\
56754          "/p:OutDir=\"$freetype_lib_path\" "\
56755          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56756      cmd /c freetype.bat
56757
56758      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56759        # Once we build both, lib and dll, set freetype lib and include path appropriately
56760        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56761        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56762        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56763$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56764      else
56765        BUILD_FREETYPE=no
56766      fi
56767    else
56768      BUILD_FREETYPE=no
56769    fi
56770  fi
56771
56772        if test "x$BUILD_FREETYPE" = xyes; then
56773          # Okay, we built it. Check that it works.
56774
56775  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56776  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56777  METHOD="--with-freetype-src"
56778
56779  # Let's start with an optimistic view of the world :-)
56780  FOUND_FREETYPE=yes
56781
56782  # First look for the canonical freetype main include file ft2build.h.
56783  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56784    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56785    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56786    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56787      # Fail.
56788      FOUND_FREETYPE=no
56789    fi
56790  fi
56791
56792  if test "x$FOUND_FREETYPE" = xyes; then
56793    # Include file found, let's continue the sanity check.
56794    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56795$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56796
56797    # Reset to default value
56798    FREETYPE_BASE_NAME=freetype
56799    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56800    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56801      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56802          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56803        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56804        # for the .6 version explicitly.
56805        FREETYPE_BASE_NAME=freetype.6
56806        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56807        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56808$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56809      else
56810        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56811$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56812        FOUND_FREETYPE=no
56813      fi
56814    else
56815      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56816        # On Windows, we will need both .lib and .dll file.
56817        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56818          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56819$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56820          FOUND_FREETYPE=no
56821        fi
56822      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56823          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56824        # Found lib in isa dir, use that instead.
56825        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56826        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56827$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56828      fi
56829    fi
56830  fi
56831
56832  if test "x$FOUND_FREETYPE" = xyes; then
56833
56834  # Only process if variable expands to non-empty
56835
56836  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56838
56839  # Input might be given as Windows format, start by converting to
56840  # unix format.
56841  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56842  new_path=`$CYGPATH -u "$path"`
56843
56844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56847  # "foo.exe" is OK but "foo" is an error.
56848  #
56849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56850  # It is also a way to make sure we got the proper file name for the real test later on.
56851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56852  if test "x$test_shortpath" = x; then
56853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56854$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56855    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56856  fi
56857
56858  # Call helper function which possibly converts this using DOS-style short mode.
56859  # If so, the updated path is stored in $new_path.
56860
56861  input_path="$new_path"
56862  # Check if we need to convert this using DOS-style short mode. If the path
56863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56864  # take no chances and rewrite it.
56865  # Note: m4 eats our [], so we need to use [ and ] instead.
56866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56867  if test "x$has_forbidden_chars" != x; then
56868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56872      # Going to short mode and back again did indeed matter. Since short mode is
56873      # case insensitive, let's make it lowercase to improve readability.
56874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56875      # Now convert it back to Unix-style (cygpath)
56876      input_path=`$CYGPATH -u "$shortmode_path"`
56877      new_path="$input_path"
56878    fi
56879  fi
56880
56881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56882  if test "x$test_cygdrive_prefix" = x; then
56883    # As a simple fix, exclude /usr/bin since it's not a real path.
56884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56886      # a path prefixed by /cygdrive for fixpath to work.
56887      new_path="$CYGWIN_ROOT_PATH$input_path"
56888    fi
56889  fi
56890
56891
56892  if test "x$path" != "x$new_path"; then
56893    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56895$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56896  fi
56897
56898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56899
56900  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56901  has_colon=`$ECHO $path | $GREP ^.:`
56902  new_path="$path"
56903  if test "x$has_colon" = x; then
56904    # Not in mixed or Windows style, start by that.
56905    new_path=`cmd //c echo $path`
56906  fi
56907
56908
56909  input_path="$new_path"
56910  # Check if we need to convert this using DOS-style short mode. If the path
56911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56912  # take no chances and rewrite it.
56913  # Note: m4 eats our [], so we need to use [ and ] instead.
56914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56915  if test "x$has_forbidden_chars" != x; then
56916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56918  fi
56919
56920
56921  windows_path="$new_path"
56922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56923    unix_path=`$CYGPATH -u "$windows_path"`
56924    new_path="$unix_path"
56925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56927    new_path="$unix_path"
56928  fi
56929
56930  if test "x$path" != "x$new_path"; then
56931    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56933$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56934  fi
56935
56936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56938
56939    else
56940      # We're on a unix platform. Hooray! :)
56941      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56942      has_space=`$ECHO "$path" | $GREP " "`
56943      if test "x$has_space" != x; then
56944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56945$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56946        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56947      fi
56948
56949      # Use eval to expand a potential ~
56950      eval path="$path"
56951      if test ! -f "$path" && test ! -d "$path"; then
56952        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56953      fi
56954
56955      if test -d "$path"; then
56956        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56957      else
56958        dir="`$DIRNAME "$path"`"
56959        base="`$BASENAME "$path"`"
56960        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56961      fi
56962    fi
56963  fi
56964
56965
56966  # Only process if variable expands to non-empty
56967
56968  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56970
56971  # Input might be given as Windows format, start by converting to
56972  # unix format.
56973  path="$POTENTIAL_FREETYPE_LIB_PATH"
56974  new_path=`$CYGPATH -u "$path"`
56975
56976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56979  # "foo.exe" is OK but "foo" is an error.
56980  #
56981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56982  # It is also a way to make sure we got the proper file name for the real test later on.
56983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56984  if test "x$test_shortpath" = x; then
56985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56987    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56988  fi
56989
56990  # Call helper function which possibly converts this using DOS-style short mode.
56991  # If so, the updated path is stored in $new_path.
56992
56993  input_path="$new_path"
56994  # Check if we need to convert this using DOS-style short mode. If the path
56995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56996  # take no chances and rewrite it.
56997  # Note: m4 eats our [], so we need to use [ and ] instead.
56998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56999  if test "x$has_forbidden_chars" != x; then
57000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57004      # Going to short mode and back again did indeed matter. Since short mode is
57005      # case insensitive, let's make it lowercase to improve readability.
57006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57007      # Now convert it back to Unix-style (cygpath)
57008      input_path=`$CYGPATH -u "$shortmode_path"`
57009      new_path="$input_path"
57010    fi
57011  fi
57012
57013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57014  if test "x$test_cygdrive_prefix" = x; then
57015    # As a simple fix, exclude /usr/bin since it's not a real path.
57016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57018      # a path prefixed by /cygdrive for fixpath to work.
57019      new_path="$CYGWIN_ROOT_PATH$input_path"
57020    fi
57021  fi
57022
57023
57024  if test "x$path" != "x$new_path"; then
57025    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57027$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57028  fi
57029
57030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57031
57032  path="$POTENTIAL_FREETYPE_LIB_PATH"
57033  has_colon=`$ECHO $path | $GREP ^.:`
57034  new_path="$path"
57035  if test "x$has_colon" = x; then
57036    # Not in mixed or Windows style, start by that.
57037    new_path=`cmd //c echo $path`
57038  fi
57039
57040
57041  input_path="$new_path"
57042  # Check if we need to convert this using DOS-style short mode. If the path
57043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57044  # take no chances and rewrite it.
57045  # Note: m4 eats our [], so we need to use [ and ] instead.
57046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57047  if test "x$has_forbidden_chars" != x; then
57048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57050  fi
57051
57052
57053  windows_path="$new_path"
57054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57055    unix_path=`$CYGPATH -u "$windows_path"`
57056    new_path="$unix_path"
57057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57059    new_path="$unix_path"
57060  fi
57061
57062  if test "x$path" != "x$new_path"; then
57063    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57066  fi
57067
57068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57070
57071    else
57072      # We're on a unix platform. Hooray! :)
57073      path="$POTENTIAL_FREETYPE_LIB_PATH"
57074      has_space=`$ECHO "$path" | $GREP " "`
57075      if test "x$has_space" != x; then
57076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57077$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57079      fi
57080
57081      # Use eval to expand a potential ~
57082      eval path="$path"
57083      if test ! -f "$path" && test ! -d "$path"; then
57084        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57085      fi
57086
57087      if test -d "$path"; then
57088        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57089      else
57090        dir="`$DIRNAME "$path"`"
57091        base="`$BASENAME "$path"`"
57092        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57093      fi
57094    fi
57095  fi
57096
57097
57098    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57100$as_echo_n "checking for freetype includes... " >&6; }
57101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57102$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57103    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57105$as_echo_n "checking for freetype libraries... " >&6; }
57106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57107$as_echo "$FREETYPE_LIB_PATH" >&6; }
57108  fi
57109
57110          if test "x$FOUND_FREETYPE" != xyes; then
57111            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57112          fi
57113        else
57114          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57115$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57116          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57117        fi
57118      else
57119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57120$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57121      fi
57122    fi
57123
57124    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57125      # User has specified settings
57126
57127      if test "x$BUNDLE_FREETYPE" = x; then
57128        # If not specified, default is to bundle freetype
57129        BUNDLE_FREETYPE=yes
57130      fi
57131
57132      if test "x$with_freetype" != x; then
57133        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57134        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57135      fi
57136
57137      # Allow --with-freetype-lib and --with-freetype-include to override
57138      if test "x$with_freetype_include" != x; then
57139        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57140      fi
57141      if test "x$with_freetype_lib" != x; then
57142        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57143      fi
57144
57145      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57146        # Okay, we got it. Check that it works.
57147
57148  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57149  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57150  METHOD="--with-freetype"
57151
57152  # Let's start with an optimistic view of the world :-)
57153  FOUND_FREETYPE=yes
57154
57155  # First look for the canonical freetype main include file ft2build.h.
57156  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57157    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57158    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57159    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57160      # Fail.
57161      FOUND_FREETYPE=no
57162    fi
57163  fi
57164
57165  if test "x$FOUND_FREETYPE" = xyes; then
57166    # Include file found, let's continue the sanity check.
57167    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57168$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57169
57170    # Reset to default value
57171    FREETYPE_BASE_NAME=freetype
57172    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57173    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57174      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57175          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57176        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57177        # for the .6 version explicitly.
57178        FREETYPE_BASE_NAME=freetype.6
57179        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57180        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57181$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57182      else
57183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57184$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57185        FOUND_FREETYPE=no
57186      fi
57187    else
57188      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57189        # On Windows, we will need both .lib and .dll file.
57190        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57191          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57193          FOUND_FREETYPE=no
57194        fi
57195      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57196          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57197        # Found lib in isa dir, use that instead.
57198        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57199        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57200$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57201      fi
57202    fi
57203  fi
57204
57205  if test "x$FOUND_FREETYPE" = xyes; then
57206
57207  # Only process if variable expands to non-empty
57208
57209  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57211
57212  # Input might be given as Windows format, start by converting to
57213  # unix format.
57214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57215  new_path=`$CYGPATH -u "$path"`
57216
57217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57220  # "foo.exe" is OK but "foo" is an error.
57221  #
57222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57223  # It is also a way to make sure we got the proper file name for the real test later on.
57224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57225  if test "x$test_shortpath" = x; then
57226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57227$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57228    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57229  fi
57230
57231  # Call helper function which possibly converts this using DOS-style short mode.
57232  # If so, the updated path is stored in $new_path.
57233
57234  input_path="$new_path"
57235  # Check if we need to convert this using DOS-style short mode. If the path
57236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57237  # take no chances and rewrite it.
57238  # Note: m4 eats our [], so we need to use [ and ] instead.
57239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57240  if test "x$has_forbidden_chars" != x; then
57241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57245      # Going to short mode and back again did indeed matter. Since short mode is
57246      # case insensitive, let's make it lowercase to improve readability.
57247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57248      # Now convert it back to Unix-style (cygpath)
57249      input_path=`$CYGPATH -u "$shortmode_path"`
57250      new_path="$input_path"
57251    fi
57252  fi
57253
57254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57255  if test "x$test_cygdrive_prefix" = x; then
57256    # As a simple fix, exclude /usr/bin since it's not a real path.
57257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57259      # a path prefixed by /cygdrive for fixpath to work.
57260      new_path="$CYGWIN_ROOT_PATH$input_path"
57261    fi
57262  fi
57263
57264
57265  if test "x$path" != "x$new_path"; then
57266    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57269  fi
57270
57271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57272
57273  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57274  has_colon=`$ECHO $path | $GREP ^.:`
57275  new_path="$path"
57276  if test "x$has_colon" = x; then
57277    # Not in mixed or Windows style, start by that.
57278    new_path=`cmd //c echo $path`
57279  fi
57280
57281
57282  input_path="$new_path"
57283  # Check if we need to convert this using DOS-style short mode. If the path
57284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57285  # take no chances and rewrite it.
57286  # Note: m4 eats our [], so we need to use [ and ] instead.
57287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57288  if test "x$has_forbidden_chars" != x; then
57289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57291  fi
57292
57293
57294  windows_path="$new_path"
57295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57296    unix_path=`$CYGPATH -u "$windows_path"`
57297    new_path="$unix_path"
57298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57300    new_path="$unix_path"
57301  fi
57302
57303  if test "x$path" != "x$new_path"; then
57304    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57307  fi
57308
57309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57311
57312    else
57313      # We're on a unix platform. Hooray! :)
57314      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57315      has_space=`$ECHO "$path" | $GREP " "`
57316      if test "x$has_space" != x; then
57317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57320      fi
57321
57322      # Use eval to expand a potential ~
57323      eval path="$path"
57324      if test ! -f "$path" && test ! -d "$path"; then
57325        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57326      fi
57327
57328      if test -d "$path"; then
57329        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57330      else
57331        dir="`$DIRNAME "$path"`"
57332        base="`$BASENAME "$path"`"
57333        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57334      fi
57335    fi
57336  fi
57337
57338
57339  # Only process if variable expands to non-empty
57340
57341  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57343
57344  # Input might be given as Windows format, start by converting to
57345  # unix format.
57346  path="$POTENTIAL_FREETYPE_LIB_PATH"
57347  new_path=`$CYGPATH -u "$path"`
57348
57349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57352  # "foo.exe" is OK but "foo" is an error.
57353  #
57354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57355  # It is also a way to make sure we got the proper file name for the real test later on.
57356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57357  if test "x$test_shortpath" = x; then
57358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57359$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57360    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57361  fi
57362
57363  # Call helper function which possibly converts this using DOS-style short mode.
57364  # If so, the updated path is stored in $new_path.
57365
57366  input_path="$new_path"
57367  # Check if we need to convert this using DOS-style short mode. If the path
57368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57369  # take no chances and rewrite it.
57370  # Note: m4 eats our [], so we need to use [ and ] instead.
57371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57372  if test "x$has_forbidden_chars" != x; then
57373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57377      # Going to short mode and back again did indeed matter. Since short mode is
57378      # case insensitive, let's make it lowercase to improve readability.
57379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57380      # Now convert it back to Unix-style (cygpath)
57381      input_path=`$CYGPATH -u "$shortmode_path"`
57382      new_path="$input_path"
57383    fi
57384  fi
57385
57386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57387  if test "x$test_cygdrive_prefix" = x; then
57388    # As a simple fix, exclude /usr/bin since it's not a real path.
57389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57391      # a path prefixed by /cygdrive for fixpath to work.
57392      new_path="$CYGWIN_ROOT_PATH$input_path"
57393    fi
57394  fi
57395
57396
57397  if test "x$path" != "x$new_path"; then
57398    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57400$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57401  fi
57402
57403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57404
57405  path="$POTENTIAL_FREETYPE_LIB_PATH"
57406  has_colon=`$ECHO $path | $GREP ^.:`
57407  new_path="$path"
57408  if test "x$has_colon" = x; then
57409    # Not in mixed or Windows style, start by that.
57410    new_path=`cmd //c echo $path`
57411  fi
57412
57413
57414  input_path="$new_path"
57415  # Check if we need to convert this using DOS-style short mode. If the path
57416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57417  # take no chances and rewrite it.
57418  # Note: m4 eats our [], so we need to use [ and ] instead.
57419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57420  if test "x$has_forbidden_chars" != x; then
57421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57423  fi
57424
57425
57426  windows_path="$new_path"
57427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57428    unix_path=`$CYGPATH -u "$windows_path"`
57429    new_path="$unix_path"
57430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57432    new_path="$unix_path"
57433  fi
57434
57435  if test "x$path" != "x$new_path"; then
57436    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57439  fi
57440
57441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57443
57444    else
57445      # We're on a unix platform. Hooray! :)
57446      path="$POTENTIAL_FREETYPE_LIB_PATH"
57447      has_space=`$ECHO "$path" | $GREP " "`
57448      if test "x$has_space" != x; then
57449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57452      fi
57453
57454      # Use eval to expand a potential ~
57455      eval path="$path"
57456      if test ! -f "$path" && test ! -d "$path"; then
57457        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57458      fi
57459
57460      if test -d "$path"; then
57461        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57462      else
57463        dir="`$DIRNAME "$path"`"
57464        base="`$BASENAME "$path"`"
57465        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57466      fi
57467    fi
57468  fi
57469
57470
57471    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57473$as_echo_n "checking for freetype includes... " >&6; }
57474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57475$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57476    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57478$as_echo_n "checking for freetype libraries... " >&6; }
57479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57480$as_echo "$FREETYPE_LIB_PATH" >&6; }
57481  fi
57482
57483        if test "x$FOUND_FREETYPE" != xyes; then
57484          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57485        fi
57486      else
57487        # User specified only one of lib or include. This is an error.
57488        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57489          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57490$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57491          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57492        else
57493          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57494$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57495          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57496        fi
57497      fi
57498    else
57499      # User did not specify settings, but we need freetype. Try to locate it.
57500
57501      if test "x$BUNDLE_FREETYPE" = x; then
57502        # If not specified, default is to bundle freetype only on windows
57503        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57504          BUNDLE_FREETYPE=yes
57505        else
57506          BUNDLE_FREETYPE=no
57507        fi
57508      fi
57509
57510      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57511      if test "x$SYSROOT" = x; then
57512        if test "x$FOUND_FREETYPE" != xyes; then
57513          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57514          if test "x$PKG_CONFIG" != x; then
57515
57516pkg_failed=no
57517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57518$as_echo_n "checking for FREETYPE... " >&6; }
57519
57520if test -n "$FREETYPE_CFLAGS"; then
57521    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57522 elif test -n "$PKG_CONFIG"; then
57523    if test -n "$PKG_CONFIG" && \
57524    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57525  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57526  ac_status=$?
57527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57528  test $ac_status = 0; }; then
57529  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57530else
57531  pkg_failed=yes
57532fi
57533 else
57534    pkg_failed=untried
57535fi
57536if test -n "$FREETYPE_LIBS"; then
57537    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57538 elif test -n "$PKG_CONFIG"; then
57539    if test -n "$PKG_CONFIG" && \
57540    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57541  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57542  ac_status=$?
57543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57544  test $ac_status = 0; }; then
57545  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57546else
57547  pkg_failed=yes
57548fi
57549 else
57550    pkg_failed=untried
57551fi
57552
57553
57554
57555if test $pkg_failed = yes; then
57556
57557if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57558        _pkg_short_errors_supported=yes
57559else
57560        _pkg_short_errors_supported=no
57561fi
57562        if test $_pkg_short_errors_supported = yes; then
57563	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57564        else
57565	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57566        fi
57567	# Put the nasty error message in config.log where it belongs
57568	echo "$FREETYPE_PKG_ERRORS" >&5
57569
57570	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57571$as_echo "no" >&6; }
57572                FOUND_FREETYPE=no
57573elif test $pkg_failed = untried; then
57574	FOUND_FREETYPE=no
57575else
57576	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57577	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57579$as_echo "yes" >&6; }
57580	FOUND_FREETYPE=yes
57581fi
57582            if test "x$FOUND_FREETYPE" = xyes; then
57583              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57584              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57585              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57586              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57587                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57588              fi
57589              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57590              if test "x$BUNDLE_FREETYPE" = xyes; then
57591                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57592$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57593                FOUND_FREETYPE=no
57594              else
57595                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57596$as_echo_n "checking for freetype... " >&6; }
57597                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57598$as_echo "yes (using pkg-config)" >&6; }
57599              fi
57600            fi
57601          fi
57602        fi
57603      fi
57604
57605      if test "x$FOUND_FREETYPE" != xyes; then
57606        # Check in well-known locations
57607        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57608          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57609
57610  windows_path="$FREETYPE_BASE_DIR"
57611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57612    unix_path=`$CYGPATH -u "$windows_path"`
57613    FREETYPE_BASE_DIR="$unix_path"
57614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57616    FREETYPE_BASE_DIR="$unix_path"
57617  fi
57618
57619
57620  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57621  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57622  METHOD="well-known location"
57623
57624  # Let's start with an optimistic view of the world :-)
57625  FOUND_FREETYPE=yes
57626
57627  # First look for the canonical freetype main include file ft2build.h.
57628  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57629    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57630    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57631    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57632      # Fail.
57633      FOUND_FREETYPE=no
57634    fi
57635  fi
57636
57637  if test "x$FOUND_FREETYPE" = xyes; then
57638    # Include file found, let's continue the sanity check.
57639    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57640$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57641
57642    # Reset to default value
57643    FREETYPE_BASE_NAME=freetype
57644    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57645    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57646      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57647          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57648        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57649        # for the .6 version explicitly.
57650        FREETYPE_BASE_NAME=freetype.6
57651        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57652        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57653$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57654      else
57655        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57656$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57657        FOUND_FREETYPE=no
57658      fi
57659    else
57660      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57661        # On Windows, we will need both .lib and .dll file.
57662        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57663          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57664$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57665          FOUND_FREETYPE=no
57666        fi
57667      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57668          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57669        # Found lib in isa dir, use that instead.
57670        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57671        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57672$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57673      fi
57674    fi
57675  fi
57676
57677  if test "x$FOUND_FREETYPE" = xyes; then
57678
57679  # Only process if variable expands to non-empty
57680
57681  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57683
57684  # Input might be given as Windows format, start by converting to
57685  # unix format.
57686  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57687  new_path=`$CYGPATH -u "$path"`
57688
57689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57692  # "foo.exe" is OK but "foo" is an error.
57693  #
57694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57695  # It is also a way to make sure we got the proper file name for the real test later on.
57696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57697  if test "x$test_shortpath" = x; then
57698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57700    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57701  fi
57702
57703  # Call helper function which possibly converts this using DOS-style short mode.
57704  # If so, the updated path is stored in $new_path.
57705
57706  input_path="$new_path"
57707  # Check if we need to convert this using DOS-style short mode. If the path
57708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57709  # take no chances and rewrite it.
57710  # Note: m4 eats our [], so we need to use [ and ] instead.
57711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57712  if test "x$has_forbidden_chars" != x; then
57713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57717      # Going to short mode and back again did indeed matter. Since short mode is
57718      # case insensitive, let's make it lowercase to improve readability.
57719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57720      # Now convert it back to Unix-style (cygpath)
57721      input_path=`$CYGPATH -u "$shortmode_path"`
57722      new_path="$input_path"
57723    fi
57724  fi
57725
57726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57727  if test "x$test_cygdrive_prefix" = x; then
57728    # As a simple fix, exclude /usr/bin since it's not a real path.
57729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57731      # a path prefixed by /cygdrive for fixpath to work.
57732      new_path="$CYGWIN_ROOT_PATH$input_path"
57733    fi
57734  fi
57735
57736
57737  if test "x$path" != "x$new_path"; then
57738    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57741  fi
57742
57743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57744
57745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57746  has_colon=`$ECHO $path | $GREP ^.:`
57747  new_path="$path"
57748  if test "x$has_colon" = x; then
57749    # Not in mixed or Windows style, start by that.
57750    new_path=`cmd //c echo $path`
57751  fi
57752
57753
57754  input_path="$new_path"
57755  # Check if we need to convert this using DOS-style short mode. If the path
57756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57757  # take no chances and rewrite it.
57758  # Note: m4 eats our [], so we need to use [ and ] instead.
57759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57760  if test "x$has_forbidden_chars" != x; then
57761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57763  fi
57764
57765
57766  windows_path="$new_path"
57767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57768    unix_path=`$CYGPATH -u "$windows_path"`
57769    new_path="$unix_path"
57770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57772    new_path="$unix_path"
57773  fi
57774
57775  if test "x$path" != "x$new_path"; then
57776    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57778$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57779  fi
57780
57781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57783
57784    else
57785      # We're on a unix platform. Hooray! :)
57786      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57787      has_space=`$ECHO "$path" | $GREP " "`
57788      if test "x$has_space" != x; then
57789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57792      fi
57793
57794      # Use eval to expand a potential ~
57795      eval path="$path"
57796      if test ! -f "$path" && test ! -d "$path"; then
57797        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57798      fi
57799
57800      if test -d "$path"; then
57801        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57802      else
57803        dir="`$DIRNAME "$path"`"
57804        base="`$BASENAME "$path"`"
57805        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57806      fi
57807    fi
57808  fi
57809
57810
57811  # Only process if variable expands to non-empty
57812
57813  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57815
57816  # Input might be given as Windows format, start by converting to
57817  # unix format.
57818  path="$POTENTIAL_FREETYPE_LIB_PATH"
57819  new_path=`$CYGPATH -u "$path"`
57820
57821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57824  # "foo.exe" is OK but "foo" is an error.
57825  #
57826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57827  # It is also a way to make sure we got the proper file name for the real test later on.
57828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57829  if test "x$test_shortpath" = x; then
57830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57833  fi
57834
57835  # Call helper function which possibly converts this using DOS-style short mode.
57836  # If so, the updated path is stored in $new_path.
57837
57838  input_path="$new_path"
57839  # Check if we need to convert this using DOS-style short mode. If the path
57840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57841  # take no chances and rewrite it.
57842  # Note: m4 eats our [], so we need to use [ and ] instead.
57843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57844  if test "x$has_forbidden_chars" != x; then
57845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57849      # Going to short mode and back again did indeed matter. Since short mode is
57850      # case insensitive, let's make it lowercase to improve readability.
57851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57852      # Now convert it back to Unix-style (cygpath)
57853      input_path=`$CYGPATH -u "$shortmode_path"`
57854      new_path="$input_path"
57855    fi
57856  fi
57857
57858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57859  if test "x$test_cygdrive_prefix" = x; then
57860    # As a simple fix, exclude /usr/bin since it's not a real path.
57861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57863      # a path prefixed by /cygdrive for fixpath to work.
57864      new_path="$CYGWIN_ROOT_PATH$input_path"
57865    fi
57866  fi
57867
57868
57869  if test "x$path" != "x$new_path"; then
57870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57873  fi
57874
57875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57876
57877  path="$POTENTIAL_FREETYPE_LIB_PATH"
57878  has_colon=`$ECHO $path | $GREP ^.:`
57879  new_path="$path"
57880  if test "x$has_colon" = x; then
57881    # Not in mixed or Windows style, start by that.
57882    new_path=`cmd //c echo $path`
57883  fi
57884
57885
57886  input_path="$new_path"
57887  # Check if we need to convert this using DOS-style short mode. If the path
57888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57889  # take no chances and rewrite it.
57890  # Note: m4 eats our [], so we need to use [ and ] instead.
57891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57892  if test "x$has_forbidden_chars" != x; then
57893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57895  fi
57896
57897
57898  windows_path="$new_path"
57899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57900    unix_path=`$CYGPATH -u "$windows_path"`
57901    new_path="$unix_path"
57902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57904    new_path="$unix_path"
57905  fi
57906
57907  if test "x$path" != "x$new_path"; then
57908    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57911  fi
57912
57913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57915
57916    else
57917      # We're on a unix platform. Hooray! :)
57918      path="$POTENTIAL_FREETYPE_LIB_PATH"
57919      has_space=`$ECHO "$path" | $GREP " "`
57920      if test "x$has_space" != x; then
57921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57924      fi
57925
57926      # Use eval to expand a potential ~
57927      eval path="$path"
57928      if test ! -f "$path" && test ! -d "$path"; then
57929        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57930      fi
57931
57932      if test -d "$path"; then
57933        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57934      else
57935        dir="`$DIRNAME "$path"`"
57936        base="`$BASENAME "$path"`"
57937        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57938      fi
57939    fi
57940  fi
57941
57942
57943    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57945$as_echo_n "checking for freetype includes... " >&6; }
57946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57947$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57948    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57950$as_echo_n "checking for freetype libraries... " >&6; }
57951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57952$as_echo "$FREETYPE_LIB_PATH" >&6; }
57953  fi
57954
57955          if test "x$FOUND_FREETYPE" != xyes; then
57956            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57957
57958  windows_path="$FREETYPE_BASE_DIR"
57959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57960    unix_path=`$CYGPATH -u "$windows_path"`
57961    FREETYPE_BASE_DIR="$unix_path"
57962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57964    FREETYPE_BASE_DIR="$unix_path"
57965  fi
57966
57967
57968  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57969  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57970  METHOD="well-known location"
57971
57972  # Let's start with an optimistic view of the world :-)
57973  FOUND_FREETYPE=yes
57974
57975  # First look for the canonical freetype main include file ft2build.h.
57976  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57977    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57978    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57979    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57980      # Fail.
57981      FOUND_FREETYPE=no
57982    fi
57983  fi
57984
57985  if test "x$FOUND_FREETYPE" = xyes; then
57986    # Include file found, let's continue the sanity check.
57987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57988$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57989
57990    # Reset to default value
57991    FREETYPE_BASE_NAME=freetype
57992    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57993    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57994      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57995          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57996        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57997        # for the .6 version explicitly.
57998        FREETYPE_BASE_NAME=freetype.6
57999        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58000        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58001$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58002      else
58003        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58004$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58005        FOUND_FREETYPE=no
58006      fi
58007    else
58008      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58009        # On Windows, we will need both .lib and .dll file.
58010        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58011          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58012$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58013          FOUND_FREETYPE=no
58014        fi
58015      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58017        # Found lib in isa dir, use that instead.
58018        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58019        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58020$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58021      fi
58022    fi
58023  fi
58024
58025  if test "x$FOUND_FREETYPE" = xyes; then
58026
58027  # Only process if variable expands to non-empty
58028
58029  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58031
58032  # Input might be given as Windows format, start by converting to
58033  # unix format.
58034  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58035  new_path=`$CYGPATH -u "$path"`
58036
58037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58040  # "foo.exe" is OK but "foo" is an error.
58041  #
58042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58043  # It is also a way to make sure we got the proper file name for the real test later on.
58044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58045  if test "x$test_shortpath" = x; then
58046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58048    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58049  fi
58050
58051  # Call helper function which possibly converts this using DOS-style short mode.
58052  # If so, the updated path is stored in $new_path.
58053
58054  input_path="$new_path"
58055  # Check if we need to convert this using DOS-style short mode. If the path
58056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58057  # take no chances and rewrite it.
58058  # Note: m4 eats our [], so we need to use [ and ] instead.
58059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58060  if test "x$has_forbidden_chars" != x; then
58061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58065      # Going to short mode and back again did indeed matter. Since short mode is
58066      # case insensitive, let's make it lowercase to improve readability.
58067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58068      # Now convert it back to Unix-style (cygpath)
58069      input_path=`$CYGPATH -u "$shortmode_path"`
58070      new_path="$input_path"
58071    fi
58072  fi
58073
58074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58075  if test "x$test_cygdrive_prefix" = x; then
58076    # As a simple fix, exclude /usr/bin since it's not a real path.
58077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58079      # a path prefixed by /cygdrive for fixpath to work.
58080      new_path="$CYGWIN_ROOT_PATH$input_path"
58081    fi
58082  fi
58083
58084
58085  if test "x$path" != "x$new_path"; then
58086    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58089  fi
58090
58091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58092
58093  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58094  has_colon=`$ECHO $path | $GREP ^.:`
58095  new_path="$path"
58096  if test "x$has_colon" = x; then
58097    # Not in mixed or Windows style, start by that.
58098    new_path=`cmd //c echo $path`
58099  fi
58100
58101
58102  input_path="$new_path"
58103  # Check if we need to convert this using DOS-style short mode. If the path
58104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58105  # take no chances and rewrite it.
58106  # Note: m4 eats our [], so we need to use [ and ] instead.
58107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58108  if test "x$has_forbidden_chars" != x; then
58109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58111  fi
58112
58113
58114  windows_path="$new_path"
58115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58116    unix_path=`$CYGPATH -u "$windows_path"`
58117    new_path="$unix_path"
58118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58120    new_path="$unix_path"
58121  fi
58122
58123  if test "x$path" != "x$new_path"; then
58124    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58127  fi
58128
58129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58131
58132    else
58133      # We're on a unix platform. Hooray! :)
58134      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58135      has_space=`$ECHO "$path" | $GREP " "`
58136      if test "x$has_space" != x; then
58137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58140      fi
58141
58142      # Use eval to expand a potential ~
58143      eval path="$path"
58144      if test ! -f "$path" && test ! -d "$path"; then
58145        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58146      fi
58147
58148      if test -d "$path"; then
58149        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58150      else
58151        dir="`$DIRNAME "$path"`"
58152        base="`$BASENAME "$path"`"
58153        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58154      fi
58155    fi
58156  fi
58157
58158
58159  # Only process if variable expands to non-empty
58160
58161  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58163
58164  # Input might be given as Windows format, start by converting to
58165  # unix format.
58166  path="$POTENTIAL_FREETYPE_LIB_PATH"
58167  new_path=`$CYGPATH -u "$path"`
58168
58169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58172  # "foo.exe" is OK but "foo" is an error.
58173  #
58174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58175  # It is also a way to make sure we got the proper file name for the real test later on.
58176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58177  if test "x$test_shortpath" = x; then
58178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58180    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58181  fi
58182
58183  # Call helper function which possibly converts this using DOS-style short mode.
58184  # If so, the updated path is stored in $new_path.
58185
58186  input_path="$new_path"
58187  # Check if we need to convert this using DOS-style short mode. If the path
58188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58189  # take no chances and rewrite it.
58190  # Note: m4 eats our [], so we need to use [ and ] instead.
58191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58192  if test "x$has_forbidden_chars" != x; then
58193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58197      # Going to short mode and back again did indeed matter. Since short mode is
58198      # case insensitive, let's make it lowercase to improve readability.
58199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58200      # Now convert it back to Unix-style (cygpath)
58201      input_path=`$CYGPATH -u "$shortmode_path"`
58202      new_path="$input_path"
58203    fi
58204  fi
58205
58206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58207  if test "x$test_cygdrive_prefix" = x; then
58208    # As a simple fix, exclude /usr/bin since it's not a real path.
58209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58211      # a path prefixed by /cygdrive for fixpath to work.
58212      new_path="$CYGWIN_ROOT_PATH$input_path"
58213    fi
58214  fi
58215
58216
58217  if test "x$path" != "x$new_path"; then
58218    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58221  fi
58222
58223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58224
58225  path="$POTENTIAL_FREETYPE_LIB_PATH"
58226  has_colon=`$ECHO $path | $GREP ^.:`
58227  new_path="$path"
58228  if test "x$has_colon" = x; then
58229    # Not in mixed or Windows style, start by that.
58230    new_path=`cmd //c echo $path`
58231  fi
58232
58233
58234  input_path="$new_path"
58235  # Check if we need to convert this using DOS-style short mode. If the path
58236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58237  # take no chances and rewrite it.
58238  # Note: m4 eats our [], so we need to use [ and ] instead.
58239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58240  if test "x$has_forbidden_chars" != x; then
58241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58243  fi
58244
58245
58246  windows_path="$new_path"
58247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58248    unix_path=`$CYGPATH -u "$windows_path"`
58249    new_path="$unix_path"
58250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58252    new_path="$unix_path"
58253  fi
58254
58255  if test "x$path" != "x$new_path"; then
58256    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58259  fi
58260
58261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58263
58264    else
58265      # We're on a unix platform. Hooray! :)
58266      path="$POTENTIAL_FREETYPE_LIB_PATH"
58267      has_space=`$ECHO "$path" | $GREP " "`
58268      if test "x$has_space" != x; then
58269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58272      fi
58273
58274      # Use eval to expand a potential ~
58275      eval path="$path"
58276      if test ! -f "$path" && test ! -d "$path"; then
58277        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58278      fi
58279
58280      if test -d "$path"; then
58281        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58282      else
58283        dir="`$DIRNAME "$path"`"
58284        base="`$BASENAME "$path"`"
58285        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58286      fi
58287    fi
58288  fi
58289
58290
58291    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58293$as_echo_n "checking for freetype includes... " >&6; }
58294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58295$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58296    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58298$as_echo_n "checking for freetype libraries... " >&6; }
58299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58300$as_echo "$FREETYPE_LIB_PATH" >&6; }
58301  fi
58302
58303          fi
58304          if test "x$FOUND_FREETYPE" != xyes; then
58305            FREETYPE_BASE_DIR="$HOME/freetype"
58306
58307  windows_path="$FREETYPE_BASE_DIR"
58308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58309    unix_path=`$CYGPATH -u "$windows_path"`
58310    FREETYPE_BASE_DIR="$unix_path"
58311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58313    FREETYPE_BASE_DIR="$unix_path"
58314  fi
58315
58316            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58317
58318  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58319  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58320  METHOD="well-known location"
58321
58322  # Let's start with an optimistic view of the world :-)
58323  FOUND_FREETYPE=yes
58324
58325  # First look for the canonical freetype main include file ft2build.h.
58326  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58327    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58328    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58329    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58330      # Fail.
58331      FOUND_FREETYPE=no
58332    fi
58333  fi
58334
58335  if test "x$FOUND_FREETYPE" = xyes; then
58336    # Include file found, let's continue the sanity check.
58337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58338$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58339
58340    # Reset to default value
58341    FREETYPE_BASE_NAME=freetype
58342    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58343    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58344      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58345          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58346        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58347        # for the .6 version explicitly.
58348        FREETYPE_BASE_NAME=freetype.6
58349        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58350        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58351$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58352      else
58353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58354$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58355        FOUND_FREETYPE=no
58356      fi
58357    else
58358      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58359        # On Windows, we will need both .lib and .dll file.
58360        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58361          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58362$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58363          FOUND_FREETYPE=no
58364        fi
58365      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58366          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58367        # Found lib in isa dir, use that instead.
58368        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58369        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58370$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58371      fi
58372    fi
58373  fi
58374
58375  if test "x$FOUND_FREETYPE" = xyes; then
58376
58377  # Only process if variable expands to non-empty
58378
58379  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58381
58382  # Input might be given as Windows format, start by converting to
58383  # unix format.
58384  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58385  new_path=`$CYGPATH -u "$path"`
58386
58387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58390  # "foo.exe" is OK but "foo" is an error.
58391  #
58392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58393  # It is also a way to make sure we got the proper file name for the real test later on.
58394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58395  if test "x$test_shortpath" = x; then
58396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58398    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58399  fi
58400
58401  # Call helper function which possibly converts this using DOS-style short mode.
58402  # If so, the updated path is stored in $new_path.
58403
58404  input_path="$new_path"
58405  # Check if we need to convert this using DOS-style short mode. If the path
58406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58407  # take no chances and rewrite it.
58408  # Note: m4 eats our [], so we need to use [ and ] instead.
58409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58410  if test "x$has_forbidden_chars" != x; then
58411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58415      # Going to short mode and back again did indeed matter. Since short mode is
58416      # case insensitive, let's make it lowercase to improve readability.
58417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58418      # Now convert it back to Unix-style (cygpath)
58419      input_path=`$CYGPATH -u "$shortmode_path"`
58420      new_path="$input_path"
58421    fi
58422  fi
58423
58424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58425  if test "x$test_cygdrive_prefix" = x; then
58426    # As a simple fix, exclude /usr/bin since it's not a real path.
58427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58429      # a path prefixed by /cygdrive for fixpath to work.
58430      new_path="$CYGWIN_ROOT_PATH$input_path"
58431    fi
58432  fi
58433
58434
58435  if test "x$path" != "x$new_path"; then
58436    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58439  fi
58440
58441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58442
58443  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58444  has_colon=`$ECHO $path | $GREP ^.:`
58445  new_path="$path"
58446  if test "x$has_colon" = x; then
58447    # Not in mixed or Windows style, start by that.
58448    new_path=`cmd //c echo $path`
58449  fi
58450
58451
58452  input_path="$new_path"
58453  # Check if we need to convert this using DOS-style short mode. If the path
58454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58455  # take no chances and rewrite it.
58456  # Note: m4 eats our [], so we need to use [ and ] instead.
58457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58458  if test "x$has_forbidden_chars" != x; then
58459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58461  fi
58462
58463
58464  windows_path="$new_path"
58465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58466    unix_path=`$CYGPATH -u "$windows_path"`
58467    new_path="$unix_path"
58468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58470    new_path="$unix_path"
58471  fi
58472
58473  if test "x$path" != "x$new_path"; then
58474    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58476$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58477  fi
58478
58479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58481
58482    else
58483      # We're on a unix platform. Hooray! :)
58484      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58485      has_space=`$ECHO "$path" | $GREP " "`
58486      if test "x$has_space" != x; then
58487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58490      fi
58491
58492      # Use eval to expand a potential ~
58493      eval path="$path"
58494      if test ! -f "$path" && test ! -d "$path"; then
58495        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58496      fi
58497
58498      if test -d "$path"; then
58499        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58500      else
58501        dir="`$DIRNAME "$path"`"
58502        base="`$BASENAME "$path"`"
58503        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58504      fi
58505    fi
58506  fi
58507
58508
58509  # Only process if variable expands to non-empty
58510
58511  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58513
58514  # Input might be given as Windows format, start by converting to
58515  # unix format.
58516  path="$POTENTIAL_FREETYPE_LIB_PATH"
58517  new_path=`$CYGPATH -u "$path"`
58518
58519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58522  # "foo.exe" is OK but "foo" is an error.
58523  #
58524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58525  # It is also a way to make sure we got the proper file name for the real test later on.
58526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58527  if test "x$test_shortpath" = x; then
58528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58529$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58530    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58531  fi
58532
58533  # Call helper function which possibly converts this using DOS-style short mode.
58534  # If so, the updated path is stored in $new_path.
58535
58536  input_path="$new_path"
58537  # Check if we need to convert this using DOS-style short mode. If the path
58538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58539  # take no chances and rewrite it.
58540  # Note: m4 eats our [], so we need to use [ and ] instead.
58541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58542  if test "x$has_forbidden_chars" != x; then
58543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58547      # Going to short mode and back again did indeed matter. Since short mode is
58548      # case insensitive, let's make it lowercase to improve readability.
58549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58550      # Now convert it back to Unix-style (cygpath)
58551      input_path=`$CYGPATH -u "$shortmode_path"`
58552      new_path="$input_path"
58553    fi
58554  fi
58555
58556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58557  if test "x$test_cygdrive_prefix" = x; then
58558    # As a simple fix, exclude /usr/bin since it's not a real path.
58559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58561      # a path prefixed by /cygdrive for fixpath to work.
58562      new_path="$CYGWIN_ROOT_PATH$input_path"
58563    fi
58564  fi
58565
58566
58567  if test "x$path" != "x$new_path"; then
58568    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58570$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58571  fi
58572
58573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58574
58575  path="$POTENTIAL_FREETYPE_LIB_PATH"
58576  has_colon=`$ECHO $path | $GREP ^.:`
58577  new_path="$path"
58578  if test "x$has_colon" = x; then
58579    # Not in mixed or Windows style, start by that.
58580    new_path=`cmd //c echo $path`
58581  fi
58582
58583
58584  input_path="$new_path"
58585  # Check if we need to convert this using DOS-style short mode. If the path
58586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58587  # take no chances and rewrite it.
58588  # Note: m4 eats our [], so we need to use [ and ] instead.
58589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58590  if test "x$has_forbidden_chars" != x; then
58591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58593  fi
58594
58595
58596  windows_path="$new_path"
58597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58598    unix_path=`$CYGPATH -u "$windows_path"`
58599    new_path="$unix_path"
58600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58602    new_path="$unix_path"
58603  fi
58604
58605  if test "x$path" != "x$new_path"; then
58606    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58608$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58609  fi
58610
58611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58613
58614    else
58615      # We're on a unix platform. Hooray! :)
58616      path="$POTENTIAL_FREETYPE_LIB_PATH"
58617      has_space=`$ECHO "$path" | $GREP " "`
58618      if test "x$has_space" != x; then
58619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58620$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58622      fi
58623
58624      # Use eval to expand a potential ~
58625      eval path="$path"
58626      if test ! -f "$path" && test ! -d "$path"; then
58627        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58628      fi
58629
58630      if test -d "$path"; then
58631        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58632      else
58633        dir="`$DIRNAME "$path"`"
58634        base="`$BASENAME "$path"`"
58635        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58636      fi
58637    fi
58638  fi
58639
58640
58641    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58643$as_echo_n "checking for freetype includes... " >&6; }
58644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58645$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58646    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58648$as_echo_n "checking for freetype libraries... " >&6; }
58649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58650$as_echo "$FREETYPE_LIB_PATH" >&6; }
58651  fi
58652
58653            else
58654
58655  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58656  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58657  METHOD="well-known location"
58658
58659  # Let's start with an optimistic view of the world :-)
58660  FOUND_FREETYPE=yes
58661
58662  # First look for the canonical freetype main include file ft2build.h.
58663  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58664    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58665    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58666    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58667      # Fail.
58668      FOUND_FREETYPE=no
58669    fi
58670  fi
58671
58672  if test "x$FOUND_FREETYPE" = xyes; then
58673    # Include file found, let's continue the sanity check.
58674    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58675$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58676
58677    # Reset to default value
58678    FREETYPE_BASE_NAME=freetype
58679    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58680    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58681      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58682          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58683        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58684        # for the .6 version explicitly.
58685        FREETYPE_BASE_NAME=freetype.6
58686        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58687        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58688$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58689      else
58690        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58691$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58692        FOUND_FREETYPE=no
58693      fi
58694    else
58695      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58696        # On Windows, we will need both .lib and .dll file.
58697        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58698          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58699$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58700          FOUND_FREETYPE=no
58701        fi
58702      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58703          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58704        # Found lib in isa dir, use that instead.
58705        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58706        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58707$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58708      fi
58709    fi
58710  fi
58711
58712  if test "x$FOUND_FREETYPE" = xyes; then
58713
58714  # Only process if variable expands to non-empty
58715
58716  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58718
58719  # Input might be given as Windows format, start by converting to
58720  # unix format.
58721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58722  new_path=`$CYGPATH -u "$path"`
58723
58724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58727  # "foo.exe" is OK but "foo" is an error.
58728  #
58729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58730  # It is also a way to make sure we got the proper file name for the real test later on.
58731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58732  if test "x$test_shortpath" = x; then
58733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58735    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58736  fi
58737
58738  # Call helper function which possibly converts this using DOS-style short mode.
58739  # If so, the updated path is stored in $new_path.
58740
58741  input_path="$new_path"
58742  # Check if we need to convert this using DOS-style short mode. If the path
58743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58744  # take no chances and rewrite it.
58745  # Note: m4 eats our [], so we need to use [ and ] instead.
58746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58747  if test "x$has_forbidden_chars" != x; then
58748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58752      # Going to short mode and back again did indeed matter. Since short mode is
58753      # case insensitive, let's make it lowercase to improve readability.
58754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58755      # Now convert it back to Unix-style (cygpath)
58756      input_path=`$CYGPATH -u "$shortmode_path"`
58757      new_path="$input_path"
58758    fi
58759  fi
58760
58761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58762  if test "x$test_cygdrive_prefix" = x; then
58763    # As a simple fix, exclude /usr/bin since it's not a real path.
58764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58766      # a path prefixed by /cygdrive for fixpath to work.
58767      new_path="$CYGWIN_ROOT_PATH$input_path"
58768    fi
58769  fi
58770
58771
58772  if test "x$path" != "x$new_path"; then
58773    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58776  fi
58777
58778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58779
58780  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58781  has_colon=`$ECHO $path | $GREP ^.:`
58782  new_path="$path"
58783  if test "x$has_colon" = x; then
58784    # Not in mixed or Windows style, start by that.
58785    new_path=`cmd //c echo $path`
58786  fi
58787
58788
58789  input_path="$new_path"
58790  # Check if we need to convert this using DOS-style short mode. If the path
58791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58792  # take no chances and rewrite it.
58793  # Note: m4 eats our [], so we need to use [ and ] instead.
58794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58795  if test "x$has_forbidden_chars" != x; then
58796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58798  fi
58799
58800
58801  windows_path="$new_path"
58802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58803    unix_path=`$CYGPATH -u "$windows_path"`
58804    new_path="$unix_path"
58805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58807    new_path="$unix_path"
58808  fi
58809
58810  if test "x$path" != "x$new_path"; then
58811    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58814  fi
58815
58816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58818
58819    else
58820      # We're on a unix platform. Hooray! :)
58821      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58822      has_space=`$ECHO "$path" | $GREP " "`
58823      if test "x$has_space" != x; then
58824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58827      fi
58828
58829      # Use eval to expand a potential ~
58830      eval path="$path"
58831      if test ! -f "$path" && test ! -d "$path"; then
58832        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58833      fi
58834
58835      if test -d "$path"; then
58836        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58837      else
58838        dir="`$DIRNAME "$path"`"
58839        base="`$BASENAME "$path"`"
58840        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58841      fi
58842    fi
58843  fi
58844
58845
58846  # Only process if variable expands to non-empty
58847
58848  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58850
58851  # Input might be given as Windows format, start by converting to
58852  # unix format.
58853  path="$POTENTIAL_FREETYPE_LIB_PATH"
58854  new_path=`$CYGPATH -u "$path"`
58855
58856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58859  # "foo.exe" is OK but "foo" is an error.
58860  #
58861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58862  # It is also a way to make sure we got the proper file name for the real test later on.
58863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58864  if test "x$test_shortpath" = x; then
58865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58867    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58868  fi
58869
58870  # Call helper function which possibly converts this using DOS-style short mode.
58871  # If so, the updated path is stored in $new_path.
58872
58873  input_path="$new_path"
58874  # Check if we need to convert this using DOS-style short mode. If the path
58875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58876  # take no chances and rewrite it.
58877  # Note: m4 eats our [], so we need to use [ and ] instead.
58878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58879  if test "x$has_forbidden_chars" != x; then
58880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58884      # Going to short mode and back again did indeed matter. Since short mode is
58885      # case insensitive, let's make it lowercase to improve readability.
58886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58887      # Now convert it back to Unix-style (cygpath)
58888      input_path=`$CYGPATH -u "$shortmode_path"`
58889      new_path="$input_path"
58890    fi
58891  fi
58892
58893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58894  if test "x$test_cygdrive_prefix" = x; then
58895    # As a simple fix, exclude /usr/bin since it's not a real path.
58896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58898      # a path prefixed by /cygdrive for fixpath to work.
58899      new_path="$CYGWIN_ROOT_PATH$input_path"
58900    fi
58901  fi
58902
58903
58904  if test "x$path" != "x$new_path"; then
58905    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58907$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58908  fi
58909
58910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58911
58912  path="$POTENTIAL_FREETYPE_LIB_PATH"
58913  has_colon=`$ECHO $path | $GREP ^.:`
58914  new_path="$path"
58915  if test "x$has_colon" = x; then
58916    # Not in mixed or Windows style, start by that.
58917    new_path=`cmd //c echo $path`
58918  fi
58919
58920
58921  input_path="$new_path"
58922  # Check if we need to convert this using DOS-style short mode. If the path
58923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58924  # take no chances and rewrite it.
58925  # Note: m4 eats our [], so we need to use [ and ] instead.
58926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58927  if test "x$has_forbidden_chars" != x; then
58928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58930  fi
58931
58932
58933  windows_path="$new_path"
58934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58935    unix_path=`$CYGPATH -u "$windows_path"`
58936    new_path="$unix_path"
58937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58939    new_path="$unix_path"
58940  fi
58941
58942  if test "x$path" != "x$new_path"; then
58943    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58946  fi
58947
58948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58950
58951    else
58952      # We're on a unix platform. Hooray! :)
58953      path="$POTENTIAL_FREETYPE_LIB_PATH"
58954      has_space=`$ECHO "$path" | $GREP " "`
58955      if test "x$has_space" != x; then
58956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58959      fi
58960
58961      # Use eval to expand a potential ~
58962      eval path="$path"
58963      if test ! -f "$path" && test ! -d "$path"; then
58964        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58965      fi
58966
58967      if test -d "$path"; then
58968        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58969      else
58970        dir="`$DIRNAME "$path"`"
58971        base="`$BASENAME "$path"`"
58972        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58973      fi
58974    fi
58975  fi
58976
58977
58978    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58980$as_echo_n "checking for freetype includes... " >&6; }
58981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58982$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58983    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58985$as_echo_n "checking for freetype libraries... " >&6; }
58986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58987$as_echo "$FREETYPE_LIB_PATH" >&6; }
58988  fi
58989
58990            fi
58991            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58992                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58993              # Source is available, as a last resort try to build freetype in default location
58994
58995  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58996  BUILD_FREETYPE=yes
58997
58998  # Check if the freetype sources are acessible..
58999  if ! test -d $FREETYPE_SRC_PATH; then
59000    { $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
59001$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59002    BUILD_FREETYPE=no
59003  fi
59004  # ..and contain a vc2010 project file
59005  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59006  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59007    { $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
59008$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59009    BUILD_FREETYPE=no
59010  fi
59011  # Now check if configure found a version of 'msbuild.exe'
59012  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59013    { $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
59014$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;}
59015    BUILD_FREETYPE=no
59016  fi
59017
59018  # Ready to go..
59019  if test "x$BUILD_FREETYPE" = xyes; then
59020    # msbuild requires trailing slashes for output directories
59021    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59022    freetype_lib_path_unix="$freetype_lib_path"
59023    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59024
59025  unix_path="$vcxproj_path"
59026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59027    windows_path=`$CYGPATH -m "$unix_path"`
59028    vcxproj_path="$windows_path"
59029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59030    windows_path=`cmd //c echo $unix_path`
59031    vcxproj_path="$windows_path"
59032  fi
59033
59034
59035  unix_path="$freetype_lib_path"
59036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59037    windows_path=`$CYGPATH -m "$unix_path"`
59038    freetype_lib_path="$windows_path"
59039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59040    windows_path=`cmd //c echo $unix_path`
59041    freetype_lib_path="$windows_path"
59042  fi
59043
59044
59045  unix_path="$freetype_obj_path"
59046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59047    windows_path=`$CYGPATH -m "$unix_path"`
59048    freetype_obj_path="$windows_path"
59049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59050    windows_path=`cmd //c echo $unix_path`
59051    freetype_obj_path="$windows_path"
59052  fi
59053
59054    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59055      freetype_platform=x64
59056    else
59057      freetype_platform=win32
59058    fi
59059
59060    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59061    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59062    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59063    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59064    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59065$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59066
59067    # First we try to build the freetype.dll
59068    $ECHO -e "@echo off\n"\
59069        "$MSBUILD $vcxproj_path "\
59070        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59071        "/p:Configuration=\"Release Multithreaded\" "\
59072        "/p:Platform=$freetype_platform "\
59073        "/p:ConfigurationType=DynamicLibrary "\
59074        "/p:TargetName=freetype "\
59075        "/p:OutDir=\"$freetype_lib_path\" "\
59076        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59077    cmd /c freetype.bat
59078
59079    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59080      # If that succeeds we also build freetype.lib
59081      $ECHO -e "@echo off\n"\
59082          "$MSBUILD $vcxproj_path "\
59083          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59084          "/p:Configuration=\"Release Multithreaded\" "\
59085          "/p:Platform=$freetype_platform "\
59086          "/p:ConfigurationType=StaticLibrary "\
59087          "/p:TargetName=freetype "\
59088          "/p:OutDir=\"$freetype_lib_path\" "\
59089          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59090      cmd /c freetype.bat
59091
59092      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59093        # Once we build both, lib and dll, set freetype lib and include path appropriately
59094        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59095        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59096        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59097$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59098      else
59099        BUILD_FREETYPE=no
59100      fi
59101    else
59102      BUILD_FREETYPE=no
59103    fi
59104  fi
59105
59106              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59107
59108  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59109  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59110  METHOD="well-known location"
59111
59112  # Let's start with an optimistic view of the world :-)
59113  FOUND_FREETYPE=yes
59114
59115  # First look for the canonical freetype main include file ft2build.h.
59116  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59117    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59118    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59119    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59120      # Fail.
59121      FOUND_FREETYPE=no
59122    fi
59123  fi
59124
59125  if test "x$FOUND_FREETYPE" = xyes; then
59126    # Include file found, let's continue the sanity check.
59127    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59128$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59129
59130    # Reset to default value
59131    FREETYPE_BASE_NAME=freetype
59132    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59133    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59134      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59135          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59136        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59137        # for the .6 version explicitly.
59138        FREETYPE_BASE_NAME=freetype.6
59139        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59140        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59141$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59142      else
59143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59144$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59145        FOUND_FREETYPE=no
59146      fi
59147    else
59148      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59149        # On Windows, we will need both .lib and .dll file.
59150        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59151          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59152$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59153          FOUND_FREETYPE=no
59154        fi
59155      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59156          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59157        # Found lib in isa dir, use that instead.
59158        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59159        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59160$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59161      fi
59162    fi
59163  fi
59164
59165  if test "x$FOUND_FREETYPE" = xyes; then
59166
59167  # Only process if variable expands to non-empty
59168
59169  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59171
59172  # Input might be given as Windows format, start by converting to
59173  # unix format.
59174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59175  new_path=`$CYGPATH -u "$path"`
59176
59177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59180  # "foo.exe" is OK but "foo" is an error.
59181  #
59182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59183  # It is also a way to make sure we got the proper file name for the real test later on.
59184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59185  if test "x$test_shortpath" = x; then
59186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59188    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59189  fi
59190
59191  # Call helper function which possibly converts this using DOS-style short mode.
59192  # If so, the updated path is stored in $new_path.
59193
59194  input_path="$new_path"
59195  # Check if we need to convert this using DOS-style short mode. If the path
59196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59197  # take no chances and rewrite it.
59198  # Note: m4 eats our [], so we need to use [ and ] instead.
59199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59200  if test "x$has_forbidden_chars" != x; then
59201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59205      # Going to short mode and back again did indeed matter. Since short mode is
59206      # case insensitive, let's make it lowercase to improve readability.
59207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59208      # Now convert it back to Unix-style (cygpath)
59209      input_path=`$CYGPATH -u "$shortmode_path"`
59210      new_path="$input_path"
59211    fi
59212  fi
59213
59214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59215  if test "x$test_cygdrive_prefix" = x; then
59216    # As a simple fix, exclude /usr/bin since it's not a real path.
59217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59219      # a path prefixed by /cygdrive for fixpath to work.
59220      new_path="$CYGWIN_ROOT_PATH$input_path"
59221    fi
59222  fi
59223
59224
59225  if test "x$path" != "x$new_path"; then
59226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59229  fi
59230
59231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59232
59233  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59234  has_colon=`$ECHO $path | $GREP ^.:`
59235  new_path="$path"
59236  if test "x$has_colon" = x; then
59237    # Not in mixed or Windows style, start by that.
59238    new_path=`cmd //c echo $path`
59239  fi
59240
59241
59242  input_path="$new_path"
59243  # Check if we need to convert this using DOS-style short mode. If the path
59244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59245  # take no chances and rewrite it.
59246  # Note: m4 eats our [], so we need to use [ and ] instead.
59247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59248  if test "x$has_forbidden_chars" != x; then
59249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59251  fi
59252
59253
59254  windows_path="$new_path"
59255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59256    unix_path=`$CYGPATH -u "$windows_path"`
59257    new_path="$unix_path"
59258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59260    new_path="$unix_path"
59261  fi
59262
59263  if test "x$path" != "x$new_path"; then
59264    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59266$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59267  fi
59268
59269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59271
59272    else
59273      # We're on a unix platform. Hooray! :)
59274      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59275      has_space=`$ECHO "$path" | $GREP " "`
59276      if test "x$has_space" != x; then
59277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59278$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59280      fi
59281
59282      # Use eval to expand a potential ~
59283      eval path="$path"
59284      if test ! -f "$path" && test ! -d "$path"; then
59285        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59286      fi
59287
59288      if test -d "$path"; then
59289        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59290      else
59291        dir="`$DIRNAME "$path"`"
59292        base="`$BASENAME "$path"`"
59293        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59294      fi
59295    fi
59296  fi
59297
59298
59299  # Only process if variable expands to non-empty
59300
59301  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59303
59304  # Input might be given as Windows format, start by converting to
59305  # unix format.
59306  path="$POTENTIAL_FREETYPE_LIB_PATH"
59307  new_path=`$CYGPATH -u "$path"`
59308
59309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59312  # "foo.exe" is OK but "foo" is an error.
59313  #
59314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59315  # It is also a way to make sure we got the proper file name for the real test later on.
59316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59317  if test "x$test_shortpath" = x; then
59318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59321  fi
59322
59323  # Call helper function which possibly converts this using DOS-style short mode.
59324  # If so, the updated path is stored in $new_path.
59325
59326  input_path="$new_path"
59327  # Check if we need to convert this using DOS-style short mode. If the path
59328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59329  # take no chances and rewrite it.
59330  # Note: m4 eats our [], so we need to use [ and ] instead.
59331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59332  if test "x$has_forbidden_chars" != x; then
59333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59337      # Going to short mode and back again did indeed matter. Since short mode is
59338      # case insensitive, let's make it lowercase to improve readability.
59339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59340      # Now convert it back to Unix-style (cygpath)
59341      input_path=`$CYGPATH -u "$shortmode_path"`
59342      new_path="$input_path"
59343    fi
59344  fi
59345
59346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59347  if test "x$test_cygdrive_prefix" = x; then
59348    # As a simple fix, exclude /usr/bin since it's not a real path.
59349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59351      # a path prefixed by /cygdrive for fixpath to work.
59352      new_path="$CYGWIN_ROOT_PATH$input_path"
59353    fi
59354  fi
59355
59356
59357  if test "x$path" != "x$new_path"; then
59358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59361  fi
59362
59363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59364
59365  path="$POTENTIAL_FREETYPE_LIB_PATH"
59366  has_colon=`$ECHO $path | $GREP ^.:`
59367  new_path="$path"
59368  if test "x$has_colon" = x; then
59369    # Not in mixed or Windows style, start by that.
59370    new_path=`cmd //c echo $path`
59371  fi
59372
59373
59374  input_path="$new_path"
59375  # Check if we need to convert this using DOS-style short mode. If the path
59376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59377  # take no chances and rewrite it.
59378  # Note: m4 eats our [], so we need to use [ and ] instead.
59379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59380  if test "x$has_forbidden_chars" != x; then
59381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59383  fi
59384
59385
59386  windows_path="$new_path"
59387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59388    unix_path=`$CYGPATH -u "$windows_path"`
59389    new_path="$unix_path"
59390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59392    new_path="$unix_path"
59393  fi
59394
59395  if test "x$path" != "x$new_path"; then
59396    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59399  fi
59400
59401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59403
59404    else
59405      # We're on a unix platform. Hooray! :)
59406      path="$POTENTIAL_FREETYPE_LIB_PATH"
59407      has_space=`$ECHO "$path" | $GREP " "`
59408      if test "x$has_space" != x; then
59409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59412      fi
59413
59414      # Use eval to expand a potential ~
59415      eval path="$path"
59416      if test ! -f "$path" && test ! -d "$path"; then
59417        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59418      fi
59419
59420      if test -d "$path"; then
59421        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59422      else
59423        dir="`$DIRNAME "$path"`"
59424        base="`$BASENAME "$path"`"
59425        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59426      fi
59427    fi
59428  fi
59429
59430
59431    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59433$as_echo_n "checking for freetype includes... " >&6; }
59434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59435$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59436    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59438$as_echo_n "checking for freetype libraries... " >&6; }
59439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59440$as_echo "$FREETYPE_LIB_PATH" >&6; }
59441  fi
59442
59443              else
59444
59445  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59446  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59447  METHOD="well-known location"
59448
59449  # Let's start with an optimistic view of the world :-)
59450  FOUND_FREETYPE=yes
59451
59452  # First look for the canonical freetype main include file ft2build.h.
59453  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59454    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59455    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59456    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59457      # Fail.
59458      FOUND_FREETYPE=no
59459    fi
59460  fi
59461
59462  if test "x$FOUND_FREETYPE" = xyes; then
59463    # Include file found, let's continue the sanity check.
59464    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59465$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59466
59467    # Reset to default value
59468    FREETYPE_BASE_NAME=freetype
59469    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59470    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59471      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59472          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59473        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59474        # for the .6 version explicitly.
59475        FREETYPE_BASE_NAME=freetype.6
59476        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59477        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59478$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59479      else
59480        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59481$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59482        FOUND_FREETYPE=no
59483      fi
59484    else
59485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59486        # On Windows, we will need both .lib and .dll file.
59487        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59488          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59490          FOUND_FREETYPE=no
59491        fi
59492      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59493          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59494        # Found lib in isa dir, use that instead.
59495        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59496        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59497$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59498      fi
59499    fi
59500  fi
59501
59502  if test "x$FOUND_FREETYPE" = xyes; then
59503
59504  # Only process if variable expands to non-empty
59505
59506  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59508
59509  # Input might be given as Windows format, start by converting to
59510  # unix format.
59511  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59512  new_path=`$CYGPATH -u "$path"`
59513
59514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59517  # "foo.exe" is OK but "foo" is an error.
59518  #
59519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59520  # It is also a way to make sure we got the proper file name for the real test later on.
59521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59522  if test "x$test_shortpath" = x; then
59523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59525    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59526  fi
59527
59528  # Call helper function which possibly converts this using DOS-style short mode.
59529  # If so, the updated path is stored in $new_path.
59530
59531  input_path="$new_path"
59532  # Check if we need to convert this using DOS-style short mode. If the path
59533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59534  # take no chances and rewrite it.
59535  # Note: m4 eats our [], so we need to use [ and ] instead.
59536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59537  if test "x$has_forbidden_chars" != x; then
59538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59542      # Going to short mode and back again did indeed matter. Since short mode is
59543      # case insensitive, let's make it lowercase to improve readability.
59544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59545      # Now convert it back to Unix-style (cygpath)
59546      input_path=`$CYGPATH -u "$shortmode_path"`
59547      new_path="$input_path"
59548    fi
59549  fi
59550
59551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59552  if test "x$test_cygdrive_prefix" = x; then
59553    # As a simple fix, exclude /usr/bin since it's not a real path.
59554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59556      # a path prefixed by /cygdrive for fixpath to work.
59557      new_path="$CYGWIN_ROOT_PATH$input_path"
59558    fi
59559  fi
59560
59561
59562  if test "x$path" != "x$new_path"; then
59563    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59566  fi
59567
59568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59569
59570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59571  has_colon=`$ECHO $path | $GREP ^.:`
59572  new_path="$path"
59573  if test "x$has_colon" = x; then
59574    # Not in mixed or Windows style, start by that.
59575    new_path=`cmd //c echo $path`
59576  fi
59577
59578
59579  input_path="$new_path"
59580  # Check if we need to convert this using DOS-style short mode. If the path
59581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59582  # take no chances and rewrite it.
59583  # Note: m4 eats our [], so we need to use [ and ] instead.
59584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59585  if test "x$has_forbidden_chars" != x; then
59586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59588  fi
59589
59590
59591  windows_path="$new_path"
59592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59593    unix_path=`$CYGPATH -u "$windows_path"`
59594    new_path="$unix_path"
59595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59597    new_path="$unix_path"
59598  fi
59599
59600  if test "x$path" != "x$new_path"; then
59601    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59604  fi
59605
59606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59608
59609    else
59610      # We're on a unix platform. Hooray! :)
59611      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59612      has_space=`$ECHO "$path" | $GREP " "`
59613      if test "x$has_space" != x; then
59614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59616        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59617      fi
59618
59619      # Use eval to expand a potential ~
59620      eval path="$path"
59621      if test ! -f "$path" && test ! -d "$path"; then
59622        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59623      fi
59624
59625      if test -d "$path"; then
59626        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59627      else
59628        dir="`$DIRNAME "$path"`"
59629        base="`$BASENAME "$path"`"
59630        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59631      fi
59632    fi
59633  fi
59634
59635
59636  # Only process if variable expands to non-empty
59637
59638  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59640
59641  # Input might be given as Windows format, start by converting to
59642  # unix format.
59643  path="$POTENTIAL_FREETYPE_LIB_PATH"
59644  new_path=`$CYGPATH -u "$path"`
59645
59646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59649  # "foo.exe" is OK but "foo" is an error.
59650  #
59651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59652  # It is also a way to make sure we got the proper file name for the real test later on.
59653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59654  if test "x$test_shortpath" = x; then
59655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59657    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59658  fi
59659
59660  # Call helper function which possibly converts this using DOS-style short mode.
59661  # If so, the updated path is stored in $new_path.
59662
59663  input_path="$new_path"
59664  # Check if we need to convert this using DOS-style short mode. If the path
59665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59666  # take no chances and rewrite it.
59667  # Note: m4 eats our [], so we need to use [ and ] instead.
59668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59669  if test "x$has_forbidden_chars" != x; then
59670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59674      # Going to short mode and back again did indeed matter. Since short mode is
59675      # case insensitive, let's make it lowercase to improve readability.
59676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59677      # Now convert it back to Unix-style (cygpath)
59678      input_path=`$CYGPATH -u "$shortmode_path"`
59679      new_path="$input_path"
59680    fi
59681  fi
59682
59683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59684  if test "x$test_cygdrive_prefix" = x; then
59685    # As a simple fix, exclude /usr/bin since it's not a real path.
59686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59688      # a path prefixed by /cygdrive for fixpath to work.
59689      new_path="$CYGWIN_ROOT_PATH$input_path"
59690    fi
59691  fi
59692
59693
59694  if test "x$path" != "x$new_path"; then
59695    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59697$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59698  fi
59699
59700    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59701
59702  path="$POTENTIAL_FREETYPE_LIB_PATH"
59703  has_colon=`$ECHO $path | $GREP ^.:`
59704  new_path="$path"
59705  if test "x$has_colon" = x; then
59706    # Not in mixed or Windows style, start by that.
59707    new_path=`cmd //c echo $path`
59708  fi
59709
59710
59711  input_path="$new_path"
59712  # Check if we need to convert this using DOS-style short mode. If the path
59713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59714  # take no chances and rewrite it.
59715  # Note: m4 eats our [], so we need to use [ and ] instead.
59716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59717  if test "x$has_forbidden_chars" != x; then
59718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59720  fi
59721
59722
59723  windows_path="$new_path"
59724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59725    unix_path=`$CYGPATH -u "$windows_path"`
59726    new_path="$unix_path"
59727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59729    new_path="$unix_path"
59730  fi
59731
59732  if test "x$path" != "x$new_path"; then
59733    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59735$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59736  fi
59737
59738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59740
59741    else
59742      # We're on a unix platform. Hooray! :)
59743      path="$POTENTIAL_FREETYPE_LIB_PATH"
59744      has_space=`$ECHO "$path" | $GREP " "`
59745      if test "x$has_space" != x; then
59746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59747$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59748        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59749      fi
59750
59751      # Use eval to expand a potential ~
59752      eval path="$path"
59753      if test ! -f "$path" && test ! -d "$path"; then
59754        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59755      fi
59756
59757      if test -d "$path"; then
59758        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59759      else
59760        dir="`$DIRNAME "$path"`"
59761        base="`$BASENAME "$path"`"
59762        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59763      fi
59764    fi
59765  fi
59766
59767
59768    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59770$as_echo_n "checking for freetype includes... " >&6; }
59771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59772$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59773    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59775$as_echo_n "checking for freetype libraries... " >&6; }
59776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59777$as_echo "$FREETYPE_LIB_PATH" >&6; }
59778  fi
59779
59780              fi
59781            fi
59782          fi
59783        else
59784          FREETYPE_BASE_DIR="$SYSROOT/usr"
59785
59786  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59787  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59788  METHOD="well-known location"
59789
59790  # Let's start with an optimistic view of the world :-)
59791  FOUND_FREETYPE=yes
59792
59793  # First look for the canonical freetype main include file ft2build.h.
59794  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59795    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59796    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59797    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59798      # Fail.
59799      FOUND_FREETYPE=no
59800    fi
59801  fi
59802
59803  if test "x$FOUND_FREETYPE" = xyes; then
59804    # Include file found, let's continue the sanity check.
59805    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59806$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59807
59808    # Reset to default value
59809    FREETYPE_BASE_NAME=freetype
59810    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59811    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59812      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59813          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59814        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59815        # for the .6 version explicitly.
59816        FREETYPE_BASE_NAME=freetype.6
59817        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59818        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59819$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59820      else
59821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59822$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59823        FOUND_FREETYPE=no
59824      fi
59825    else
59826      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59827        # On Windows, we will need both .lib and .dll file.
59828        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59829          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59830$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59831          FOUND_FREETYPE=no
59832        fi
59833      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59834          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59835        # Found lib in isa dir, use that instead.
59836        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59837        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59838$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59839      fi
59840    fi
59841  fi
59842
59843  if test "x$FOUND_FREETYPE" = xyes; then
59844
59845  # Only process if variable expands to non-empty
59846
59847  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59849
59850  # Input might be given as Windows format, start by converting to
59851  # unix format.
59852  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59853  new_path=`$CYGPATH -u "$path"`
59854
59855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59858  # "foo.exe" is OK but "foo" is an error.
59859  #
59860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59861  # It is also a way to make sure we got the proper file name for the real test later on.
59862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59863  if test "x$test_shortpath" = x; then
59864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59867  fi
59868
59869  # Call helper function which possibly converts this using DOS-style short mode.
59870  # If so, the updated path is stored in $new_path.
59871
59872  input_path="$new_path"
59873  # Check if we need to convert this using DOS-style short mode. If the path
59874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59875  # take no chances and rewrite it.
59876  # Note: m4 eats our [], so we need to use [ and ] instead.
59877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59878  if test "x$has_forbidden_chars" != x; then
59879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59883      # Going to short mode and back again did indeed matter. Since short mode is
59884      # case insensitive, let's make it lowercase to improve readability.
59885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59886      # Now convert it back to Unix-style (cygpath)
59887      input_path=`$CYGPATH -u "$shortmode_path"`
59888      new_path="$input_path"
59889    fi
59890  fi
59891
59892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59893  if test "x$test_cygdrive_prefix" = x; then
59894    # As a simple fix, exclude /usr/bin since it's not a real path.
59895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59897      # a path prefixed by /cygdrive for fixpath to work.
59898      new_path="$CYGWIN_ROOT_PATH$input_path"
59899    fi
59900  fi
59901
59902
59903  if test "x$path" != "x$new_path"; then
59904    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59907  fi
59908
59909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59910
59911  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59912  has_colon=`$ECHO $path | $GREP ^.:`
59913  new_path="$path"
59914  if test "x$has_colon" = x; then
59915    # Not in mixed or Windows style, start by that.
59916    new_path=`cmd //c echo $path`
59917  fi
59918
59919
59920  input_path="$new_path"
59921  # Check if we need to convert this using DOS-style short mode. If the path
59922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59923  # take no chances and rewrite it.
59924  # Note: m4 eats our [], so we need to use [ and ] instead.
59925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59926  if test "x$has_forbidden_chars" != x; then
59927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59929  fi
59930
59931
59932  windows_path="$new_path"
59933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59934    unix_path=`$CYGPATH -u "$windows_path"`
59935    new_path="$unix_path"
59936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59938    new_path="$unix_path"
59939  fi
59940
59941  if test "x$path" != "x$new_path"; then
59942    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59945  fi
59946
59947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59949
59950    else
59951      # We're on a unix platform. Hooray! :)
59952      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59953      has_space=`$ECHO "$path" | $GREP " "`
59954      if test "x$has_space" != x; then
59955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59958      fi
59959
59960      # Use eval to expand a potential ~
59961      eval path="$path"
59962      if test ! -f "$path" && test ! -d "$path"; then
59963        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59964      fi
59965
59966      if test -d "$path"; then
59967        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59968      else
59969        dir="`$DIRNAME "$path"`"
59970        base="`$BASENAME "$path"`"
59971        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59972      fi
59973    fi
59974  fi
59975
59976
59977  # Only process if variable expands to non-empty
59978
59979  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59981
59982  # Input might be given as Windows format, start by converting to
59983  # unix format.
59984  path="$POTENTIAL_FREETYPE_LIB_PATH"
59985  new_path=`$CYGPATH -u "$path"`
59986
59987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59990  # "foo.exe" is OK but "foo" is an error.
59991  #
59992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59993  # It is also a way to make sure we got the proper file name for the real test later on.
59994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59995  if test "x$test_shortpath" = x; then
59996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59998    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59999  fi
60000
60001  # Call helper function which possibly converts this using DOS-style short mode.
60002  # If so, the updated path is stored in $new_path.
60003
60004  input_path="$new_path"
60005  # Check if we need to convert this using DOS-style short mode. If the path
60006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60007  # take no chances and rewrite it.
60008  # Note: m4 eats our [], so we need to use [ and ] instead.
60009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60010  if test "x$has_forbidden_chars" != x; then
60011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60015      # Going to short mode and back again did indeed matter. Since short mode is
60016      # case insensitive, let's make it lowercase to improve readability.
60017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60018      # Now convert it back to Unix-style (cygpath)
60019      input_path=`$CYGPATH -u "$shortmode_path"`
60020      new_path="$input_path"
60021    fi
60022  fi
60023
60024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60025  if test "x$test_cygdrive_prefix" = x; then
60026    # As a simple fix, exclude /usr/bin since it's not a real path.
60027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60029      # a path prefixed by /cygdrive for fixpath to work.
60030      new_path="$CYGWIN_ROOT_PATH$input_path"
60031    fi
60032  fi
60033
60034
60035  if test "x$path" != "x$new_path"; then
60036    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60038$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60039  fi
60040
60041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60042
60043  path="$POTENTIAL_FREETYPE_LIB_PATH"
60044  has_colon=`$ECHO $path | $GREP ^.:`
60045  new_path="$path"
60046  if test "x$has_colon" = x; then
60047    # Not in mixed or Windows style, start by that.
60048    new_path=`cmd //c echo $path`
60049  fi
60050
60051
60052  input_path="$new_path"
60053  # Check if we need to convert this using DOS-style short mode. If the path
60054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60055  # take no chances and rewrite it.
60056  # Note: m4 eats our [], so we need to use [ and ] instead.
60057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60058  if test "x$has_forbidden_chars" != x; then
60059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60061  fi
60062
60063
60064  windows_path="$new_path"
60065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60066    unix_path=`$CYGPATH -u "$windows_path"`
60067    new_path="$unix_path"
60068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60070    new_path="$unix_path"
60071  fi
60072
60073  if test "x$path" != "x$new_path"; then
60074    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60077  fi
60078
60079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60081
60082    else
60083      # We're on a unix platform. Hooray! :)
60084      path="$POTENTIAL_FREETYPE_LIB_PATH"
60085      has_space=`$ECHO "$path" | $GREP " "`
60086      if test "x$has_space" != x; then
60087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60090      fi
60091
60092      # Use eval to expand a potential ~
60093      eval path="$path"
60094      if test ! -f "$path" && test ! -d "$path"; then
60095        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60096      fi
60097
60098      if test -d "$path"; then
60099        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60100      else
60101        dir="`$DIRNAME "$path"`"
60102        base="`$BASENAME "$path"`"
60103        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60104      fi
60105    fi
60106  fi
60107
60108
60109    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60111$as_echo_n "checking for freetype includes... " >&6; }
60112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60113$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60114    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60116$as_echo_n "checking for freetype libraries... " >&6; }
60117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60118$as_echo "$FREETYPE_LIB_PATH" >&6; }
60119  fi
60120
60121
60122          if test "x$FOUND_FREETYPE" != xyes; then
60123            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60124
60125  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60126  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60127  METHOD="well-known location"
60128
60129  # Let's start with an optimistic view of the world :-)
60130  FOUND_FREETYPE=yes
60131
60132  # First look for the canonical freetype main include file ft2build.h.
60133  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60134    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60135    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60136    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60137      # Fail.
60138      FOUND_FREETYPE=no
60139    fi
60140  fi
60141
60142  if test "x$FOUND_FREETYPE" = xyes; then
60143    # Include file found, let's continue the sanity check.
60144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60145$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60146
60147    # Reset to default value
60148    FREETYPE_BASE_NAME=freetype
60149    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60150    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60151      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60153        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60154        # for the .6 version explicitly.
60155        FREETYPE_BASE_NAME=freetype.6
60156        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60157        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60158$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60159      else
60160        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60162        FOUND_FREETYPE=no
60163      fi
60164    else
60165      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60166        # On Windows, we will need both .lib and .dll file.
60167        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60168          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60169$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60170          FOUND_FREETYPE=no
60171        fi
60172      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60173          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60174        # Found lib in isa dir, use that instead.
60175        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60176        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60177$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60178      fi
60179    fi
60180  fi
60181
60182  if test "x$FOUND_FREETYPE" = xyes; then
60183
60184  # Only process if variable expands to non-empty
60185
60186  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60188
60189  # Input might be given as Windows format, start by converting to
60190  # unix format.
60191  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60192  new_path=`$CYGPATH -u "$path"`
60193
60194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60197  # "foo.exe" is OK but "foo" is an error.
60198  #
60199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60200  # It is also a way to make sure we got the proper file name for the real test later on.
60201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60202  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60206  fi
60207
60208  # Call helper function which possibly converts this using DOS-style short mode.
60209  # If so, the updated path is stored in $new_path.
60210
60211  input_path="$new_path"
60212  # Check if we need to convert this using DOS-style short mode. If the path
60213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60214  # take no chances and rewrite it.
60215  # Note: m4 eats our [], so we need to use [ and ] instead.
60216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60217  if test "x$has_forbidden_chars" != x; then
60218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60222      # Going to short mode and back again did indeed matter. Since short mode is
60223      # case insensitive, let's make it lowercase to improve readability.
60224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60225      # Now convert it back to Unix-style (cygpath)
60226      input_path=`$CYGPATH -u "$shortmode_path"`
60227      new_path="$input_path"
60228    fi
60229  fi
60230
60231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60232  if test "x$test_cygdrive_prefix" = x; then
60233    # As a simple fix, exclude /usr/bin since it's not a real path.
60234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60236      # a path prefixed by /cygdrive for fixpath to work.
60237      new_path="$CYGWIN_ROOT_PATH$input_path"
60238    fi
60239  fi
60240
60241
60242  if test "x$path" != "x$new_path"; then
60243    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60246  fi
60247
60248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60249
60250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60251  has_colon=`$ECHO $path | $GREP ^.:`
60252  new_path="$path"
60253  if test "x$has_colon" = x; then
60254    # Not in mixed or Windows style, start by that.
60255    new_path=`cmd //c echo $path`
60256  fi
60257
60258
60259  input_path="$new_path"
60260  # Check if we need to convert this using DOS-style short mode. If the path
60261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60262  # take no chances and rewrite it.
60263  # Note: m4 eats our [], so we need to use [ and ] instead.
60264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60265  if test "x$has_forbidden_chars" != x; then
60266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60268  fi
60269
60270
60271  windows_path="$new_path"
60272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60273    unix_path=`$CYGPATH -u "$windows_path"`
60274    new_path="$unix_path"
60275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60277    new_path="$unix_path"
60278  fi
60279
60280  if test "x$path" != "x$new_path"; then
60281    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60284  fi
60285
60286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60288
60289    else
60290      # We're on a unix platform. Hooray! :)
60291      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60292      has_space=`$ECHO "$path" | $GREP " "`
60293      if test "x$has_space" != x; then
60294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60297      fi
60298
60299      # Use eval to expand a potential ~
60300      eval path="$path"
60301      if test ! -f "$path" && test ! -d "$path"; then
60302        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60303      fi
60304
60305      if test -d "$path"; then
60306        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60307      else
60308        dir="`$DIRNAME "$path"`"
60309        base="`$BASENAME "$path"`"
60310        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60311      fi
60312    fi
60313  fi
60314
60315
60316  # Only process if variable expands to non-empty
60317
60318  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60320
60321  # Input might be given as Windows format, start by converting to
60322  # unix format.
60323  path="$POTENTIAL_FREETYPE_LIB_PATH"
60324  new_path=`$CYGPATH -u "$path"`
60325
60326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60329  # "foo.exe" is OK but "foo" is an error.
60330  #
60331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60332  # It is also a way to make sure we got the proper file name for the real test later on.
60333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60334  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60338  fi
60339
60340  # Call helper function which possibly converts this using DOS-style short mode.
60341  # If so, the updated path is stored in $new_path.
60342
60343  input_path="$new_path"
60344  # Check if we need to convert this using DOS-style short mode. If the path
60345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60346  # take no chances and rewrite it.
60347  # Note: m4 eats our [], so we need to use [ and ] instead.
60348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60349  if test "x$has_forbidden_chars" != x; then
60350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60354      # Going to short mode and back again did indeed matter. Since short mode is
60355      # case insensitive, let's make it lowercase to improve readability.
60356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60357      # Now convert it back to Unix-style (cygpath)
60358      input_path=`$CYGPATH -u "$shortmode_path"`
60359      new_path="$input_path"
60360    fi
60361  fi
60362
60363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60364  if test "x$test_cygdrive_prefix" = x; then
60365    # As a simple fix, exclude /usr/bin since it's not a real path.
60366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60368      # a path prefixed by /cygdrive for fixpath to work.
60369      new_path="$CYGWIN_ROOT_PATH$input_path"
60370    fi
60371  fi
60372
60373
60374  if test "x$path" != "x$new_path"; then
60375    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60378  fi
60379
60380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60381
60382  path="$POTENTIAL_FREETYPE_LIB_PATH"
60383  has_colon=`$ECHO $path | $GREP ^.:`
60384  new_path="$path"
60385  if test "x$has_colon" = x; then
60386    # Not in mixed or Windows style, start by that.
60387    new_path=`cmd //c echo $path`
60388  fi
60389
60390
60391  input_path="$new_path"
60392  # Check if we need to convert this using DOS-style short mode. If the path
60393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60394  # take no chances and rewrite it.
60395  # Note: m4 eats our [], so we need to use [ and ] instead.
60396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60397  if test "x$has_forbidden_chars" != x; then
60398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60400  fi
60401
60402
60403  windows_path="$new_path"
60404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60405    unix_path=`$CYGPATH -u "$windows_path"`
60406    new_path="$unix_path"
60407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60409    new_path="$unix_path"
60410  fi
60411
60412  if test "x$path" != "x$new_path"; then
60413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60416  fi
60417
60418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60420
60421    else
60422      # We're on a unix platform. Hooray! :)
60423      path="$POTENTIAL_FREETYPE_LIB_PATH"
60424      has_space=`$ECHO "$path" | $GREP " "`
60425      if test "x$has_space" != x; then
60426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60429      fi
60430
60431      # Use eval to expand a potential ~
60432      eval path="$path"
60433      if test ! -f "$path" && test ! -d "$path"; then
60434        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60435      fi
60436
60437      if test -d "$path"; then
60438        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60439      else
60440        dir="`$DIRNAME "$path"`"
60441        base="`$BASENAME "$path"`"
60442        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60443      fi
60444    fi
60445  fi
60446
60447
60448    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60450$as_echo_n "checking for freetype includes... " >&6; }
60451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60452$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60453    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60455$as_echo_n "checking for freetype libraries... " >&6; }
60456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60457$as_echo "$FREETYPE_LIB_PATH" >&6; }
60458  fi
60459
60460          fi
60461
60462          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60463            if test "x$FOUND_FREETYPE" != xyes; then
60464              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60465              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60466
60467  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60468  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60469  METHOD="well-known location"
60470
60471  # Let's start with an optimistic view of the world :-)
60472  FOUND_FREETYPE=yes
60473
60474  # First look for the canonical freetype main include file ft2build.h.
60475  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60476    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60477    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60478    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60479      # Fail.
60480      FOUND_FREETYPE=no
60481    fi
60482  fi
60483
60484  if test "x$FOUND_FREETYPE" = xyes; then
60485    # Include file found, let's continue the sanity check.
60486    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60487$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60488
60489    # Reset to default value
60490    FREETYPE_BASE_NAME=freetype
60491    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60492    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60493      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60494          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60495        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60496        # for the .6 version explicitly.
60497        FREETYPE_BASE_NAME=freetype.6
60498        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60499        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60500$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60501      else
60502        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60503$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60504        FOUND_FREETYPE=no
60505      fi
60506    else
60507      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60508        # On Windows, we will need both .lib and .dll file.
60509        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60510          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60512          FOUND_FREETYPE=no
60513        fi
60514      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60515          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60516        # Found lib in isa dir, use that instead.
60517        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60518        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60519$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60520      fi
60521    fi
60522  fi
60523
60524  if test "x$FOUND_FREETYPE" = xyes; then
60525
60526  # Only process if variable expands to non-empty
60527
60528  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60530
60531  # Input might be given as Windows format, start by converting to
60532  # unix format.
60533  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60534  new_path=`$CYGPATH -u "$path"`
60535
60536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60539  # "foo.exe" is OK but "foo" is an error.
60540  #
60541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60542  # It is also a way to make sure we got the proper file name for the real test later on.
60543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60544  if test "x$test_shortpath" = x; then
60545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60547    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60548  fi
60549
60550  # Call helper function which possibly converts this using DOS-style short mode.
60551  # If so, the updated path is stored in $new_path.
60552
60553  input_path="$new_path"
60554  # Check if we need to convert this using DOS-style short mode. If the path
60555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60556  # take no chances and rewrite it.
60557  # Note: m4 eats our [], so we need to use [ and ] instead.
60558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60559  if test "x$has_forbidden_chars" != x; then
60560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60564      # Going to short mode and back again did indeed matter. Since short mode is
60565      # case insensitive, let's make it lowercase to improve readability.
60566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60567      # Now convert it back to Unix-style (cygpath)
60568      input_path=`$CYGPATH -u "$shortmode_path"`
60569      new_path="$input_path"
60570    fi
60571  fi
60572
60573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60574  if test "x$test_cygdrive_prefix" = x; then
60575    # As a simple fix, exclude /usr/bin since it's not a real path.
60576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60578      # a path prefixed by /cygdrive for fixpath to work.
60579      new_path="$CYGWIN_ROOT_PATH$input_path"
60580    fi
60581  fi
60582
60583
60584  if test "x$path" != "x$new_path"; then
60585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60588  fi
60589
60590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60591
60592  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60593  has_colon=`$ECHO $path | $GREP ^.:`
60594  new_path="$path"
60595  if test "x$has_colon" = x; then
60596    # Not in mixed or Windows style, start by that.
60597    new_path=`cmd //c echo $path`
60598  fi
60599
60600
60601  input_path="$new_path"
60602  # Check if we need to convert this using DOS-style short mode. If the path
60603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60604  # take no chances and rewrite it.
60605  # Note: m4 eats our [], so we need to use [ and ] instead.
60606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60607  if test "x$has_forbidden_chars" != x; then
60608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60610  fi
60611
60612
60613  windows_path="$new_path"
60614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60615    unix_path=`$CYGPATH -u "$windows_path"`
60616    new_path="$unix_path"
60617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60619    new_path="$unix_path"
60620  fi
60621
60622  if test "x$path" != "x$new_path"; then
60623    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60625$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60626  fi
60627
60628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60630
60631    else
60632      # We're on a unix platform. Hooray! :)
60633      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60634      has_space=`$ECHO "$path" | $GREP " "`
60635      if test "x$has_space" != x; then
60636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60639      fi
60640
60641      # Use eval to expand a potential ~
60642      eval path="$path"
60643      if test ! -f "$path" && test ! -d "$path"; then
60644        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60645      fi
60646
60647      if test -d "$path"; then
60648        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60649      else
60650        dir="`$DIRNAME "$path"`"
60651        base="`$BASENAME "$path"`"
60652        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60653      fi
60654    fi
60655  fi
60656
60657
60658  # Only process if variable expands to non-empty
60659
60660  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60662
60663  # Input might be given as Windows format, start by converting to
60664  # unix format.
60665  path="$POTENTIAL_FREETYPE_LIB_PATH"
60666  new_path=`$CYGPATH -u "$path"`
60667
60668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60671  # "foo.exe" is OK but "foo" is an error.
60672  #
60673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60674  # It is also a way to make sure we got the proper file name for the real test later on.
60675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60676  if test "x$test_shortpath" = x; then
60677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60680  fi
60681
60682  # Call helper function which possibly converts this using DOS-style short mode.
60683  # If so, the updated path is stored in $new_path.
60684
60685  input_path="$new_path"
60686  # Check if we need to convert this using DOS-style short mode. If the path
60687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60688  # take no chances and rewrite it.
60689  # Note: m4 eats our [], so we need to use [ and ] instead.
60690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60691  if test "x$has_forbidden_chars" != x; then
60692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60696      # Going to short mode and back again did indeed matter. Since short mode is
60697      # case insensitive, let's make it lowercase to improve readability.
60698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60699      # Now convert it back to Unix-style (cygpath)
60700      input_path=`$CYGPATH -u "$shortmode_path"`
60701      new_path="$input_path"
60702    fi
60703  fi
60704
60705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60706  if test "x$test_cygdrive_prefix" = x; then
60707    # As a simple fix, exclude /usr/bin since it's not a real path.
60708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60710      # a path prefixed by /cygdrive for fixpath to work.
60711      new_path="$CYGWIN_ROOT_PATH$input_path"
60712    fi
60713  fi
60714
60715
60716  if test "x$path" != "x$new_path"; then
60717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60720  fi
60721
60722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60723
60724  path="$POTENTIAL_FREETYPE_LIB_PATH"
60725  has_colon=`$ECHO $path | $GREP ^.:`
60726  new_path="$path"
60727  if test "x$has_colon" = x; then
60728    # Not in mixed or Windows style, start by that.
60729    new_path=`cmd //c echo $path`
60730  fi
60731
60732
60733  input_path="$new_path"
60734  # Check if we need to convert this using DOS-style short mode. If the path
60735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60736  # take no chances and rewrite it.
60737  # Note: m4 eats our [], so we need to use [ and ] instead.
60738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60739  if test "x$has_forbidden_chars" != x; then
60740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60742  fi
60743
60744
60745  windows_path="$new_path"
60746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60747    unix_path=`$CYGPATH -u "$windows_path"`
60748    new_path="$unix_path"
60749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60751    new_path="$unix_path"
60752  fi
60753
60754  if test "x$path" != "x$new_path"; then
60755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60758  fi
60759
60760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60762
60763    else
60764      # We're on a unix platform. Hooray! :)
60765      path="$POTENTIAL_FREETYPE_LIB_PATH"
60766      has_space=`$ECHO "$path" | $GREP " "`
60767      if test "x$has_space" != x; then
60768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60771      fi
60772
60773      # Use eval to expand a potential ~
60774      eval path="$path"
60775      if test ! -f "$path" && test ! -d "$path"; then
60776        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60777      fi
60778
60779      if test -d "$path"; then
60780        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60781      else
60782        dir="`$DIRNAME "$path"`"
60783        base="`$BASENAME "$path"`"
60784        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60785      fi
60786    fi
60787  fi
60788
60789
60790    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60792$as_echo_n "checking for freetype includes... " >&6; }
60793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60794$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60795    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60797$as_echo_n "checking for freetype libraries... " >&6; }
60798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60799$as_echo "$FREETYPE_LIB_PATH" >&6; }
60800  fi
60801
60802            fi
60803          fi
60804
60805          if test "x$FOUND_FREETYPE" != xyes; then
60806            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60807
60808  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60809  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60810  METHOD="well-known location"
60811
60812  # Let's start with an optimistic view of the world :-)
60813  FOUND_FREETYPE=yes
60814
60815  # First look for the canonical freetype main include file ft2build.h.
60816  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60817    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60818    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60819    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60820      # Fail.
60821      FOUND_FREETYPE=no
60822    fi
60823  fi
60824
60825  if test "x$FOUND_FREETYPE" = xyes; then
60826    # Include file found, let's continue the sanity check.
60827    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60828$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60829
60830    # Reset to default value
60831    FREETYPE_BASE_NAME=freetype
60832    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60833    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60834      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60835          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60836        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60837        # for the .6 version explicitly.
60838        FREETYPE_BASE_NAME=freetype.6
60839        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60840        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60841$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60842      else
60843        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60844$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60845        FOUND_FREETYPE=no
60846      fi
60847    else
60848      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60849        # On Windows, we will need both .lib and .dll file.
60850        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60851          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60852$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60853          FOUND_FREETYPE=no
60854        fi
60855      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60856          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60857        # Found lib in isa dir, use that instead.
60858        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60859        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60860$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60861      fi
60862    fi
60863  fi
60864
60865  if test "x$FOUND_FREETYPE" = xyes; then
60866
60867  # Only process if variable expands to non-empty
60868
60869  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60871
60872  # Input might be given as Windows format, start by converting to
60873  # unix format.
60874  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60875  new_path=`$CYGPATH -u "$path"`
60876
60877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60880  # "foo.exe" is OK but "foo" is an error.
60881  #
60882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60883  # It is also a way to make sure we got the proper file name for the real test later on.
60884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60885  if test "x$test_shortpath" = x; then
60886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60888    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60889  fi
60890
60891  # Call helper function which possibly converts this using DOS-style short mode.
60892  # If so, the updated path is stored in $new_path.
60893
60894  input_path="$new_path"
60895  # Check if we need to convert this using DOS-style short mode. If the path
60896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60897  # take no chances and rewrite it.
60898  # Note: m4 eats our [], so we need to use [ and ] instead.
60899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60900  if test "x$has_forbidden_chars" != x; then
60901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60905      # Going to short mode and back again did indeed matter. Since short mode is
60906      # case insensitive, let's make it lowercase to improve readability.
60907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60908      # Now convert it back to Unix-style (cygpath)
60909      input_path=`$CYGPATH -u "$shortmode_path"`
60910      new_path="$input_path"
60911    fi
60912  fi
60913
60914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60915  if test "x$test_cygdrive_prefix" = x; then
60916    # As a simple fix, exclude /usr/bin since it's not a real path.
60917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60919      # a path prefixed by /cygdrive for fixpath to work.
60920      new_path="$CYGWIN_ROOT_PATH$input_path"
60921    fi
60922  fi
60923
60924
60925  if test "x$path" != "x$new_path"; then
60926    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60929  fi
60930
60931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60932
60933  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60934  has_colon=`$ECHO $path | $GREP ^.:`
60935  new_path="$path"
60936  if test "x$has_colon" = x; then
60937    # Not in mixed or Windows style, start by that.
60938    new_path=`cmd //c echo $path`
60939  fi
60940
60941
60942  input_path="$new_path"
60943  # Check if we need to convert this using DOS-style short mode. If the path
60944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60945  # take no chances and rewrite it.
60946  # Note: m4 eats our [], so we need to use [ and ] instead.
60947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60948  if test "x$has_forbidden_chars" != x; then
60949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60951  fi
60952
60953
60954  windows_path="$new_path"
60955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60956    unix_path=`$CYGPATH -u "$windows_path"`
60957    new_path="$unix_path"
60958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60960    new_path="$unix_path"
60961  fi
60962
60963  if test "x$path" != "x$new_path"; then
60964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60967  fi
60968
60969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60971
60972    else
60973      # We're on a unix platform. Hooray! :)
60974      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60975      has_space=`$ECHO "$path" | $GREP " "`
60976      if test "x$has_space" != x; then
60977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60978$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60979        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60980      fi
60981
60982      # Use eval to expand a potential ~
60983      eval path="$path"
60984      if test ! -f "$path" && test ! -d "$path"; then
60985        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60986      fi
60987
60988      if test -d "$path"; then
60989        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60990      else
60991        dir="`$DIRNAME "$path"`"
60992        base="`$BASENAME "$path"`"
60993        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60994      fi
60995    fi
60996  fi
60997
60998
60999  # Only process if variable expands to non-empty
61000
61001  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61003
61004  # Input might be given as Windows format, start by converting to
61005  # unix format.
61006  path="$POTENTIAL_FREETYPE_LIB_PATH"
61007  new_path=`$CYGPATH -u "$path"`
61008
61009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61012  # "foo.exe" is OK but "foo" is an error.
61013  #
61014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61015  # It is also a way to make sure we got the proper file name for the real test later on.
61016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61017  if test "x$test_shortpath" = x; then
61018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61021  fi
61022
61023  # Call helper function which possibly converts this using DOS-style short mode.
61024  # If so, the updated path is stored in $new_path.
61025
61026  input_path="$new_path"
61027  # Check if we need to convert this using DOS-style short mode. If the path
61028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61029  # take no chances and rewrite it.
61030  # Note: m4 eats our [], so we need to use [ and ] instead.
61031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61032  if test "x$has_forbidden_chars" != x; then
61033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61037      # Going to short mode and back again did indeed matter. Since short mode is
61038      # case insensitive, let's make it lowercase to improve readability.
61039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61040      # Now convert it back to Unix-style (cygpath)
61041      input_path=`$CYGPATH -u "$shortmode_path"`
61042      new_path="$input_path"
61043    fi
61044  fi
61045
61046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61047  if test "x$test_cygdrive_prefix" = x; then
61048    # As a simple fix, exclude /usr/bin since it's not a real path.
61049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61051      # a path prefixed by /cygdrive for fixpath to work.
61052      new_path="$CYGWIN_ROOT_PATH$input_path"
61053    fi
61054  fi
61055
61056
61057  if test "x$path" != "x$new_path"; then
61058    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61061  fi
61062
61063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61064
61065  path="$POTENTIAL_FREETYPE_LIB_PATH"
61066  has_colon=`$ECHO $path | $GREP ^.:`
61067  new_path="$path"
61068  if test "x$has_colon" = x; then
61069    # Not in mixed or Windows style, start by that.
61070    new_path=`cmd //c echo $path`
61071  fi
61072
61073
61074  input_path="$new_path"
61075  # Check if we need to convert this using DOS-style short mode. If the path
61076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61077  # take no chances and rewrite it.
61078  # Note: m4 eats our [], so we need to use [ and ] instead.
61079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61080  if test "x$has_forbidden_chars" != x; then
61081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61083  fi
61084
61085
61086  windows_path="$new_path"
61087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61088    unix_path=`$CYGPATH -u "$windows_path"`
61089    new_path="$unix_path"
61090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61092    new_path="$unix_path"
61093  fi
61094
61095  if test "x$path" != "x$new_path"; then
61096    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61099  fi
61100
61101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61103
61104    else
61105      # We're on a unix platform. Hooray! :)
61106      path="$POTENTIAL_FREETYPE_LIB_PATH"
61107      has_space=`$ECHO "$path" | $GREP " "`
61108      if test "x$has_space" != x; then
61109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61112      fi
61113
61114      # Use eval to expand a potential ~
61115      eval path="$path"
61116      if test ! -f "$path" && test ! -d "$path"; then
61117        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61118      fi
61119
61120      if test -d "$path"; then
61121        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61122      else
61123        dir="`$DIRNAME "$path"`"
61124        base="`$BASENAME "$path"`"
61125        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61126      fi
61127    fi
61128  fi
61129
61130
61131    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61133$as_echo_n "checking for freetype includes... " >&6; }
61134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61135$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61136    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61138$as_echo_n "checking for freetype libraries... " >&6; }
61139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61140$as_echo "$FREETYPE_LIB_PATH" >&6; }
61141  fi
61142
61143          fi
61144
61145          if test "x$FOUND_FREETYPE" != xyes; then
61146            FREETYPE_BASE_DIR="$SYSROOT/usr"
61147            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61148
61149  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61150  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61151  METHOD="well-known location"
61152
61153  # Let's start with an optimistic view of the world :-)
61154  FOUND_FREETYPE=yes
61155
61156  # First look for the canonical freetype main include file ft2build.h.
61157  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61158    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61159    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61160    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61161      # Fail.
61162      FOUND_FREETYPE=no
61163    fi
61164  fi
61165
61166  if test "x$FOUND_FREETYPE" = xyes; then
61167    # Include file found, let's continue the sanity check.
61168    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61169$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61170
61171    # Reset to default value
61172    FREETYPE_BASE_NAME=freetype
61173    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61174    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61175      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61176          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61177        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61178        # for the .6 version explicitly.
61179        FREETYPE_BASE_NAME=freetype.6
61180        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61181        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61182$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61183      else
61184        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61185$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61186        FOUND_FREETYPE=no
61187      fi
61188    else
61189      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61190        # On Windows, we will need both .lib and .dll file.
61191        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61192          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61193$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61194          FOUND_FREETYPE=no
61195        fi
61196      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61197          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61198        # Found lib in isa dir, use that instead.
61199        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61200        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61201$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61202      fi
61203    fi
61204  fi
61205
61206  if test "x$FOUND_FREETYPE" = xyes; then
61207
61208  # Only process if variable expands to non-empty
61209
61210  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61212
61213  # Input might be given as Windows format, start by converting to
61214  # unix format.
61215  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61216  new_path=`$CYGPATH -u "$path"`
61217
61218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61221  # "foo.exe" is OK but "foo" is an error.
61222  #
61223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61224  # It is also a way to make sure we got the proper file name for the real test later on.
61225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61226  if test "x$test_shortpath" = x; then
61227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61229    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61230  fi
61231
61232  # Call helper function which possibly converts this using DOS-style short mode.
61233  # If so, the updated path is stored in $new_path.
61234
61235  input_path="$new_path"
61236  # Check if we need to convert this using DOS-style short mode. If the path
61237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61238  # take no chances and rewrite it.
61239  # Note: m4 eats our [], so we need to use [ and ] instead.
61240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61241  if test "x$has_forbidden_chars" != x; then
61242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61246      # Going to short mode and back again did indeed matter. Since short mode is
61247      # case insensitive, let's make it lowercase to improve readability.
61248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61249      # Now convert it back to Unix-style (cygpath)
61250      input_path=`$CYGPATH -u "$shortmode_path"`
61251      new_path="$input_path"
61252    fi
61253  fi
61254
61255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61256  if test "x$test_cygdrive_prefix" = x; then
61257    # As a simple fix, exclude /usr/bin since it's not a real path.
61258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61260      # a path prefixed by /cygdrive for fixpath to work.
61261      new_path="$CYGWIN_ROOT_PATH$input_path"
61262    fi
61263  fi
61264
61265
61266  if test "x$path" != "x$new_path"; then
61267    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61270  fi
61271
61272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61273
61274  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61275  has_colon=`$ECHO $path | $GREP ^.:`
61276  new_path="$path"
61277  if test "x$has_colon" = x; then
61278    # Not in mixed or Windows style, start by that.
61279    new_path=`cmd //c echo $path`
61280  fi
61281
61282
61283  input_path="$new_path"
61284  # Check if we need to convert this using DOS-style short mode. If the path
61285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61286  # take no chances and rewrite it.
61287  # Note: m4 eats our [], so we need to use [ and ] instead.
61288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61289  if test "x$has_forbidden_chars" != x; then
61290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61292  fi
61293
61294
61295  windows_path="$new_path"
61296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61297    unix_path=`$CYGPATH -u "$windows_path"`
61298    new_path="$unix_path"
61299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61301    new_path="$unix_path"
61302  fi
61303
61304  if test "x$path" != "x$new_path"; then
61305    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61308  fi
61309
61310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61312
61313    else
61314      # We're on a unix platform. Hooray! :)
61315      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61316      has_space=`$ECHO "$path" | $GREP " "`
61317      if test "x$has_space" != x; then
61318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61321      fi
61322
61323      # Use eval to expand a potential ~
61324      eval path="$path"
61325      if test ! -f "$path" && test ! -d "$path"; then
61326        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61327      fi
61328
61329      if test -d "$path"; then
61330        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61331      else
61332        dir="`$DIRNAME "$path"`"
61333        base="`$BASENAME "$path"`"
61334        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61335      fi
61336    fi
61337  fi
61338
61339
61340  # Only process if variable expands to non-empty
61341
61342  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61344
61345  # Input might be given as Windows format, start by converting to
61346  # unix format.
61347  path="$POTENTIAL_FREETYPE_LIB_PATH"
61348  new_path=`$CYGPATH -u "$path"`
61349
61350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61353  # "foo.exe" is OK but "foo" is an error.
61354  #
61355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61356  # It is also a way to make sure we got the proper file name for the real test later on.
61357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61358  if test "x$test_shortpath" = x; then
61359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61361    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61362  fi
61363
61364  # Call helper function which possibly converts this using DOS-style short mode.
61365  # If so, the updated path is stored in $new_path.
61366
61367  input_path="$new_path"
61368  # Check if we need to convert this using DOS-style short mode. If the path
61369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61370  # take no chances and rewrite it.
61371  # Note: m4 eats our [], so we need to use [ and ] instead.
61372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61373  if test "x$has_forbidden_chars" != x; then
61374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61378      # Going to short mode and back again did indeed matter. Since short mode is
61379      # case insensitive, let's make it lowercase to improve readability.
61380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61381      # Now convert it back to Unix-style (cygpath)
61382      input_path=`$CYGPATH -u "$shortmode_path"`
61383      new_path="$input_path"
61384    fi
61385  fi
61386
61387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61388  if test "x$test_cygdrive_prefix" = x; then
61389    # As a simple fix, exclude /usr/bin since it's not a real path.
61390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61392      # a path prefixed by /cygdrive for fixpath to work.
61393      new_path="$CYGWIN_ROOT_PATH$input_path"
61394    fi
61395  fi
61396
61397
61398  if test "x$path" != "x$new_path"; then
61399    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61402  fi
61403
61404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61405
61406  path="$POTENTIAL_FREETYPE_LIB_PATH"
61407  has_colon=`$ECHO $path | $GREP ^.:`
61408  new_path="$path"
61409  if test "x$has_colon" = x; then
61410    # Not in mixed or Windows style, start by that.
61411    new_path=`cmd //c echo $path`
61412  fi
61413
61414
61415  input_path="$new_path"
61416  # Check if we need to convert this using DOS-style short mode. If the path
61417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61418  # take no chances and rewrite it.
61419  # Note: m4 eats our [], so we need to use [ and ] instead.
61420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61421  if test "x$has_forbidden_chars" != x; then
61422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61424  fi
61425
61426
61427  windows_path="$new_path"
61428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61429    unix_path=`$CYGPATH -u "$windows_path"`
61430    new_path="$unix_path"
61431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61433    new_path="$unix_path"
61434  fi
61435
61436  if test "x$path" != "x$new_path"; then
61437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61440  fi
61441
61442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61444
61445    else
61446      # We're on a unix platform. Hooray! :)
61447      path="$POTENTIAL_FREETYPE_LIB_PATH"
61448      has_space=`$ECHO "$path" | $GREP " "`
61449      if test "x$has_space" != x; then
61450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61453      fi
61454
61455      # Use eval to expand a potential ~
61456      eval path="$path"
61457      if test ! -f "$path" && test ! -d "$path"; then
61458        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61459      fi
61460
61461      if test -d "$path"; then
61462        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61463      else
61464        dir="`$DIRNAME "$path"`"
61465        base="`$BASENAME "$path"`"
61466        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61467      fi
61468    fi
61469  fi
61470
61471
61472    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61474$as_echo_n "checking for freetype includes... " >&6; }
61475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61476$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61477    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61479$as_echo_n "checking for freetype libraries... " >&6; }
61480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61481$as_echo "$FREETYPE_LIB_PATH" >&6; }
61482  fi
61483
61484            else
61485
61486  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61487  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61488  METHOD="well-known location"
61489
61490  # Let's start with an optimistic view of the world :-)
61491  FOUND_FREETYPE=yes
61492
61493  # First look for the canonical freetype main include file ft2build.h.
61494  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61495    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61496    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61497    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61498      # Fail.
61499      FOUND_FREETYPE=no
61500    fi
61501  fi
61502
61503  if test "x$FOUND_FREETYPE" = xyes; then
61504    # Include file found, let's continue the sanity check.
61505    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61506$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61507
61508    # Reset to default value
61509    FREETYPE_BASE_NAME=freetype
61510    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61511    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61512      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61513          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61514        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61515        # for the .6 version explicitly.
61516        FREETYPE_BASE_NAME=freetype.6
61517        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61518        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61519$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61520      else
61521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61522$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61523        FOUND_FREETYPE=no
61524      fi
61525    else
61526      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61527        # On Windows, we will need both .lib and .dll file.
61528        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61529          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61530$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61531          FOUND_FREETYPE=no
61532        fi
61533      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61534          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61535        # Found lib in isa dir, use that instead.
61536        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61537        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61538$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61539      fi
61540    fi
61541  fi
61542
61543  if test "x$FOUND_FREETYPE" = xyes; then
61544
61545  # Only process if variable expands to non-empty
61546
61547  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61549
61550  # Input might be given as Windows format, start by converting to
61551  # unix format.
61552  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61553  new_path=`$CYGPATH -u "$path"`
61554
61555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61558  # "foo.exe" is OK but "foo" is an error.
61559  #
61560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61561  # It is also a way to make sure we got the proper file name for the real test later on.
61562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61563  if test "x$test_shortpath" = x; then
61564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61567  fi
61568
61569  # Call helper function which possibly converts this using DOS-style short mode.
61570  # If so, the updated path is stored in $new_path.
61571
61572  input_path="$new_path"
61573  # Check if we need to convert this using DOS-style short mode. If the path
61574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61575  # take no chances and rewrite it.
61576  # Note: m4 eats our [], so we need to use [ and ] instead.
61577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61578  if test "x$has_forbidden_chars" != x; then
61579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61583      # Going to short mode and back again did indeed matter. Since short mode is
61584      # case insensitive, let's make it lowercase to improve readability.
61585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61586      # Now convert it back to Unix-style (cygpath)
61587      input_path=`$CYGPATH -u "$shortmode_path"`
61588      new_path="$input_path"
61589    fi
61590  fi
61591
61592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61593  if test "x$test_cygdrive_prefix" = x; then
61594    # As a simple fix, exclude /usr/bin since it's not a real path.
61595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61597      # a path prefixed by /cygdrive for fixpath to work.
61598      new_path="$CYGWIN_ROOT_PATH$input_path"
61599    fi
61600  fi
61601
61602
61603  if test "x$path" != "x$new_path"; then
61604    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61607  fi
61608
61609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61610
61611  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61612  has_colon=`$ECHO $path | $GREP ^.:`
61613  new_path="$path"
61614  if test "x$has_colon" = x; then
61615    # Not in mixed or Windows style, start by that.
61616    new_path=`cmd //c echo $path`
61617  fi
61618
61619
61620  input_path="$new_path"
61621  # Check if we need to convert this using DOS-style short mode. If the path
61622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61623  # take no chances and rewrite it.
61624  # Note: m4 eats our [], so we need to use [ and ] instead.
61625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61626  if test "x$has_forbidden_chars" != x; then
61627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61629  fi
61630
61631
61632  windows_path="$new_path"
61633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61634    unix_path=`$CYGPATH -u "$windows_path"`
61635    new_path="$unix_path"
61636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61638    new_path="$unix_path"
61639  fi
61640
61641  if test "x$path" != "x$new_path"; then
61642    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61645  fi
61646
61647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61649
61650    else
61651      # We're on a unix platform. Hooray! :)
61652      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61653      has_space=`$ECHO "$path" | $GREP " "`
61654      if test "x$has_space" != x; then
61655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61658      fi
61659
61660      # Use eval to expand a potential ~
61661      eval path="$path"
61662      if test ! -f "$path" && test ! -d "$path"; then
61663        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61664      fi
61665
61666      if test -d "$path"; then
61667        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61668      else
61669        dir="`$DIRNAME "$path"`"
61670        base="`$BASENAME "$path"`"
61671        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61672      fi
61673    fi
61674  fi
61675
61676
61677  # Only process if variable expands to non-empty
61678
61679  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61681
61682  # Input might be given as Windows format, start by converting to
61683  # unix format.
61684  path="$POTENTIAL_FREETYPE_LIB_PATH"
61685  new_path=`$CYGPATH -u "$path"`
61686
61687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61690  # "foo.exe" is OK but "foo" is an error.
61691  #
61692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61693  # It is also a way to make sure we got the proper file name for the real test later on.
61694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61695  if test "x$test_shortpath" = x; then
61696    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61698    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61699  fi
61700
61701  # Call helper function which possibly converts this using DOS-style short mode.
61702  # If so, the updated path is stored in $new_path.
61703
61704  input_path="$new_path"
61705  # Check if we need to convert this using DOS-style short mode. If the path
61706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61707  # take no chances and rewrite it.
61708  # Note: m4 eats our [], so we need to use [ and ] instead.
61709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61710  if test "x$has_forbidden_chars" != x; then
61711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61715      # Going to short mode and back again did indeed matter. Since short mode is
61716      # case insensitive, let's make it lowercase to improve readability.
61717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61718      # Now convert it back to Unix-style (cygpath)
61719      input_path=`$CYGPATH -u "$shortmode_path"`
61720      new_path="$input_path"
61721    fi
61722  fi
61723
61724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61725  if test "x$test_cygdrive_prefix" = x; then
61726    # As a simple fix, exclude /usr/bin since it's not a real path.
61727    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61729      # a path prefixed by /cygdrive for fixpath to work.
61730      new_path="$CYGWIN_ROOT_PATH$input_path"
61731    fi
61732  fi
61733
61734
61735  if test "x$path" != "x$new_path"; then
61736    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61738$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61739  fi
61740
61741    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61742
61743  path="$POTENTIAL_FREETYPE_LIB_PATH"
61744  has_colon=`$ECHO $path | $GREP ^.:`
61745  new_path="$path"
61746  if test "x$has_colon" = x; then
61747    # Not in mixed or Windows style, start by that.
61748    new_path=`cmd //c echo $path`
61749  fi
61750
61751
61752  input_path="$new_path"
61753  # Check if we need to convert this using DOS-style short mode. If the path
61754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61755  # take no chances and rewrite it.
61756  # Note: m4 eats our [], so we need to use [ and ] instead.
61757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61758  if test "x$has_forbidden_chars" != x; then
61759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61761  fi
61762
61763
61764  windows_path="$new_path"
61765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61766    unix_path=`$CYGPATH -u "$windows_path"`
61767    new_path="$unix_path"
61768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61770    new_path="$unix_path"
61771  fi
61772
61773  if test "x$path" != "x$new_path"; then
61774    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61776$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61777  fi
61778
61779  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61780  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61781
61782    else
61783      # We're on a unix platform. Hooray! :)
61784      path="$POTENTIAL_FREETYPE_LIB_PATH"
61785      has_space=`$ECHO "$path" | $GREP " "`
61786      if test "x$has_space" != x; then
61787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61788$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61789        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61790      fi
61791
61792      # Use eval to expand a potential ~
61793      eval path="$path"
61794      if test ! -f "$path" && test ! -d "$path"; then
61795        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61796      fi
61797
61798      if test -d "$path"; then
61799        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61800      else
61801        dir="`$DIRNAME "$path"`"
61802        base="`$BASENAME "$path"`"
61803        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61804      fi
61805    fi
61806  fi
61807
61808
61809    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61811$as_echo_n "checking for freetype includes... " >&6; }
61812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61813$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61814    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61816$as_echo_n "checking for freetype libraries... " >&6; }
61817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61818$as_echo "$FREETYPE_LIB_PATH" >&6; }
61819  fi
61820
61821              if test "x$FOUND_FREETYPE" != xyes; then
61822
61823  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61824  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61825  METHOD="well-known location"
61826
61827  # Let's start with an optimistic view of the world :-)
61828  FOUND_FREETYPE=yes
61829
61830  # First look for the canonical freetype main include file ft2build.h.
61831  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61832    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61833    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61834    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61835      # Fail.
61836      FOUND_FREETYPE=no
61837    fi
61838  fi
61839
61840  if test "x$FOUND_FREETYPE" = xyes; then
61841    # Include file found, let's continue the sanity check.
61842    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61843$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61844
61845    # Reset to default value
61846    FREETYPE_BASE_NAME=freetype
61847    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61848    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61849      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61850          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61851        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61852        # for the .6 version explicitly.
61853        FREETYPE_BASE_NAME=freetype.6
61854        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61855        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61856$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61857      else
61858        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61859$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61860        FOUND_FREETYPE=no
61861      fi
61862    else
61863      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61864        # On Windows, we will need both .lib and .dll file.
61865        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61866          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61867$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61868          FOUND_FREETYPE=no
61869        fi
61870      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61871          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61872        # Found lib in isa dir, use that instead.
61873        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61874        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61875$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61876      fi
61877    fi
61878  fi
61879
61880  if test "x$FOUND_FREETYPE" = xyes; then
61881
61882  # Only process if variable expands to non-empty
61883
61884  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61886
61887  # Input might be given as Windows format, start by converting to
61888  # unix format.
61889  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61890  new_path=`$CYGPATH -u "$path"`
61891
61892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61895  # "foo.exe" is OK but "foo" is an error.
61896  #
61897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61898  # It is also a way to make sure we got the proper file name for the real test later on.
61899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61900  if test "x$test_shortpath" = x; then
61901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61903    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61904  fi
61905
61906  # Call helper function which possibly converts this using DOS-style short mode.
61907  # If so, the updated path is stored in $new_path.
61908
61909  input_path="$new_path"
61910  # Check if we need to convert this using DOS-style short mode. If the path
61911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61912  # take no chances and rewrite it.
61913  # Note: m4 eats our [], so we need to use [ and ] instead.
61914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61915  if test "x$has_forbidden_chars" != x; then
61916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61920      # Going to short mode and back again did indeed matter. Since short mode is
61921      # case insensitive, let's make it lowercase to improve readability.
61922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61923      # Now convert it back to Unix-style (cygpath)
61924      input_path=`$CYGPATH -u "$shortmode_path"`
61925      new_path="$input_path"
61926    fi
61927  fi
61928
61929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61930  if test "x$test_cygdrive_prefix" = x; then
61931    # As a simple fix, exclude /usr/bin since it's not a real path.
61932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61934      # a path prefixed by /cygdrive for fixpath to work.
61935      new_path="$CYGWIN_ROOT_PATH$input_path"
61936    fi
61937  fi
61938
61939
61940  if test "x$path" != "x$new_path"; then
61941    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61944  fi
61945
61946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61947
61948  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61949  has_colon=`$ECHO $path | $GREP ^.:`
61950  new_path="$path"
61951  if test "x$has_colon" = x; then
61952    # Not in mixed or Windows style, start by that.
61953    new_path=`cmd //c echo $path`
61954  fi
61955
61956
61957  input_path="$new_path"
61958  # Check if we need to convert this using DOS-style short mode. If the path
61959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61960  # take no chances and rewrite it.
61961  # Note: m4 eats our [], so we need to use [ and ] instead.
61962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61963  if test "x$has_forbidden_chars" != x; then
61964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61966  fi
61967
61968
61969  windows_path="$new_path"
61970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61971    unix_path=`$CYGPATH -u "$windows_path"`
61972    new_path="$unix_path"
61973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61975    new_path="$unix_path"
61976  fi
61977
61978  if test "x$path" != "x$new_path"; then
61979    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61982  fi
61983
61984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61986
61987    else
61988      # We're on a unix platform. Hooray! :)
61989      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61990      has_space=`$ECHO "$path" | $GREP " "`
61991      if test "x$has_space" != x; then
61992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61995      fi
61996
61997      # Use eval to expand a potential ~
61998      eval path="$path"
61999      if test ! -f "$path" && test ! -d "$path"; then
62000        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62001      fi
62002
62003      if test -d "$path"; then
62004        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62005      else
62006        dir="`$DIRNAME "$path"`"
62007        base="`$BASENAME "$path"`"
62008        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62009      fi
62010    fi
62011  fi
62012
62013
62014  # Only process if variable expands to non-empty
62015
62016  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62018
62019  # Input might be given as Windows format, start by converting to
62020  # unix format.
62021  path="$POTENTIAL_FREETYPE_LIB_PATH"
62022  new_path=`$CYGPATH -u "$path"`
62023
62024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62027  # "foo.exe" is OK but "foo" is an error.
62028  #
62029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62030  # It is also a way to make sure we got the proper file name for the real test later on.
62031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62032  if test "x$test_shortpath" = x; then
62033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62034$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62035    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62036  fi
62037
62038  # Call helper function which possibly converts this using DOS-style short mode.
62039  # If so, the updated path is stored in $new_path.
62040
62041  input_path="$new_path"
62042  # Check if we need to convert this using DOS-style short mode. If the path
62043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62044  # take no chances and rewrite it.
62045  # Note: m4 eats our [], so we need to use [ and ] instead.
62046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62047  if test "x$has_forbidden_chars" != x; then
62048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62052      # Going to short mode and back again did indeed matter. Since short mode is
62053      # case insensitive, let's make it lowercase to improve readability.
62054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62055      # Now convert it back to Unix-style (cygpath)
62056      input_path=`$CYGPATH -u "$shortmode_path"`
62057      new_path="$input_path"
62058    fi
62059  fi
62060
62061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62062  if test "x$test_cygdrive_prefix" = x; then
62063    # As a simple fix, exclude /usr/bin since it's not a real path.
62064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62066      # a path prefixed by /cygdrive for fixpath to work.
62067      new_path="$CYGWIN_ROOT_PATH$input_path"
62068    fi
62069  fi
62070
62071
62072  if test "x$path" != "x$new_path"; then
62073    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62076  fi
62077
62078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62079
62080  path="$POTENTIAL_FREETYPE_LIB_PATH"
62081  has_colon=`$ECHO $path | $GREP ^.:`
62082  new_path="$path"
62083  if test "x$has_colon" = x; then
62084    # Not in mixed or Windows style, start by that.
62085    new_path=`cmd //c echo $path`
62086  fi
62087
62088
62089  input_path="$new_path"
62090  # Check if we need to convert this using DOS-style short mode. If the path
62091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62092  # take no chances and rewrite it.
62093  # Note: m4 eats our [], so we need to use [ and ] instead.
62094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62095  if test "x$has_forbidden_chars" != x; then
62096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62098  fi
62099
62100
62101  windows_path="$new_path"
62102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62103    unix_path=`$CYGPATH -u "$windows_path"`
62104    new_path="$unix_path"
62105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62107    new_path="$unix_path"
62108  fi
62109
62110  if test "x$path" != "x$new_path"; then
62111    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62114  fi
62115
62116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62118
62119    else
62120      # We're on a unix platform. Hooray! :)
62121      path="$POTENTIAL_FREETYPE_LIB_PATH"
62122      has_space=`$ECHO "$path" | $GREP " "`
62123      if test "x$has_space" != x; then
62124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62125$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62127      fi
62128
62129      # Use eval to expand a potential ~
62130      eval path="$path"
62131      if test ! -f "$path" && test ! -d "$path"; then
62132        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62133      fi
62134
62135      if test -d "$path"; then
62136        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62137      else
62138        dir="`$DIRNAME "$path"`"
62139        base="`$BASENAME "$path"`"
62140        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62141      fi
62142    fi
62143  fi
62144
62145
62146    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62148$as_echo_n "checking for freetype includes... " >&6; }
62149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62150$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62151    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62153$as_echo_n "checking for freetype libraries... " >&6; }
62154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62155$as_echo "$FREETYPE_LIB_PATH" >&6; }
62156  fi
62157
62158              fi
62159            fi
62160          fi
62161        fi
62162      fi # end check in well-known locations
62163
62164      if test "x$FOUND_FREETYPE" != xyes; then
62165
62166  # Print a helpful message on how to acquire the necessary build dependency.
62167  # freetype is the help tag: freetype, cups, alsa etc
62168  MISSING_DEPENDENCY=freetype
62169
62170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62171    cygwin_help $MISSING_DEPENDENCY
62172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62173    msys_help $MISSING_DEPENDENCY
62174  else
62175    PKGHANDLER_COMMAND=
62176
62177    case $PKGHANDLER in
62178      apt-get)
62179        apt_help     $MISSING_DEPENDENCY ;;
62180      yum)
62181        yum_help     $MISSING_DEPENDENCY ;;
62182      port)
62183        port_help    $MISSING_DEPENDENCY ;;
62184      pkgutil)
62185        pkgutil_help $MISSING_DEPENDENCY ;;
62186      pkgadd)
62187        pkgadd_help  $MISSING_DEPENDENCY ;;
62188    esac
62189
62190    if test "x$PKGHANDLER_COMMAND" != x; then
62191      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62192    fi
62193  fi
62194
62195        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62196      fi
62197    fi # end user specified settings
62198
62199    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62200    if test "x$FREETYPE_CFLAGS" = x; then
62201
62202  # Only process if variable expands to non-empty
62203
62204  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62206
62207  # Input might be given as Windows format, start by converting to
62208  # unix format.
62209  path="$FREETYPE_INCLUDE_PATH"
62210  new_path=`$CYGPATH -u "$path"`
62211
62212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62215  # "foo.exe" is OK but "foo" is an error.
62216  #
62217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62218  # It is also a way to make sure we got the proper file name for the real test later on.
62219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62220  if test "x$test_shortpath" = x; then
62221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62222$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62223    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62224  fi
62225
62226  # Call helper function which possibly converts this using DOS-style short mode.
62227  # If so, the updated path is stored in $new_path.
62228
62229  input_path="$new_path"
62230  # Check if we need to convert this using DOS-style short mode. If the path
62231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62232  # take no chances and rewrite it.
62233  # Note: m4 eats our [], so we need to use [ and ] instead.
62234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62235  if test "x$has_forbidden_chars" != x; then
62236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62240      # Going to short mode and back again did indeed matter. Since short mode is
62241      # case insensitive, let's make it lowercase to improve readability.
62242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62243      # Now convert it back to Unix-style (cygpath)
62244      input_path=`$CYGPATH -u "$shortmode_path"`
62245      new_path="$input_path"
62246    fi
62247  fi
62248
62249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62250  if test "x$test_cygdrive_prefix" = x; then
62251    # As a simple fix, exclude /usr/bin since it's not a real path.
62252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62254      # a path prefixed by /cygdrive for fixpath to work.
62255      new_path="$CYGWIN_ROOT_PATH$input_path"
62256    fi
62257  fi
62258
62259
62260  if test "x$path" != "x$new_path"; then
62261    FREETYPE_INCLUDE_PATH="$new_path"
62262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62263$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62264  fi
62265
62266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62267
62268  path="$FREETYPE_INCLUDE_PATH"
62269  has_colon=`$ECHO $path | $GREP ^.:`
62270  new_path="$path"
62271  if test "x$has_colon" = x; then
62272    # Not in mixed or Windows style, start by that.
62273    new_path=`cmd //c echo $path`
62274  fi
62275
62276
62277  input_path="$new_path"
62278  # Check if we need to convert this using DOS-style short mode. If the path
62279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62280  # take no chances and rewrite it.
62281  # Note: m4 eats our [], so we need to use [ and ] instead.
62282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62283  if test "x$has_forbidden_chars" != x; then
62284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62286  fi
62287
62288
62289  windows_path="$new_path"
62290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62291    unix_path=`$CYGPATH -u "$windows_path"`
62292    new_path="$unix_path"
62293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62295    new_path="$unix_path"
62296  fi
62297
62298  if test "x$path" != "x$new_path"; then
62299    FREETYPE_INCLUDE_PATH="$new_path"
62300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62301$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62302  fi
62303
62304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62306
62307    else
62308      # We're on a unix platform. Hooray! :)
62309      path="$FREETYPE_INCLUDE_PATH"
62310      has_space=`$ECHO "$path" | $GREP " "`
62311      if test "x$has_space" != x; then
62312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62313$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62315      fi
62316
62317      # Use eval to expand a potential ~
62318      eval path="$path"
62319      if test ! -f "$path" && test ! -d "$path"; then
62320        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62321      fi
62322
62323      if test -d "$path"; then
62324        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62325      else
62326        dir="`$DIRNAME "$path"`"
62327        base="`$BASENAME "$path"`"
62328        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62329      fi
62330    fi
62331  fi
62332
62333      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62334        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62335      else
62336        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62337      fi
62338    fi
62339
62340    if test "x$FREETYPE_LIBS" = x; then
62341
62342  # Only process if variable expands to non-empty
62343
62344  if test "x$FREETYPE_LIB_PATH" != x; then
62345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62346
62347  # Input might be given as Windows format, start by converting to
62348  # unix format.
62349  path="$FREETYPE_LIB_PATH"
62350  new_path=`$CYGPATH -u "$path"`
62351
62352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62355  # "foo.exe" is OK but "foo" is an error.
62356  #
62357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62358  # It is also a way to make sure we got the proper file name for the real test later on.
62359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62360  if test "x$test_shortpath" = x; then
62361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62362$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62363    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62364  fi
62365
62366  # Call helper function which possibly converts this using DOS-style short mode.
62367  # If so, the updated path is stored in $new_path.
62368
62369  input_path="$new_path"
62370  # Check if we need to convert this using DOS-style short mode. If the path
62371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62372  # take no chances and rewrite it.
62373  # Note: m4 eats our [], so we need to use [ and ] instead.
62374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62375  if test "x$has_forbidden_chars" != x; then
62376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62380      # Going to short mode and back again did indeed matter. Since short mode is
62381      # case insensitive, let's make it lowercase to improve readability.
62382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62383      # Now convert it back to Unix-style (cygpath)
62384      input_path=`$CYGPATH -u "$shortmode_path"`
62385      new_path="$input_path"
62386    fi
62387  fi
62388
62389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62390  if test "x$test_cygdrive_prefix" = x; then
62391    # As a simple fix, exclude /usr/bin since it's not a real path.
62392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62394      # a path prefixed by /cygdrive for fixpath to work.
62395      new_path="$CYGWIN_ROOT_PATH$input_path"
62396    fi
62397  fi
62398
62399
62400  if test "x$path" != "x$new_path"; then
62401    FREETYPE_LIB_PATH="$new_path"
62402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62403$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62404  fi
62405
62406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62407
62408  path="$FREETYPE_LIB_PATH"
62409  has_colon=`$ECHO $path | $GREP ^.:`
62410  new_path="$path"
62411  if test "x$has_colon" = x; then
62412    # Not in mixed or Windows style, start by that.
62413    new_path=`cmd //c echo $path`
62414  fi
62415
62416
62417  input_path="$new_path"
62418  # Check if we need to convert this using DOS-style short mode. If the path
62419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62420  # take no chances and rewrite it.
62421  # Note: m4 eats our [], so we need to use [ and ] instead.
62422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62423  if test "x$has_forbidden_chars" != x; then
62424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62426  fi
62427
62428
62429  windows_path="$new_path"
62430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62431    unix_path=`$CYGPATH -u "$windows_path"`
62432    new_path="$unix_path"
62433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62435    new_path="$unix_path"
62436  fi
62437
62438  if test "x$path" != "x$new_path"; then
62439    FREETYPE_LIB_PATH="$new_path"
62440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62441$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62442  fi
62443
62444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62446
62447    else
62448      # We're on a unix platform. Hooray! :)
62449      path="$FREETYPE_LIB_PATH"
62450      has_space=`$ECHO "$path" | $GREP " "`
62451      if test "x$has_space" != x; then
62452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62453$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62454        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62455      fi
62456
62457      # Use eval to expand a potential ~
62458      eval path="$path"
62459      if test ! -f "$path" && test ! -d "$path"; then
62460        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62461      fi
62462
62463      if test -d "$path"; then
62464        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62465      else
62466        dir="`$DIRNAME "$path"`"
62467        base="`$BASENAME "$path"`"
62468        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62469      fi
62470    fi
62471  fi
62472
62473      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62474        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62475      else
62476        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62477      fi
62478    fi
62479
62480    # Try to compile it
62481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62482$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62483    ac_ext=cpp
62484ac_cpp='$CXXCPP $CPPFLAGS'
62485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62488
62489    PREV_CXXCFLAGS="$CXXFLAGS"
62490    PREV_LIBS="$LIBS"
62491    PREV_CXX="$CXX"
62492    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62493    LIBS="$LIBS $FREETYPE_LIBS"
62494    CXX="$FIXPATH $CXX"
62495    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62496/* end confdefs.h.  */
62497
62498          #include<ft2build.h>
62499          #include FT_FREETYPE_H
62500          int main () {
62501            FT_Init_FreeType(NULL);
62502            return 0;
62503          }
62504
62505_ACEOF
62506if ac_fn_cxx_try_link "$LINENO"; then :
62507
62508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62509$as_echo "yes" >&6; }
62510
62511else
62512
62513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62514$as_echo "no" >&6; }
62515          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62516$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62517          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62518$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62519
62520
62521  # Print a helpful message on how to acquire the necessary build dependency.
62522  # freetype is the help tag: freetype, cups, alsa etc
62523  MISSING_DEPENDENCY=freetype
62524
62525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62526    cygwin_help $MISSING_DEPENDENCY
62527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62528    msys_help $MISSING_DEPENDENCY
62529  else
62530    PKGHANDLER_COMMAND=
62531
62532    case $PKGHANDLER in
62533      apt-get)
62534        apt_help     $MISSING_DEPENDENCY ;;
62535      yum)
62536        yum_help     $MISSING_DEPENDENCY ;;
62537      port)
62538        port_help    $MISSING_DEPENDENCY ;;
62539      pkgutil)
62540        pkgutil_help $MISSING_DEPENDENCY ;;
62541      pkgadd)
62542        pkgadd_help  $MISSING_DEPENDENCY ;;
62543    esac
62544
62545    if test "x$PKGHANDLER_COMMAND" != x; then
62546      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62547    fi
62548  fi
62549
62550
62551          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62552
62553
62554fi
62555rm -f core conftest.err conftest.$ac_objext \
62556    conftest$ac_exeext conftest.$ac_ext
62557    CXXCFLAGS="$PREV_CXXFLAGS"
62558    LIBS="$PREV_LIBS"
62559    CXX="$PREV_CXX"
62560    ac_ext=cpp
62561ac_cpp='$CXXCPP $CPPFLAGS'
62562ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62563ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62564ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62565
62566
62567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62568$as_echo_n "checking if we should bundle freetype... " >&6; }
62569    if test "x$BUNDLE_FREETYPE" = xyes; then
62570      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62571    fi
62572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62573$as_echo "$BUNDLE_FREETYPE" >&6; }
62574
62575  fi # end freetype needed
62576
62577
62578
62579
62580
62581
62582
62583# Check whether --with-alsa was given.
62584if test "${with_alsa+set}" = set; then :
62585  withval=$with_alsa;
62586fi
62587
62588
62589# Check whether --with-alsa-include was given.
62590if test "${with_alsa_include+set}" = set; then :
62591  withval=$with_alsa_include;
62592fi
62593
62594
62595# Check whether --with-alsa-lib was given.
62596if test "${with_alsa_lib+set}" = set; then :
62597  withval=$with_alsa_lib;
62598fi
62599
62600
62601  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62602    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62603        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62604        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62605      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62606$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62607    fi
62608    ALSA_CFLAGS=
62609    ALSA_LIBS=
62610  else
62611    ALSA_FOUND=no
62612
62613    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62614      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62615    fi
62616
62617    if test "x${with_alsa}" != x; then
62618      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62619      ALSA_CFLAGS="-I${with_alsa}/include"
62620      ALSA_FOUND=yes
62621    fi
62622    if test "x${with_alsa_include}" != x; then
62623      ALSA_CFLAGS="-I${with_alsa_include}"
62624      ALSA_FOUND=yes
62625    fi
62626    if test "x${with_alsa_lib}" != x; then
62627      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62628      ALSA_FOUND=yes
62629    fi
62630    # Do not try pkg-config if we have a sysroot set.
62631    if test "x$SYSROOT" = x; then
62632      if test "x$ALSA_FOUND" = xno; then
62633
62634pkg_failed=no
62635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62636$as_echo_n "checking for ALSA... " >&6; }
62637
62638if test -n "$ALSA_CFLAGS"; then
62639    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62640 elif test -n "$PKG_CONFIG"; then
62641    if test -n "$PKG_CONFIG" && \
62642    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62643  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62644  ac_status=$?
62645  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62646  test $ac_status = 0; }; then
62647  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62648else
62649  pkg_failed=yes
62650fi
62651 else
62652    pkg_failed=untried
62653fi
62654if test -n "$ALSA_LIBS"; then
62655    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62656 elif test -n "$PKG_CONFIG"; then
62657    if test -n "$PKG_CONFIG" && \
62658    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62659  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62660  ac_status=$?
62661  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62662  test $ac_status = 0; }; then
62663  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62664else
62665  pkg_failed=yes
62666fi
62667 else
62668    pkg_failed=untried
62669fi
62670
62671
62672
62673if test $pkg_failed = yes; then
62674
62675if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62676        _pkg_short_errors_supported=yes
62677else
62678        _pkg_short_errors_supported=no
62679fi
62680        if test $_pkg_short_errors_supported = yes; then
62681	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62682        else
62683	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62684        fi
62685	# Put the nasty error message in config.log where it belongs
62686	echo "$ALSA_PKG_ERRORS" >&5
62687
62688	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62689$as_echo "no" >&6; }
62690                ALSA_FOUND=no
62691elif test $pkg_failed = untried; then
62692	ALSA_FOUND=no
62693else
62694	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62695	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62697$as_echo "yes" >&6; }
62698	ALSA_FOUND=yes
62699fi
62700      fi
62701    fi
62702    if test "x$ALSA_FOUND" = xno; then
62703      for ac_header in alsa/asoundlib.h
62704do :
62705  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62706if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62707  cat >>confdefs.h <<_ACEOF
62708#define HAVE_ALSA_ASOUNDLIB_H 1
62709_ACEOF
62710
62711            ALSA_FOUND=yes
62712            ALSA_CFLAGS=-Iignoreme
62713            ALSA_LIBS=-lasound
62714            DEFAULT_ALSA=yes
62715
62716else
62717  ALSA_FOUND=no
62718
62719fi
62720
62721done
62722
62723    fi
62724    if test "x$ALSA_FOUND" = xno; then
62725
62726  # Print a helpful message on how to acquire the necessary build dependency.
62727  # alsa is the help tag: freetype, cups, alsa etc
62728  MISSING_DEPENDENCY=alsa
62729
62730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62731    cygwin_help $MISSING_DEPENDENCY
62732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62733    msys_help $MISSING_DEPENDENCY
62734  else
62735    PKGHANDLER_COMMAND=
62736
62737    case $PKGHANDLER in
62738      apt-get)
62739        apt_help     $MISSING_DEPENDENCY ;;
62740      yum)
62741        yum_help     $MISSING_DEPENDENCY ;;
62742      port)
62743        port_help    $MISSING_DEPENDENCY ;;
62744      pkgutil)
62745        pkgutil_help $MISSING_DEPENDENCY ;;
62746      pkgadd)
62747        pkgadd_help  $MISSING_DEPENDENCY ;;
62748    esac
62749
62750    if test "x$PKGHANDLER_COMMAND" != x; then
62751      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62752    fi
62753  fi
62754
62755      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62756    fi
62757  fi
62758
62759
62760
62761
62762
62763
62764# Check whether --with-libffi was given.
62765if test "${with_libffi+set}" = set; then :
62766  withval=$with_libffi;
62767fi
62768
62769
62770# Check whether --with-libffi-include was given.
62771if test "${with_libffi_include+set}" = set; then :
62772  withval=$with_libffi_include;
62773fi
62774
62775
62776# Check whether --with-libffi-lib was given.
62777if test "${with_libffi_lib+set}" = set; then :
62778  withval=$with_libffi_lib;
62779fi
62780
62781
62782  if test "x$NEEDS_LIB_FFI" = xfalse; then
62783    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62784        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62785        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62786      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62787$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62788    fi
62789    LIBFFI_CFLAGS=
62790    LIBFFI_LIBS=
62791  else
62792    LIBFFI_FOUND=no
62793
62794    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62795      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62796    fi
62797
62798    if test "x${with_libffi}" != x; then
62799      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62800      LIBFFI_CFLAGS="-I${with_libffi}/include"
62801      LIBFFI_FOUND=yes
62802    fi
62803    if test "x${with_libffi_include}" != x; then
62804      LIBFFI_CFLAGS="-I${with_libffi_include}"
62805      LIBFFI_FOUND=yes
62806    fi
62807    if test "x${with_libffi_lib}" != x; then
62808      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62809      LIBFFI_FOUND=yes
62810    fi
62811    # Do not try pkg-config if we have a sysroot set.
62812    if test "x$SYSROOT" = x; then
62813      if test "x$LIBFFI_FOUND" = xno; then
62814        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62815
62816pkg_failed=no
62817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62818$as_echo_n "checking for LIBFFI... " >&6; }
62819
62820if test -n "$LIBFFI_CFLAGS"; then
62821    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62822 elif test -n "$PKG_CONFIG"; then
62823    if test -n "$PKG_CONFIG" && \
62824    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62825  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62826  ac_status=$?
62827  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62828  test $ac_status = 0; }; then
62829  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62830else
62831  pkg_failed=yes
62832fi
62833 else
62834    pkg_failed=untried
62835fi
62836if test -n "$LIBFFI_LIBS"; then
62837    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62838 elif test -n "$PKG_CONFIG"; then
62839    if test -n "$PKG_CONFIG" && \
62840    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62841  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62842  ac_status=$?
62843  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62844  test $ac_status = 0; }; then
62845  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62846else
62847  pkg_failed=yes
62848fi
62849 else
62850    pkg_failed=untried
62851fi
62852
62853
62854
62855if test $pkg_failed = yes; then
62856
62857if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62858        _pkg_short_errors_supported=yes
62859else
62860        _pkg_short_errors_supported=no
62861fi
62862        if test $_pkg_short_errors_supported = yes; then
62863	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62864        else
62865	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62866        fi
62867	# Put the nasty error message in config.log where it belongs
62868	echo "$LIBFFI_PKG_ERRORS" >&5
62869
62870	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62871$as_echo "no" >&6; }
62872                LIBFFI_FOUND=no
62873elif test $pkg_failed = untried; then
62874	LIBFFI_FOUND=no
62875else
62876	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62877	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62879$as_echo "yes" >&6; }
62880	LIBFFI_FOUND=yes
62881fi
62882      fi
62883    fi
62884    if test "x$LIBFFI_FOUND" = xno; then
62885      for ac_header in ffi.h
62886do :
62887  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62888if test "x$ac_cv_header_ffi_h" = xyes; then :
62889  cat >>confdefs.h <<_ACEOF
62890#define HAVE_FFI_H 1
62891_ACEOF
62892
62893            LIBFFI_FOUND=yes
62894            LIBFFI_CFLAGS=
62895            LIBFFI_LIBS=-lffi
62896
62897else
62898  LIBFFI_FOUND=no
62899
62900fi
62901
62902done
62903
62904    fi
62905    if test "x$LIBFFI_FOUND" = xno; then
62906
62907  # Print a helpful message on how to acquire the necessary build dependency.
62908  # ffi is the help tag: freetype, cups, alsa etc
62909  MISSING_DEPENDENCY=ffi
62910
62911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62912    cygwin_help $MISSING_DEPENDENCY
62913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62914    msys_help $MISSING_DEPENDENCY
62915  else
62916    PKGHANDLER_COMMAND=
62917
62918    case $PKGHANDLER in
62919      apt-get)
62920        apt_help     $MISSING_DEPENDENCY ;;
62921      yum)
62922        yum_help     $MISSING_DEPENDENCY ;;
62923      port)
62924        port_help    $MISSING_DEPENDENCY ;;
62925      pkgutil)
62926        pkgutil_help $MISSING_DEPENDENCY ;;
62927      pkgadd)
62928        pkgadd_help  $MISSING_DEPENDENCY ;;
62929    esac
62930
62931    if test "x$PKGHANDLER_COMMAND" != x; then
62932      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62933    fi
62934  fi
62935
62936      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62937    fi
62938
62939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62940$as_echo_n "checking if libffi works... " >&6; }
62941    ac_ext=c
62942ac_cpp='$CPP $CPPFLAGS'
62943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62945ac_compiler_gnu=$ac_cv_c_compiler_gnu
62946
62947    OLD_CFLAGS="$CFLAGS"
62948    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62949    OLD_LIBS="$LIBS"
62950    LIBS="$LIBS $LIBFFI_LIBS"
62951    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62952/* end confdefs.h.  */
62953#include <ffi.h>
62954int
62955main ()
62956{
62957
62958          ffi_call(NULL, NULL, NULL, NULL);
62959          return 0;
62960
62961  ;
62962  return 0;
62963}
62964_ACEOF
62965if ac_fn_c_try_link "$LINENO"; then :
62966  LIBFFI_WORKS=yes
62967else
62968  LIBFFI_WORKS=no
62969
62970fi
62971rm -f core conftest.err conftest.$ac_objext \
62972    conftest$ac_exeext conftest.$ac_ext
62973    CFLAGS="$OLD_CFLAGS"
62974    LIBS="$OLD_LIBS"
62975    ac_ext=cpp
62976ac_cpp='$CXXCPP $CPPFLAGS'
62977ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62978ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62979ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62980
62981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62982$as_echo "$LIBFFI_WORKS" >&6; }
62983
62984    if test "x$LIBFFI_WORKS" = xno; then
62985
62986  # Print a helpful message on how to acquire the necessary build dependency.
62987  # ffi is the help tag: freetype, cups, alsa etc
62988  MISSING_DEPENDENCY=ffi
62989
62990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62991    cygwin_help $MISSING_DEPENDENCY
62992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62993    msys_help $MISSING_DEPENDENCY
62994  else
62995    PKGHANDLER_COMMAND=
62996
62997    case $PKGHANDLER in
62998      apt-get)
62999        apt_help     $MISSING_DEPENDENCY ;;
63000      yum)
63001        yum_help     $MISSING_DEPENDENCY ;;
63002      port)
63003        port_help    $MISSING_DEPENDENCY ;;
63004      pkgutil)
63005        pkgutil_help $MISSING_DEPENDENCY ;;
63006      pkgadd)
63007        pkgadd_help  $MISSING_DEPENDENCY ;;
63008    esac
63009
63010    if test "x$PKGHANDLER_COMMAND" != x; then
63011      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63012    fi
63013  fi
63014
63015      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63016    fi
63017  fi
63018
63019
63020
63021
63022
63023  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63024    # Extract the first word of "llvm-config", so it can be a program name with args.
63025set dummy llvm-config; ac_word=$2
63026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63027$as_echo_n "checking for $ac_word... " >&6; }
63028if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63029  $as_echo_n "(cached) " >&6
63030else
63031  if test -n "$LLVM_CONFIG"; then
63032  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63033else
63034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63035for as_dir in $PATH
63036do
63037  IFS=$as_save_IFS
63038  test -z "$as_dir" && as_dir=.
63039    for ac_exec_ext in '' $ac_executable_extensions; do
63040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63041    ac_cv_prog_LLVM_CONFIG="llvm-config"
63042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63043    break 2
63044  fi
63045done
63046  done
63047IFS=$as_save_IFS
63048
63049fi
63050fi
63051LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63052if test -n "$LLVM_CONFIG"; then
63053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63054$as_echo "$LLVM_CONFIG" >&6; }
63055else
63056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63057$as_echo "no" >&6; }
63058fi
63059
63060
63061
63062    if test "x$LLVM_CONFIG" != xllvm-config; then
63063      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63064    fi
63065
63066    llvm_components="jit mcjit engine nativecodegen native"
63067    unset LLVM_CFLAGS
63068    for flag in $("$LLVM_CONFIG" --cxxflags); do
63069      if echo "${flag}" | grep -q '^-[ID]'; then
63070        if test "${flag}" != "-D_DEBUG" ; then
63071          if test "${LLVM_CFLAGS}" != "" ; then
63072            LLVM_CFLAGS="${LLVM_CFLAGS} "
63073          fi
63074          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63075        fi
63076      fi
63077    done
63078    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63079    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63080
63081    unset LLVM_LDFLAGS
63082    for flag in $("${LLVM_CONFIG}" --ldflags); do
63083      if echo "${flag}" | grep -q '^-L'; then
63084        if test "${LLVM_LDFLAGS}" != ""; then
63085          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63086        fi
63087        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63088      fi
63089    done
63090
63091    unset LLVM_LIBS
63092    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63093      if echo "${flag}" | grep -q '^-l'; then
63094        if test "${LLVM_LIBS}" != ""; then
63095          LLVM_LIBS="${LLVM_LIBS} "
63096        fi
63097        LLVM_LIBS="${LLVM_LIBS}${flag}"
63098      fi
63099    done
63100
63101    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63102    # always properly detect -ltinfo
63103    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63104
63105
63106
63107
63108  fi
63109
63110
63111
63112# Check whether --with-libjpeg was given.
63113if test "${with_libjpeg+set}" = set; then :
63114  withval=$with_libjpeg;
63115fi
63116
63117
63118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63119$as_echo_n "checking for which libjpeg to use... " >&6; }
63120  # default is bundled
63121  DEFAULT_LIBJPEG=bundled
63122  # if user didn't specify, use DEFAULT_LIBJPEG
63123  if test "x${with_libjpeg}" = "x"; then
63124    with_libjpeg=${DEFAULT_LIBJPEG}
63125  fi
63126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63127$as_echo "${with_libjpeg}" >&6; }
63128
63129  if test "x${with_libjpeg}" = "xbundled"; then
63130    USE_EXTERNAL_LIBJPEG=false
63131  elif test "x${with_libjpeg}" = "xsystem"; then
63132    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63133if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63134
63135else
63136   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63137fi
63138
63139
63140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63141$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63142if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63143  $as_echo_n "(cached) " >&6
63144else
63145  ac_check_lib_save_LIBS=$LIBS
63146LIBS="-ljpeg  $LIBS"
63147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63148/* end confdefs.h.  */
63149
63150/* Override any GCC internal prototype to avoid an error.
63151   Use char because int might match the return type of a GCC
63152   builtin and then its argument prototype would still apply.  */
63153#ifdef __cplusplus
63154extern "C"
63155#endif
63156char jpeg_CreateDecompress ();
63157int
63158main ()
63159{
63160return jpeg_CreateDecompress ();
63161  ;
63162  return 0;
63163}
63164_ACEOF
63165if ac_fn_cxx_try_link "$LINENO"; then :
63166  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63167else
63168  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63169fi
63170rm -f core conftest.err conftest.$ac_objext \
63171    conftest$ac_exeext conftest.$ac_ext
63172LIBS=$ac_check_lib_save_LIBS
63173fi
63174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63175$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63176if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63177  cat >>confdefs.h <<_ACEOF
63178#define HAVE_LIBJPEG 1
63179_ACEOF
63180
63181  LIBS="-ljpeg $LIBS"
63182
63183else
63184   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63185fi
63186
63187
63188    USE_EXTERNAL_LIBJPEG=true
63189  else
63190    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63191  fi
63192
63193
63194
63195
63196
63197# Check whether --with-giflib was given.
63198if test "${with_giflib+set}" = set; then :
63199  withval=$with_giflib;
63200fi
63201
63202
63203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63204$as_echo_n "checking for which giflib to use... " >&6; }
63205  # default is bundled
63206  DEFAULT_GIFLIB=bundled
63207  # if user didn't specify, use DEFAULT_GIFLIB
63208  if test "x${with_giflib}" = "x"; then
63209    with_giflib=${DEFAULT_GIFLIB}
63210  fi
63211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63212$as_echo "${with_giflib}" >&6; }
63213
63214  if test "x${with_giflib}" = "xbundled"; then
63215    USE_EXTERNAL_LIBGIF=false
63216  elif test "x${with_giflib}" = "xsystem"; then
63217    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63218if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63219
63220else
63221   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63222fi
63223
63224
63225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63226$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63227if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63228  $as_echo_n "(cached) " >&6
63229else
63230  ac_check_lib_save_LIBS=$LIBS
63231LIBS="-lgif  $LIBS"
63232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63233/* end confdefs.h.  */
63234
63235/* Override any GCC internal prototype to avoid an error.
63236   Use char because int might match the return type of a GCC
63237   builtin and then its argument prototype would still apply.  */
63238#ifdef __cplusplus
63239extern "C"
63240#endif
63241char DGifGetCode ();
63242int
63243main ()
63244{
63245return DGifGetCode ();
63246  ;
63247  return 0;
63248}
63249_ACEOF
63250if ac_fn_cxx_try_link "$LINENO"; then :
63251  ac_cv_lib_gif_DGifGetCode=yes
63252else
63253  ac_cv_lib_gif_DGifGetCode=no
63254fi
63255rm -f core conftest.err conftest.$ac_objext \
63256    conftest$ac_exeext conftest.$ac_ext
63257LIBS=$ac_check_lib_save_LIBS
63258fi
63259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63260$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63261if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63262  cat >>confdefs.h <<_ACEOF
63263#define HAVE_LIBGIF 1
63264_ACEOF
63265
63266  LIBS="-lgif $LIBS"
63267
63268else
63269   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63270fi
63271
63272
63273    USE_EXTERNAL_LIBGIF=true
63274  else
63275    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63276  fi
63277
63278
63279
63280
63281
63282# Check whether --with-libpng was given.
63283if test "${with_libpng+set}" = set; then :
63284  withval=$with_libpng;
63285fi
63286
63287
63288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63289$as_echo_n "checking for which libpng to use... " >&6; }
63290
63291  # default is bundled
63292  DEFAULT_LIBPNG=bundled
63293  # if user didn't specify, use DEFAULT_LIBPNG
63294  if test "x${with_libpng}" = "x"; then
63295      with_libpng=${DEFAULT_LIBPNG}
63296  fi
63297
63298  if test "x${with_libpng}" = "xbundled"; then
63299      USE_EXTERNAL_LIBPNG=false
63300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63301$as_echo "bundled" >&6; }
63302  elif test "x${with_libpng}" = "xsystem"; then
63303
63304pkg_failed=no
63305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63306$as_echo_n "checking for PNG... " >&6; }
63307
63308if test -n "$PNG_CFLAGS"; then
63309    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63310 elif test -n "$PKG_CONFIG"; then
63311    if test -n "$PKG_CONFIG" && \
63312    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63313  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63314  ac_status=$?
63315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63316  test $ac_status = 0; }; then
63317  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63318else
63319  pkg_failed=yes
63320fi
63321 else
63322    pkg_failed=untried
63323fi
63324if test -n "$PNG_LIBS"; then
63325    pkg_cv_PNG_LIBS="$PNG_LIBS"
63326 elif test -n "$PKG_CONFIG"; then
63327    if test -n "$PKG_CONFIG" && \
63328    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63329  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63330  ac_status=$?
63331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63332  test $ac_status = 0; }; then
63333  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63334else
63335  pkg_failed=yes
63336fi
63337 else
63338    pkg_failed=untried
63339fi
63340
63341
63342
63343if test $pkg_failed = yes; then
63344
63345if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63346        _pkg_short_errors_supported=yes
63347else
63348        _pkg_short_errors_supported=no
63349fi
63350        if test $_pkg_short_errors_supported = yes; then
63351	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63352        else
63353	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63354        fi
63355	# Put the nasty error message in config.log where it belongs
63356	echo "$PNG_PKG_ERRORS" >&5
63357
63358	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63359$as_echo "no" >&6; }
63360                 LIBPNG_FOUND=no
63361elif test $pkg_failed = untried; then
63362	 LIBPNG_FOUND=no
63363else
63364	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63365	PNG_LIBS=$pkg_cv_PNG_LIBS
63366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63367$as_echo "yes" >&6; }
63368	 LIBPNG_FOUND=yes
63369fi
63370      if test "x${LIBPNG_FOUND}" = "xyes"; then
63371          USE_EXTERNAL_LIBPNG=true
63372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63373$as_echo "system" >&6; }
63374      else
63375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63376$as_echo "system not found" >&6; }
63377          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63378      fi
63379  else
63380      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63381  fi
63382
63383
63384
63385
63386
63387# Check whether --with-zlib was given.
63388if test "${with_zlib+set}" = set; then :
63389  withval=$with_zlib;
63390fi
63391
63392
63393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63394$as_echo_n "checking for compress in -lz... " >&6; }
63395if ${ac_cv_lib_z_compress+:} false; then :
63396  $as_echo_n "(cached) " >&6
63397else
63398  ac_check_lib_save_LIBS=$LIBS
63399LIBS="-lz  $LIBS"
63400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63401/* end confdefs.h.  */
63402
63403/* Override any GCC internal prototype to avoid an error.
63404   Use char because int might match the return type of a GCC
63405   builtin and then its argument prototype would still apply.  */
63406#ifdef __cplusplus
63407extern "C"
63408#endif
63409char compress ();
63410int
63411main ()
63412{
63413return compress ();
63414  ;
63415  return 0;
63416}
63417_ACEOF
63418if ac_fn_cxx_try_link "$LINENO"; then :
63419  ac_cv_lib_z_compress=yes
63420else
63421  ac_cv_lib_z_compress=no
63422fi
63423rm -f core conftest.err conftest.$ac_objext \
63424    conftest$ac_exeext conftest.$ac_ext
63425LIBS=$ac_check_lib_save_LIBS
63426fi
63427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63428$as_echo "$ac_cv_lib_z_compress" >&6; }
63429if test "x$ac_cv_lib_z_compress" = xyes; then :
63430   ZLIB_FOUND=yes
63431else
63432   ZLIB_FOUND=no
63433fi
63434
63435
63436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63437$as_echo_n "checking for which zlib to use... " >&6; }
63438
63439  DEFAULT_ZLIB=system
63440  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63441    # On windows default is bundled...on others default is system
63442    DEFAULT_ZLIB=bundled
63443  fi
63444
63445  if test "x${ZLIB_FOUND}" != "xyes"; then
63446    # If we don't find any system...set default to bundled
63447    DEFAULT_ZLIB=bundled
63448  fi
63449
63450  # If user didn't specify, use DEFAULT_ZLIB
63451  if test "x${with_zlib}" = "x"; then
63452    with_zlib=${DEFAULT_ZLIB}
63453  fi
63454
63455  if test "x${with_zlib}" = "xbundled"; then
63456    USE_EXTERNAL_LIBZ=false
63457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63458$as_echo "bundled" >&6; }
63459  elif test "x${with_zlib}" = "xsystem"; then
63460    if test "x${ZLIB_FOUND}" = "xyes"; then
63461      USE_EXTERNAL_LIBZ=true
63462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63463$as_echo "system" >&6; }
63464    else
63465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63466$as_echo "system not found" >&6; }
63467      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63468    fi
63469  else
63470    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63471  fi
63472
63473
63474
63475
63476
63477# Check whether --with-lcms was given.
63478if test "${with_lcms+set}" = set; then :
63479  withval=$with_lcms;
63480fi
63481
63482
63483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63484$as_echo_n "checking for which lcms to use... " >&6; }
63485
63486  DEFAULT_LCMS=bundled
63487  # If user didn't specify, use DEFAULT_LCMS
63488  if test "x${with_lcms}" = "x"; then
63489      with_lcms=${DEFAULT_LCMS}
63490  fi
63491
63492  if test "x${with_lcms}" = "xbundled"; then
63493    USE_EXTERNAL_LCMS=false
63494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63495$as_echo "bundled" >&6; }
63496  elif test "x${with_lcms}" = "xsystem"; then
63497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63498$as_echo "system" >&6; }
63499
63500pkg_failed=no
63501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63502$as_echo_n "checking for LCMS... " >&6; }
63503
63504if test -n "$LCMS_CFLAGS"; then
63505    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63506 elif test -n "$PKG_CONFIG"; then
63507    if test -n "$PKG_CONFIG" && \
63508    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63509  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63510  ac_status=$?
63511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63512  test $ac_status = 0; }; then
63513  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63514else
63515  pkg_failed=yes
63516fi
63517 else
63518    pkg_failed=untried
63519fi
63520if test -n "$LCMS_LIBS"; then
63521    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63522 elif test -n "$PKG_CONFIG"; then
63523    if test -n "$PKG_CONFIG" && \
63524    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63525  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63526  ac_status=$?
63527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63528  test $ac_status = 0; }; then
63529  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63530else
63531  pkg_failed=yes
63532fi
63533 else
63534    pkg_failed=untried
63535fi
63536
63537
63538
63539if test $pkg_failed = yes; then
63540
63541if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63542        _pkg_short_errors_supported=yes
63543else
63544        _pkg_short_errors_supported=no
63545fi
63546        if test $_pkg_short_errors_supported = yes; then
63547	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63548        else
63549	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63550        fi
63551	# Put the nasty error message in config.log where it belongs
63552	echo "$LCMS_PKG_ERRORS" >&5
63553
63554	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63555$as_echo "no" >&6; }
63556                LCMS_FOUND=no
63557elif test $pkg_failed = untried; then
63558	LCMS_FOUND=no
63559else
63560	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63561	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63563$as_echo "yes" >&6; }
63564	LCMS_FOUND=yes
63565fi
63566    if test "x${LCMS_FOUND}" = "xyes"; then
63567      USE_EXTERNAL_LCMS=true
63568    else
63569      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63570    fi
63571  else
63572    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63573  fi
63574
63575
63576
63577
63578
63579
63580
63581
63582
63583
63584
63585  # Setup libm (the maths library)
63586  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63588$as_echo_n "checking for cos in -lm... " >&6; }
63589if ${ac_cv_lib_m_cos+:} false; then :
63590  $as_echo_n "(cached) " >&6
63591else
63592  ac_check_lib_save_LIBS=$LIBS
63593LIBS="-lm  $LIBS"
63594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63595/* end confdefs.h.  */
63596
63597/* Override any GCC internal prototype to avoid an error.
63598   Use char because int might match the return type of a GCC
63599   builtin and then its argument prototype would still apply.  */
63600#ifdef __cplusplus
63601extern "C"
63602#endif
63603char cos ();
63604int
63605main ()
63606{
63607return cos ();
63608  ;
63609  return 0;
63610}
63611_ACEOF
63612if ac_fn_cxx_try_link "$LINENO"; then :
63613  ac_cv_lib_m_cos=yes
63614else
63615  ac_cv_lib_m_cos=no
63616fi
63617rm -f core conftest.err conftest.$ac_objext \
63618    conftest$ac_exeext conftest.$ac_ext
63619LIBS=$ac_check_lib_save_LIBS
63620fi
63621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63622$as_echo "$ac_cv_lib_m_cos" >&6; }
63623if test "x$ac_cv_lib_m_cos" = xyes; then :
63624  cat >>confdefs.h <<_ACEOF
63625#define HAVE_LIBM 1
63626_ACEOF
63627
63628  LIBS="-lm $LIBS"
63629
63630else
63631
63632        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63633$as_echo "$as_me: Maths library was not found" >&6;}
63634
63635fi
63636
63637    LIBM="-lm"
63638  else
63639    LIBM=""
63640  fi
63641
63642
63643  # Setup libdl (for dynamic library loading)
63644  save_LIBS="$LIBS"
63645  LIBS=""
63646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63647$as_echo_n "checking for dlopen in -ldl... " >&6; }
63648if ${ac_cv_lib_dl_dlopen+:} false; then :
63649  $as_echo_n "(cached) " >&6
63650else
63651  ac_check_lib_save_LIBS=$LIBS
63652LIBS="-ldl  $LIBS"
63653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63654/* end confdefs.h.  */
63655
63656/* Override any GCC internal prototype to avoid an error.
63657   Use char because int might match the return type of a GCC
63658   builtin and then its argument prototype would still apply.  */
63659#ifdef __cplusplus
63660extern "C"
63661#endif
63662char dlopen ();
63663int
63664main ()
63665{
63666return dlopen ();
63667  ;
63668  return 0;
63669}
63670_ACEOF
63671if ac_fn_cxx_try_link "$LINENO"; then :
63672  ac_cv_lib_dl_dlopen=yes
63673else
63674  ac_cv_lib_dl_dlopen=no
63675fi
63676rm -f core conftest.err conftest.$ac_objext \
63677    conftest$ac_exeext conftest.$ac_ext
63678LIBS=$ac_check_lib_save_LIBS
63679fi
63680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63681$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63682if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63683  cat >>confdefs.h <<_ACEOF
63684#define HAVE_LIBDL 1
63685_ACEOF
63686
63687  LIBS="-ldl $LIBS"
63688
63689fi
63690
63691  LIBDL="$LIBS"
63692
63693  LIBS="$save_LIBS"
63694
63695  # Deprecated libraries, keep the flags for backwards compatibility
63696  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63697
63698
63699# Check whether --with-dxsdk was given.
63700if test "${with_dxsdk+set}" = set; then :
63701  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63702$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63703fi
63704
63705
63706
63707
63708# Check whether --with-dxsdk-lib was given.
63709if test "${with_dxsdk_lib+set}" = set; then :
63710  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63711$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63712fi
63713
63714
63715
63716
63717# Check whether --with-dxsdk-include was given.
63718if test "${with_dxsdk_include+set}" = set; then :
63719  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63720$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63721fi
63722
63723
63724  fi
63725
63726  # Control if libzip can use mmap. Available for purposes of overriding.
63727  LIBZIP_CAN_USE_MMAP=true
63728
63729
63730
63731
63732
63733
63734
63735
63736
63737
63738
63739
63740
63741
63742###############################################################################
63743#
63744# We need to do some final tweaking, when everything else is done.
63745#
63746###############################################################################
63747
63748
63749  # Check whether --enable-new-hotspot-build was given.
63750if test "${enable_new_hotspot_build+set}" = set; then :
63751  enableval=$enable_new_hotspot_build;
63752fi
63753
63754
63755   if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63756     USE_NEW_HOTSPOT_BUILD=true
63757   else
63758     USE_NEW_HOTSPOT_BUILD=false
63759   fi
63760
63761
63762  case $HOTSPOT_DEBUG_LEVEL in
63763    product )
63764      VARIANT="OPT"
63765      FASTDEBUG="false"
63766      DEBUG_CLASSFILES="false"
63767      ;;
63768    fastdebug )
63769      VARIANT="DBG"
63770      FASTDEBUG="true"
63771      DEBUG_CLASSFILES="true"
63772      ;;
63773    debug )
63774      VARIANT="DBG"
63775      FASTDEBUG="false"
63776      DEBUG_CLASSFILES="true"
63777      ;;
63778    optimized )
63779      VARIANT="OPT"
63780      FASTDEBUG="false"
63781      DEBUG_CLASSFILES="false"
63782      ;;
63783  esac
63784
63785
63786
63787
63788  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63789    MACOSX_UNIVERSAL="true"
63790  fi
63791
63792
63793
63794  # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63795  JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63796
63797  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63798  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63799  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63800  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63801  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63802  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63803  JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63804
63805  #####
63806  # Generate the legacy makefile targets for hotspot.
63807  HOTSPOT_TARGET=""
63808
63809  if test "x$JVM_VARIANT_SERVER" = xtrue; then
63810    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63811  fi
63812
63813  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63814    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63815  fi
63816
63817  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63818    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63819  fi
63820
63821  if test "x$JVM_VARIANT_ZERO" = xtrue; then
63822    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63823  fi
63824
63825  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63826    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63827  fi
63828
63829  if test "x$JVM_VARIANT_CORE" = xtrue; then
63830    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63831  fi
63832
63833  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63834
63835  # On Macosx universal binaries are produced, but they only contain
63836  # 64 bit intel. This invalidates control of which jvms are built
63837  # from configure, but only server is valid anyway. Fix this
63838  # when hotspot makefiles are rewritten.
63839  if test "x$MACOSX_UNIVERSAL" = xtrue; then
63840    HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63841  fi
63842
63843  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63844
63845
63846  # Control wether Hotspot runs Queens test after build.
63847  # Check whether --enable-hotspot-test-in-build was given.
63848if test "${enable_hotspot_test_in_build+set}" = set; then :
63849  enableval=$enable_hotspot_test_in_build;
63850else
63851  enable_hotspot_test_in_build=no
63852fi
63853
63854  if test "x$enable_hotspot_test_in_build" = "xyes"; then
63855    TEST_IN_BUILD=true
63856  else
63857    TEST_IN_BUILD=false
63858  fi
63859
63860
63861  if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63862    if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63863      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63864        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63865      fi
63866    fi
63867    if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63868      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63869        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63870      fi
63871    fi
63872    if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63873        as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63874    fi
63875  fi
63876
63877
63878
63879
63880
63881
63882
63883
63884
63885
63886
63887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63888$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63889
63890  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63891    ENABLE_INTREE_EC=yes
63892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63893$as_echo "yes" >&6; }
63894  else
63895    ENABLE_INTREE_EC=no
63896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63897$as_echo "no" >&6; }
63898  fi
63899
63900
63901
63902
63903  # Check whether --enable-jtreg-failure-handler was given.
63904if test "${enable_jtreg_failure_handler+set}" = set; then :
63905  enableval=$enable_jtreg_failure_handler;
63906fi
63907
63908
63909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63910$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63911
63912  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63913    if test "x$JT_HOME" = "x"; then
63914      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63915    else
63916      BUILD_FAILURE_HANDLER=true
63917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63918$as_echo "yes, forced" >&6; }
63919    fi
63920  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63921    BUILD_FAILURE_HANDLER=false
63922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63923$as_echo "no, forced" >&6; }
63924  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63925      || test "x$enable_jtreg_failure_handler" = "x"; then
63926    if test "x$JT_HOME" = "x"; then
63927      BUILD_FAILURE_HANDLER=false
63928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63929$as_echo "no, missing jtreg" >&6; }
63930    else
63931      BUILD_FAILURE_HANDLER=true
63932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63933$as_echo "yes, jtreg present" >&6; }
63934    fi
63935  else
63936    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63937  fi
63938
63939
63940
63941
63942###############################################################################
63943#
63944# Configure parts of the build that only affect the build performance,
63945# not the result.
63946#
63947###############################################################################
63948
63949
63950  # How many cores do we have on this build system?
63951
63952# Check whether --with-num-cores was given.
63953if test "${with_num_cores+set}" = set; then :
63954  withval=$with_num_cores;
63955fi
63956
63957  if test "x$with_num_cores" = x; then
63958    # The number of cores were not specified, try to probe them.
63959
63960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63961$as_echo_n "checking for number of cores... " >&6; }
63962  NUM_CORES=1
63963  FOUND_CORES=no
63964
63965  if test -f /proc/cpuinfo; then
63966    # Looks like a Linux (or cygwin) system
63967    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63968    FOUND_CORES=yes
63969  elif test -x /usr/sbin/psrinfo; then
63970    # Looks like a Solaris system
63971    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63972    FOUND_CORES=yes
63973  elif test -x /usr/sbin/sysctl; then
63974    # Looks like a MacOSX system
63975    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63976    FOUND_CORES=yes
63977  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63978    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63979    FOUND_CORES=yes
63980  elif test -n "$NUMBER_OF_PROCESSORS"; then
63981    # On windows, look in the env
63982    NUM_CORES=$NUMBER_OF_PROCESSORS
63983    FOUND_CORES=yes
63984  fi
63985
63986  if test "x$FOUND_CORES" = xyes; then
63987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63988$as_echo "$NUM_CORES" >&6; }
63989  else
63990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63991$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63992    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63993$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63994  fi
63995
63996  else
63997    NUM_CORES=$with_num_cores
63998  fi
63999
64000
64001
64002  # How much memory do we have on this build system?
64003
64004# Check whether --with-memory-size was given.
64005if test "${with_memory_size+set}" = set; then :
64006  withval=$with_memory_size;
64007fi
64008
64009  if test "x$with_memory_size" = x; then
64010    # The memory size was not specified, try to probe it.
64011
64012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64013$as_echo_n "checking for memory size... " >&6; }
64014  # Default to 1024 MB
64015  MEMORY_SIZE=1024
64016  FOUND_MEM=no
64017
64018  if test -f /proc/meminfo; then
64019    # Looks like a Linux (or cygwin) system
64020    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64021    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64022    FOUND_MEM=yes
64023  elif test -x /usr/sbin/prtconf; then
64024    # Looks like a Solaris or AIX system
64025    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64026    FOUND_MEM=yes
64027  elif test -x /usr/sbin/sysctl; then
64028    # Looks like a MacOSX system
64029    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64030    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64031    FOUND_MEM=yes
64032  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64033    # Windows, but without cygwin
64034    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64035    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64036    FOUND_MEM=yes
64037  fi
64038
64039  if test "x$FOUND_MEM" = xyes; then
64040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64041$as_echo "$MEMORY_SIZE MB" >&6; }
64042  else
64043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64044$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64045    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64046$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64047  fi
64048
64049  else
64050    MEMORY_SIZE=$with_memory_size
64051  fi
64052
64053
64054
64055  # Provide a decent default number of parallel jobs for make depending on
64056  # number of cores, amount of memory and machine architecture.
64057
64058# Check whether --with-jobs was given.
64059if test "${with_jobs+set}" = set; then :
64060  withval=$with_jobs;
64061fi
64062
64063  if test "x$with_jobs" = x; then
64064    # Number of jobs was not specified, calculate.
64065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64066$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64067    # Approximate memory in GB.
64068    memory_gb=`expr $MEMORY_SIZE / 1024`
64069    # Pick the lowest of memory in gb and number of cores.
64070    if test "$memory_gb" -lt "$NUM_CORES"; then
64071      JOBS="$memory_gb"
64072    else
64073      JOBS="$NUM_CORES"
64074    fi
64075    if test "$JOBS" -eq "0"; then
64076      JOBS=1
64077    fi
64078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64079$as_echo "$JOBS" >&6; }
64080  else
64081    JOBS=$with_jobs
64082  fi
64083
64084
64085
64086  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64087
64088# Check whether --with-test-jobs was given.
64089if test "${with_test_jobs+set}" = set; then :
64090  withval=$with_test_jobs;
64091fi
64092
64093  if test "x$with_test_jobs" = x; then
64094      TEST_JOBS=0
64095  else
64096      TEST_JOBS=$with_test_jobs
64097  fi
64098
64099
64100
64101# Setup arguments for the boot jdk (after cores and memory have been setup)
64102
64103  ##############################################################################
64104  #
64105  # Specify jvm options for anything that is run with the Boot JDK.
64106  # Not all JVM:s accept the same arguments on the command line.
64107  #
64108
64109# Check whether --with-boot-jdk-jvmargs was given.
64110if test "${with_boot_jdk_jvmargs+set}" = set; then :
64111  withval=$with_boot_jdk_jvmargs;
64112fi
64113
64114
64115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64116$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64117
64118  # Disable special log output when a debug build is used as Boot JDK...
64119
64120  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64121  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64122  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64123  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64124  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64125  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64126    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64127    JVM_ARG_OK=true
64128  else
64129    $ECHO "Arg failed:" >&5
64130    $ECHO "$OUTPUT" >&5
64131    JVM_ARG_OK=false
64132  fi
64133
64134
64135  # Apply user provided options.
64136
64137  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64138  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64139  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64140  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64141  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64142  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64143    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64144    JVM_ARG_OK=true
64145  else
64146    $ECHO "Arg failed:" >&5
64147    $ECHO "$OUTPUT" >&5
64148    JVM_ARG_OK=false
64149  fi
64150
64151
64152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64153$as_echo "$boot_jdk_jvmargs" >&6; }
64154
64155  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64156  JAVA_FLAGS=$boot_jdk_jvmargs
64157
64158
64159
64160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64161$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64162
64163  # Starting amount of heap memory.
64164
64165  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64166  $ECHO "Command: $JAVA -Xms64M -version" >&5
64167  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64168  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64169  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64170  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64171    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64172    JVM_ARG_OK=true
64173  else
64174    $ECHO "Arg failed:" >&5
64175    $ECHO "$OUTPUT" >&5
64176    JVM_ARG_OK=false
64177  fi
64178
64179
64180  # Maximum amount of heap memory.
64181  # Maximum stack size.
64182  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64183  if test "x$BOOT_JDK_BITS" = "x32"; then
64184    if test "$JVM_MAX_HEAP" -gt "1100"; then
64185      JVM_MAX_HEAP=1100
64186    elif test "$JVM_MAX_HEAP" -lt "512"; then
64187      JVM_MAX_HEAP=512
64188    fi
64189    STACK_SIZE=768
64190  else
64191    # Running a 64 bit JVM allows for and requires a bigger heap
64192    if test "$JVM_MAX_HEAP" -gt "1600"; then
64193      JVM_MAX_HEAP=1600
64194    elif test "$JVM_MAX_HEAP" -lt "512"; then
64195      JVM_MAX_HEAP=512
64196    fi
64197    STACK_SIZE=1536
64198  fi
64199
64200  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64201  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64202  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64203  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64204  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64206    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64207    JVM_ARG_OK=true
64208  else
64209    $ECHO "Arg failed:" >&5
64210    $ECHO "$OUTPUT" >&5
64211    JVM_ARG_OK=false
64212  fi
64213
64214
64215  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64216  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64217  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64218  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64219  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64220  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64221    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64222    JVM_ARG_OK=true
64223  else
64224    $ECHO "Arg failed:" >&5
64225    $ECHO "$OUTPUT" >&5
64226    JVM_ARG_OK=false
64227  fi
64228
64229
64230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64231$as_echo "$boot_jdk_jvmargs_big" >&6; }
64232
64233  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64234
64235
64236  # By default, the main javac compilations use big
64237  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64238
64239
64240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64241$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64242
64243  # Use serial gc for small short lived tools if possible
64244
64245  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64246  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64247  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64248  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64249  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64250  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64251    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64252    JVM_ARG_OK=true
64253  else
64254    $ECHO "Arg failed:" >&5
64255    $ECHO "$OUTPUT" >&5
64256    JVM_ARG_OK=false
64257  fi
64258
64259
64260  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64261  $ECHO "Command: $JAVA -Xms32M -version" >&5
64262  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64263  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64264  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64265  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64266    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64267    JVM_ARG_OK=true
64268  else
64269    $ECHO "Arg failed:" >&5
64270    $ECHO "$OUTPUT" >&5
64271    JVM_ARG_OK=false
64272  fi
64273
64274
64275  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64276  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64277  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64278  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64279  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64280  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64281    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64282    JVM_ARG_OK=true
64283  else
64284    $ECHO "Arg failed:" >&5
64285    $ECHO "$OUTPUT" >&5
64286    JVM_ARG_OK=false
64287  fi
64288
64289
64290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64291$as_echo "$boot_jdk_jvmargs_small" >&6; }
64292
64293  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64294
64295
64296  JAVA_TOOL_FLAGS_SMALL=""
64297  for f in $JAVA_FLAGS_SMALL; do
64298    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64299  done
64300
64301
64302
64303# Setup smart javac (after cores and memory have been setup)
64304
64305
64306# Check whether --with-sjavac-server-java was given.
64307if test "${with_sjavac_server_java+set}" = set; then :
64308  withval=$with_sjavac_server_java;
64309fi
64310
64311
64312  if test "x$with_sjavac_server_java" != x; then
64313    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64314    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64315    if test "x$FOUND_VERSION" = x; then
64316      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64317    fi
64318  else
64319    SJAVAC_SERVER_JAVA="$JAVA"
64320  fi
64321
64322
64323  if test "$MEMORY_SIZE" -gt "3000"; then
64324
64325  $ECHO "Check if jvm arg is ok: -d64" >&5
64326  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64327  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64328  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64329  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64330  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64331    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64332    JVM_ARG_OK=true
64333  else
64334    $ECHO "Arg failed:" >&5
64335    $ECHO "$OUTPUT" >&5
64336    JVM_ARG_OK=false
64337  fi
64338
64339    if test "$JVM_ARG_OK" = true; then
64340      JVM_64BIT=true
64341      JVM_ARG_OK=false
64342    fi
64343  fi
64344
64345  MX_VALUE=`expr $MEMORY_SIZE / 2`
64346  if test "$JVM_64BIT" = true; then
64347    # Set ms lower than mx since more than one instance of the server might
64348    # get launched at the same time before they figure out which instance won.
64349    MS_VALUE=512
64350    if test "$MX_VALUE" -gt "2048"; then
64351      MX_VALUE=2048
64352    fi
64353  else
64354    MS_VALUE=256
64355    if test "$MX_VALUE" -gt "1500"; then
64356      MX_VALUE=1500
64357    fi
64358  fi
64359  if test "$MX_VALUE" -lt "512"; then
64360    MX_VALUE=512
64361  fi
64362
64363  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64364  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64365  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64366  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64367  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64368  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64369    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64370    JVM_ARG_OK=true
64371  else
64372    $ECHO "Arg failed:" >&5
64373    $ECHO "$OUTPUT" >&5
64374    JVM_ARG_OK=false
64375  fi
64376
64377
64378
64379  # Check whether --enable-sjavac was given.
64380if test "${enable_sjavac+set}" = set; then :
64381  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64382else
64383  ENABLE_SJAVAC="no"
64384fi
64385
64386  if test "x$JVM_ARG_OK" = "xfalse"; then
64387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64388$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64389    ENABLE_SJAVAC="no"
64390  fi
64391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64392$as_echo_n "checking whether to use sjavac... " >&6; }
64393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64394$as_echo "$ENABLE_SJAVAC" >&6; }
64395
64396
64397  # Check whether --enable-javac-server was given.
64398if test "${enable_javac_server+set}" = set; then :
64399  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64400else
64401  ENABLE_JAVAC_SERVER="yes"
64402fi
64403
64404  if test "x$JVM_ARG_OK" = "xfalse"; then
64405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64406$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64407    ENABLE_JAVAC_SERVER="no"
64408  fi
64409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64410$as_echo_n "checking whether to use javac server... " >&6; }
64411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64412$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64413
64414
64415  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64416    # When using a server javac, the small client instances do not need much
64417    # resources.
64418    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64419  fi
64420
64421
64422# Setup use of icecc if requested
64423
64424  # Check whether --enable-icecc was given.
64425if test "${enable_icecc+set}" = set; then :
64426  enableval=$enable_icecc;
64427fi
64428
64429
64430  if test "x${enable_icecc}" = "xyes"; then
64431
64432
64433
64434  # Publish this variable in the help.
64435
64436
64437  if [ -z "${ICECC_CMD+x}" ]; then
64438    # The variable is not set by user, try to locate tool using the code snippet
64439    for ac_prog in icecc
64440do
64441  # Extract the first word of "$ac_prog", so it can be a program name with args.
64442set dummy $ac_prog; ac_word=$2
64443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64444$as_echo_n "checking for $ac_word... " >&6; }
64445if ${ac_cv_path_ICECC_CMD+:} false; then :
64446  $as_echo_n "(cached) " >&6
64447else
64448  case $ICECC_CMD in
64449  [\\/]* | ?:[\\/]*)
64450  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64451  ;;
64452  *)
64453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64454for as_dir in $PATH
64455do
64456  IFS=$as_save_IFS
64457  test -z "$as_dir" && as_dir=.
64458    for ac_exec_ext in '' $ac_executable_extensions; do
64459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64460    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64462    break 2
64463  fi
64464done
64465  done
64466IFS=$as_save_IFS
64467
64468  ;;
64469esac
64470fi
64471ICECC_CMD=$ac_cv_path_ICECC_CMD
64472if test -n "$ICECC_CMD"; then
64473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64474$as_echo "$ICECC_CMD" >&6; }
64475else
64476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64477$as_echo "no" >&6; }
64478fi
64479
64480
64481  test -n "$ICECC_CMD" && break
64482done
64483
64484  else
64485    # The variable is set, but is it from the command line or the environment?
64486
64487    # Try to remove the string !ICECC_CMD! from our list.
64488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64490      # If it failed, the variable was not from the command line. Ignore it,
64491      # but warn the user (except for BASH, which is always set by the calling BASH).
64492      if test "xICECC_CMD" != xBASH; then
64493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64494$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64495      fi
64496      # Try to locate tool using the code snippet
64497      for ac_prog in icecc
64498do
64499  # Extract the first word of "$ac_prog", so it can be a program name with args.
64500set dummy $ac_prog; ac_word=$2
64501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64502$as_echo_n "checking for $ac_word... " >&6; }
64503if ${ac_cv_path_ICECC_CMD+:} false; then :
64504  $as_echo_n "(cached) " >&6
64505else
64506  case $ICECC_CMD in
64507  [\\/]* | ?:[\\/]*)
64508  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64509  ;;
64510  *)
64511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64512for as_dir in $PATH
64513do
64514  IFS=$as_save_IFS
64515  test -z "$as_dir" && as_dir=.
64516    for ac_exec_ext in '' $ac_executable_extensions; do
64517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64518    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64520    break 2
64521  fi
64522done
64523  done
64524IFS=$as_save_IFS
64525
64526  ;;
64527esac
64528fi
64529ICECC_CMD=$ac_cv_path_ICECC_CMD
64530if test -n "$ICECC_CMD"; then
64531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64532$as_echo "$ICECC_CMD" >&6; }
64533else
64534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64535$as_echo "no" >&6; }
64536fi
64537
64538
64539  test -n "$ICECC_CMD" && break
64540done
64541
64542    else
64543      # If it succeeded, then it was overridden by the user. We will use it
64544      # for the tool.
64545
64546      # First remove it from the list of overridden variables, so we can test
64547      # for unknown variables in the end.
64548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64549
64550      # Check if we try to supply an empty value
64551      if test "x$ICECC_CMD" = x; then
64552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64553$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64555$as_echo_n "checking for ICECC_CMD... " >&6; }
64556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64557$as_echo "disabled" >&6; }
64558      else
64559        # Check if the provided tool contains a complete path.
64560        tool_specified="$ICECC_CMD"
64561        tool_basename="${tool_specified##*/}"
64562        if test "x$tool_basename" = "x$tool_specified"; then
64563          # A command without a complete path is provided, search $PATH.
64564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64565$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64566          # Extract the first word of "$tool_basename", so it can be a program name with args.
64567set dummy $tool_basename; ac_word=$2
64568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64569$as_echo_n "checking for $ac_word... " >&6; }
64570if ${ac_cv_path_ICECC_CMD+:} false; then :
64571  $as_echo_n "(cached) " >&6
64572else
64573  case $ICECC_CMD in
64574  [\\/]* | ?:[\\/]*)
64575  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64576  ;;
64577  *)
64578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64579for as_dir in $PATH
64580do
64581  IFS=$as_save_IFS
64582  test -z "$as_dir" && as_dir=.
64583    for ac_exec_ext in '' $ac_executable_extensions; do
64584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64585    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64587    break 2
64588  fi
64589done
64590  done
64591IFS=$as_save_IFS
64592
64593  ;;
64594esac
64595fi
64596ICECC_CMD=$ac_cv_path_ICECC_CMD
64597if test -n "$ICECC_CMD"; then
64598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64599$as_echo "$ICECC_CMD" >&6; }
64600else
64601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64602$as_echo "no" >&6; }
64603fi
64604
64605
64606          if test "x$ICECC_CMD" = x; then
64607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64608          fi
64609        else
64610          # Otherwise we believe it is a complete path. Use it as it is.
64611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64612$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64614$as_echo_n "checking for ICECC_CMD... " >&6; }
64615          if test ! -x "$tool_specified"; then
64616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64617$as_echo "not found" >&6; }
64618            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64619          fi
64620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64621$as_echo "$tool_specified" >&6; }
64622        fi
64623      fi
64624    fi
64625
64626  fi
64627
64628
64629
64630  if test "x$ICECC_CMD" = x; then
64631    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64632  fi
64633
64634
64635    old_path="$PATH"
64636
64637    # Look for icecc-create-env in some known places
64638    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64639
64640
64641
64642  # Publish this variable in the help.
64643
64644
64645  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64646    # The variable is not set by user, try to locate tool using the code snippet
64647    for ac_prog in icecc-create-env
64648do
64649  # Extract the first word of "$ac_prog", so it can be a program name with args.
64650set dummy $ac_prog; ac_word=$2
64651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64652$as_echo_n "checking for $ac_word... " >&6; }
64653if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64654  $as_echo_n "(cached) " >&6
64655else
64656  case $ICECC_CREATE_ENV in
64657  [\\/]* | ?:[\\/]*)
64658  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64659  ;;
64660  *)
64661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64662for as_dir in $PATH
64663do
64664  IFS=$as_save_IFS
64665  test -z "$as_dir" && as_dir=.
64666    for ac_exec_ext in '' $ac_executable_extensions; do
64667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64668    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64670    break 2
64671  fi
64672done
64673  done
64674IFS=$as_save_IFS
64675
64676  ;;
64677esac
64678fi
64679ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64680if test -n "$ICECC_CREATE_ENV"; then
64681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64682$as_echo "$ICECC_CREATE_ENV" >&6; }
64683else
64684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64685$as_echo "no" >&6; }
64686fi
64687
64688
64689  test -n "$ICECC_CREATE_ENV" && break
64690done
64691
64692  else
64693    # The variable is set, but is it from the command line or the environment?
64694
64695    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64698      # If it failed, the variable was not from the command line. Ignore it,
64699      # but warn the user (except for BASH, which is always set by the calling BASH).
64700      if test "xICECC_CREATE_ENV" != xBASH; then
64701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64702$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64703      fi
64704      # Try to locate tool using the code snippet
64705      for ac_prog in icecc-create-env
64706do
64707  # Extract the first word of "$ac_prog", so it can be a program name with args.
64708set dummy $ac_prog; ac_word=$2
64709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64710$as_echo_n "checking for $ac_word... " >&6; }
64711if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64712  $as_echo_n "(cached) " >&6
64713else
64714  case $ICECC_CREATE_ENV in
64715  [\\/]* | ?:[\\/]*)
64716  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64717  ;;
64718  *)
64719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64720for as_dir in $PATH
64721do
64722  IFS=$as_save_IFS
64723  test -z "$as_dir" && as_dir=.
64724    for ac_exec_ext in '' $ac_executable_extensions; do
64725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64726    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64728    break 2
64729  fi
64730done
64731  done
64732IFS=$as_save_IFS
64733
64734  ;;
64735esac
64736fi
64737ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64738if test -n "$ICECC_CREATE_ENV"; then
64739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64740$as_echo "$ICECC_CREATE_ENV" >&6; }
64741else
64742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64743$as_echo "no" >&6; }
64744fi
64745
64746
64747  test -n "$ICECC_CREATE_ENV" && break
64748done
64749
64750    else
64751      # If it succeeded, then it was overridden by the user. We will use it
64752      # for the tool.
64753
64754      # First remove it from the list of overridden variables, so we can test
64755      # for unknown variables in the end.
64756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64757
64758      # Check if we try to supply an empty value
64759      if test "x$ICECC_CREATE_ENV" = x; then
64760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64761$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64763$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64765$as_echo "disabled" >&6; }
64766      else
64767        # Check if the provided tool contains a complete path.
64768        tool_specified="$ICECC_CREATE_ENV"
64769        tool_basename="${tool_specified##*/}"
64770        if test "x$tool_basename" = "x$tool_specified"; then
64771          # A command without a complete path is provided, search $PATH.
64772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64773$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64774          # Extract the first word of "$tool_basename", so it can be a program name with args.
64775set dummy $tool_basename; ac_word=$2
64776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64777$as_echo_n "checking for $ac_word... " >&6; }
64778if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64779  $as_echo_n "(cached) " >&6
64780else
64781  case $ICECC_CREATE_ENV in
64782  [\\/]* | ?:[\\/]*)
64783  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64784  ;;
64785  *)
64786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64787for as_dir in $PATH
64788do
64789  IFS=$as_save_IFS
64790  test -z "$as_dir" && as_dir=.
64791    for ac_exec_ext in '' $ac_executable_extensions; do
64792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64793    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64795    break 2
64796  fi
64797done
64798  done
64799IFS=$as_save_IFS
64800
64801  ;;
64802esac
64803fi
64804ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64805if test -n "$ICECC_CREATE_ENV"; then
64806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64807$as_echo "$ICECC_CREATE_ENV" >&6; }
64808else
64809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64810$as_echo "no" >&6; }
64811fi
64812
64813
64814          if test "x$ICECC_CREATE_ENV" = x; then
64815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64816          fi
64817        else
64818          # Otherwise we believe it is a complete path. Use it as it is.
64819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64820$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64822$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64823          if test ! -x "$tool_specified"; then
64824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64825$as_echo "not found" >&6; }
64826            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64827          fi
64828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64829$as_echo "$tool_specified" >&6; }
64830        fi
64831      fi
64832    fi
64833
64834  fi
64835
64836
64837
64838  if test "x$ICECC_CREATE_ENV" = x; then
64839    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64840  fi
64841
64842
64843    # Use icecc-create-env to create a minimal compilation environment that can
64844    # be sent to the other hosts in the icecream cluster.
64845    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64846    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64847    # Older versions of icecc does not have the --gcc parameter
64848    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64849      icecc_gcc_arg="--gcc"
64850    fi
64851    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64852
64853  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64854      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64855          ${icecc_create_env_log} 2>&1 )
64856  if test "$?" != "0"; then
64857    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64858$as_echo "$as_me: icecc-create-env output:" >&6;}
64859    cat \
64860          ${icecc_create_env_log}
64861    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64862  fi
64863
64864    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64865      # For clang, the icecc compilerwrapper is needed. It usually resides next
64866      # to icecc-create-env.
64867
64868
64869
64870  # Publish this variable in the help.
64871
64872
64873  if [ -z "${ICECC_WRAPPER+x}" ]; then
64874    # The variable is not set by user, try to locate tool using the code snippet
64875    for ac_prog in compilerwrapper
64876do
64877  # Extract the first word of "$ac_prog", so it can be a program name with args.
64878set dummy $ac_prog; ac_word=$2
64879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64880$as_echo_n "checking for $ac_word... " >&6; }
64881if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64882  $as_echo_n "(cached) " >&6
64883else
64884  case $ICECC_WRAPPER in
64885  [\\/]* | ?:[\\/]*)
64886  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64887  ;;
64888  *)
64889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64890for as_dir in $PATH
64891do
64892  IFS=$as_save_IFS
64893  test -z "$as_dir" && as_dir=.
64894    for ac_exec_ext in '' $ac_executable_extensions; do
64895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64896    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64898    break 2
64899  fi
64900done
64901  done
64902IFS=$as_save_IFS
64903
64904  ;;
64905esac
64906fi
64907ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64908if test -n "$ICECC_WRAPPER"; then
64909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64910$as_echo "$ICECC_WRAPPER" >&6; }
64911else
64912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64913$as_echo "no" >&6; }
64914fi
64915
64916
64917  test -n "$ICECC_WRAPPER" && break
64918done
64919
64920  else
64921    # The variable is set, but is it from the command line or the environment?
64922
64923    # Try to remove the string !ICECC_WRAPPER! from our list.
64924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64926      # If it failed, the variable was not from the command line. Ignore it,
64927      # but warn the user (except for BASH, which is always set by the calling BASH).
64928      if test "xICECC_WRAPPER" != xBASH; then
64929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64930$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64931      fi
64932      # Try to locate tool using the code snippet
64933      for ac_prog in compilerwrapper
64934do
64935  # Extract the first word of "$ac_prog", so it can be a program name with args.
64936set dummy $ac_prog; ac_word=$2
64937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64938$as_echo_n "checking for $ac_word... " >&6; }
64939if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64940  $as_echo_n "(cached) " >&6
64941else
64942  case $ICECC_WRAPPER in
64943  [\\/]* | ?:[\\/]*)
64944  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64945  ;;
64946  *)
64947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64948for as_dir in $PATH
64949do
64950  IFS=$as_save_IFS
64951  test -z "$as_dir" && as_dir=.
64952    for ac_exec_ext in '' $ac_executable_extensions; do
64953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64954    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64956    break 2
64957  fi
64958done
64959  done
64960IFS=$as_save_IFS
64961
64962  ;;
64963esac
64964fi
64965ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64966if test -n "$ICECC_WRAPPER"; then
64967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64968$as_echo "$ICECC_WRAPPER" >&6; }
64969else
64970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64971$as_echo "no" >&6; }
64972fi
64973
64974
64975  test -n "$ICECC_WRAPPER" && break
64976done
64977
64978    else
64979      # If it succeeded, then it was overridden by the user. We will use it
64980      # for the tool.
64981
64982      # First remove it from the list of overridden variables, so we can test
64983      # for unknown variables in the end.
64984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64985
64986      # Check if we try to supply an empty value
64987      if test "x$ICECC_WRAPPER" = x; then
64988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64989$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64991$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64993$as_echo "disabled" >&6; }
64994      else
64995        # Check if the provided tool contains a complete path.
64996        tool_specified="$ICECC_WRAPPER"
64997        tool_basename="${tool_specified##*/}"
64998        if test "x$tool_basename" = "x$tool_specified"; then
64999          # A command without a complete path is provided, search $PATH.
65000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65001$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65002          # Extract the first word of "$tool_basename", so it can be a program name with args.
65003set dummy $tool_basename; ac_word=$2
65004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65005$as_echo_n "checking for $ac_word... " >&6; }
65006if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65007  $as_echo_n "(cached) " >&6
65008else
65009  case $ICECC_WRAPPER in
65010  [\\/]* | ?:[\\/]*)
65011  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65012  ;;
65013  *)
65014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65015for as_dir in $PATH
65016do
65017  IFS=$as_save_IFS
65018  test -z "$as_dir" && as_dir=.
65019    for ac_exec_ext in '' $ac_executable_extensions; do
65020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65021    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65023    break 2
65024  fi
65025done
65026  done
65027IFS=$as_save_IFS
65028
65029  ;;
65030esac
65031fi
65032ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65033if test -n "$ICECC_WRAPPER"; then
65034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65035$as_echo "$ICECC_WRAPPER" >&6; }
65036else
65037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65038$as_echo "no" >&6; }
65039fi
65040
65041
65042          if test "x$ICECC_WRAPPER" = x; then
65043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65044          fi
65045        else
65046          # Otherwise we believe it is a complete path. Use it as it is.
65047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65048$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65050$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65051          if test ! -x "$tool_specified"; then
65052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65053$as_echo "not found" >&6; }
65054            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65055          fi
65056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65057$as_echo "$tool_specified" >&6; }
65058        fi
65059      fi
65060    fi
65061
65062  fi
65063
65064
65065
65066  if test "x$ICECC_WRAPPER" = x; then
65067    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65068  fi
65069
65070
65071
65072  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65073      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65074  if test "$?" != "0"; then
65075    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65076$as_echo "$as_me: icecc-create-env output:" >&6;}
65077    cat ${icecc_create_env_log}
65078    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65079  fi
65080
65081    else
65082      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65083    fi
65084    PATH="$old_path"
65085    # The bundle with the compiler gets a name based on checksums. Parse log file
65086    # to find it.
65087    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65088    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65089    if test ! -f ${ICECC_ENV_BUNDLE}; then
65090      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65091    fi
65092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65093$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65095$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65096    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65097
65098    if test "x${COMPILE_TYPE}" = "xcross"; then
65099      # If cross compiling, create a separate env package for the build compiler
65100      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65101      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65102      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65103
65104  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65105      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65106            ${icecc_create_env_log_build} 2>&1 )
65107  if test "$?" != "0"; then
65108    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65109$as_echo "$as_me: icecc-create-env output:" >&6;}
65110    cat \
65111            ${icecc_create_env_log_build}
65112    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65113  fi
65114
65115      elif test "x${BUILD_CC##*/}" = "xclang"; then
65116
65117  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65118      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65119  if test "$?" != "0"; then
65120    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65121$as_echo "$as_me: icecc-create-env output:" >&6;}
65122    cat ${icecc_create_env_log_build}
65123    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65124  fi
65125
65126      else
65127        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65128      fi
65129      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65130      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65131      if test ! -f ${ICECC_ENV_BUNDLE}; then
65132        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65133      fi
65134      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65135$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65137$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65138      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65139          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65140    else
65141      BUILD_ICECC="${ICECC}"
65142    fi
65143
65144
65145  fi
65146
65147
65148# Can the C/C++ compiler use precompiled headers?
65149
65150
65151  ###############################################################################
65152  #
65153  # Can the C/C++ compiler use precompiled headers?
65154  #
65155  # Check whether --enable-precompiled-headers was given.
65156if test "${enable_precompiled_headers+set}" = set; then :
65157  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65158else
65159  ENABLE_PRECOMPH=yes
65160fi
65161
65162
65163  USE_PRECOMPILED_HEADER=1
65164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65165$as_echo_n "checking If precompiled header is enabled... " >&6; }
65166  if test "x$ENABLE_PRECOMPH" = xno; then
65167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65168$as_echo "no, forced" >&6; }
65169    USE_PRECOMPILED_HEADER=0
65170  elif test "x$ICECC" != "x"; then
65171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65172$as_echo "no, does not work effectively with icecc" >&6; }
65173    USE_PRECOMPILED_HEADER=0
65174  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65176$as_echo "no, does not work with Solaris Studio" >&6; }
65177    USE_PRECOMPILED_HEADER=0
65178  else
65179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65180$as_echo "yes" >&6; }
65181  fi
65182
65183  if test "x$ENABLE_PRECOMPH" = xyes; then
65184    # Check that the compiler actually supports precomp headers.
65185    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65187$as_echo_n "checking that precompiled headers work... " >&6; }
65188      echo "int alfa();" > conftest.h
65189      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65190      if test ! -f conftest.hpp.gch; then
65191        USE_PRECOMPILED_HEADER=0
65192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65193$as_echo "no" >&6; }
65194      else
65195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65196$as_echo "yes" >&6; }
65197      fi
65198      rm -f conftest.h conftest.hpp.gch
65199    fi
65200  fi
65201
65202
65203
65204
65205# Setup use of ccache, if available
65206
65207  # Check whether --enable-ccache was given.
65208if test "${enable_ccache+set}" = set; then :
65209  enableval=$enable_ccache;
65210fi
65211
65212
65213  CCACHE=
65214  CCACHE_STATUS=
65215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65216$as_echo_n "checking is ccache enabled... " >&6; }
65217  if test "x$enable_ccache" = xyes; then
65218    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65220$as_echo "yes" >&6; }
65221      OLD_PATH="$PATH"
65222      if test "x$TOOLCHAIN_PATH" != x; then
65223        PATH=$TOOLCHAIN_PATH:$PATH
65224      fi
65225
65226
65227
65228  # Publish this variable in the help.
65229
65230
65231  if [ -z "${CCACHE+x}" ]; then
65232    # The variable is not set by user, try to locate tool using the code snippet
65233    for ac_prog in ccache
65234do
65235  # Extract the first word of "$ac_prog", so it can be a program name with args.
65236set dummy $ac_prog; ac_word=$2
65237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65238$as_echo_n "checking for $ac_word... " >&6; }
65239if ${ac_cv_path_CCACHE+:} false; then :
65240  $as_echo_n "(cached) " >&6
65241else
65242  case $CCACHE in
65243  [\\/]* | ?:[\\/]*)
65244  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65245  ;;
65246  *)
65247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65248for as_dir in $PATH
65249do
65250  IFS=$as_save_IFS
65251  test -z "$as_dir" && as_dir=.
65252    for ac_exec_ext in '' $ac_executable_extensions; do
65253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65254    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65256    break 2
65257  fi
65258done
65259  done
65260IFS=$as_save_IFS
65261
65262  ;;
65263esac
65264fi
65265CCACHE=$ac_cv_path_CCACHE
65266if test -n "$CCACHE"; then
65267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65268$as_echo "$CCACHE" >&6; }
65269else
65270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65271$as_echo "no" >&6; }
65272fi
65273
65274
65275  test -n "$CCACHE" && break
65276done
65277
65278  else
65279    # The variable is set, but is it from the command line or the environment?
65280
65281    # Try to remove the string !CCACHE! from our list.
65282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65284      # If it failed, the variable was not from the command line. Ignore it,
65285      # but warn the user (except for BASH, which is always set by the calling BASH).
65286      if test "xCCACHE" != xBASH; then
65287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65288$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65289      fi
65290      # Try to locate tool using the code snippet
65291      for ac_prog in ccache
65292do
65293  # Extract the first word of "$ac_prog", so it can be a program name with args.
65294set dummy $ac_prog; ac_word=$2
65295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65296$as_echo_n "checking for $ac_word... " >&6; }
65297if ${ac_cv_path_CCACHE+:} false; then :
65298  $as_echo_n "(cached) " >&6
65299else
65300  case $CCACHE in
65301  [\\/]* | ?:[\\/]*)
65302  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65303  ;;
65304  *)
65305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65306for as_dir in $PATH
65307do
65308  IFS=$as_save_IFS
65309  test -z "$as_dir" && as_dir=.
65310    for ac_exec_ext in '' $ac_executable_extensions; do
65311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65312    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65314    break 2
65315  fi
65316done
65317  done
65318IFS=$as_save_IFS
65319
65320  ;;
65321esac
65322fi
65323CCACHE=$ac_cv_path_CCACHE
65324if test -n "$CCACHE"; then
65325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65326$as_echo "$CCACHE" >&6; }
65327else
65328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65329$as_echo "no" >&6; }
65330fi
65331
65332
65333  test -n "$CCACHE" && break
65334done
65335
65336    else
65337      # If it succeeded, then it was overridden by the user. We will use it
65338      # for the tool.
65339
65340      # First remove it from the list of overridden variables, so we can test
65341      # for unknown variables in the end.
65342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65343
65344      # Check if we try to supply an empty value
65345      if test "x$CCACHE" = x; then
65346        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65347$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65349$as_echo_n "checking for CCACHE... " >&6; }
65350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65351$as_echo "disabled" >&6; }
65352      else
65353        # Check if the provided tool contains a complete path.
65354        tool_specified="$CCACHE"
65355        tool_basename="${tool_specified##*/}"
65356        if test "x$tool_basename" = "x$tool_specified"; then
65357          # A command without a complete path is provided, search $PATH.
65358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65359$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65360          # Extract the first word of "$tool_basename", so it can be a program name with args.
65361set dummy $tool_basename; ac_word=$2
65362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65363$as_echo_n "checking for $ac_word... " >&6; }
65364if ${ac_cv_path_CCACHE+:} false; then :
65365  $as_echo_n "(cached) " >&6
65366else
65367  case $CCACHE in
65368  [\\/]* | ?:[\\/]*)
65369  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65370  ;;
65371  *)
65372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65373for as_dir in $PATH
65374do
65375  IFS=$as_save_IFS
65376  test -z "$as_dir" && as_dir=.
65377    for ac_exec_ext in '' $ac_executable_extensions; do
65378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65379    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65381    break 2
65382  fi
65383done
65384  done
65385IFS=$as_save_IFS
65386
65387  ;;
65388esac
65389fi
65390CCACHE=$ac_cv_path_CCACHE
65391if test -n "$CCACHE"; then
65392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65393$as_echo "$CCACHE" >&6; }
65394else
65395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65396$as_echo "no" >&6; }
65397fi
65398
65399
65400          if test "x$CCACHE" = x; then
65401            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65402          fi
65403        else
65404          # Otherwise we believe it is a complete path. Use it as it is.
65405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65406$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65407          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65408$as_echo_n "checking for CCACHE... " >&6; }
65409          if test ! -x "$tool_specified"; then
65410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65411$as_echo "not found" >&6; }
65412            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65413          fi
65414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65415$as_echo "$tool_specified" >&6; }
65416        fi
65417      fi
65418    fi
65419
65420  fi
65421
65422
65423
65424  if test "x$CCACHE" = x; then
65425    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65426  fi
65427
65428
65429      PATH="$OLD_PATH"
65430      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65431      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65432    else
65433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65434$as_echo "no" >&6; }
65435      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65436$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65437    fi
65438  elif test "x$enable_ccache" = xno; then
65439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65440$as_echo "no, explicitly disabled" >&6; }
65441    CCACHE_STATUS="Disabled"
65442  elif test "x$enable_ccache" = x; then
65443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65444$as_echo "no" >&6; }
65445  else
65446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65447$as_echo "unknown" >&6; }
65448    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65449  fi
65450
65451
65452
65453# Check whether --with-ccache-dir was given.
65454if test "${with_ccache_dir+set}" = set; then :
65455  withval=$with_ccache_dir;
65456fi
65457
65458
65459  if test "x$with_ccache_dir" != x; then
65460    # When using a non home ccache directory, assume the use is to share ccache files
65461    # with other users. Thus change the umask.
65462    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65463    if test "x$CCACHE" = x; then
65464      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65465$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65466    fi
65467  fi
65468
65469  if test "x$CCACHE" != x; then
65470
65471  if test "x$CCACHE" != x; then
65472    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65473      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65474          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65475      if test "x$HAS_BAD_CCACHE" != "x"; then
65476        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65477      fi
65478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65479$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65480      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65481      PUSHED_FLAGS="$CXXFLAGS"
65482      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65483      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65484/* end confdefs.h.  */
65485
65486int
65487main ()
65488{
65489
65490  ;
65491  return 0;
65492}
65493_ACEOF
65494if ac_fn_cxx_try_compile "$LINENO"; then :
65495  CC_KNOWS_CCACHE_TRICK=yes
65496else
65497  CC_KNOWS_CCACHE_TRICK=no
65498fi
65499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65500      CXXFLAGS="$PUSHED_FLAGS"
65501      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65503$as_echo "yes" >&6; }
65504        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65505
65506        CCACHE_SLOPPINESS=pch_defines,time_macros
65507      else
65508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65509$as_echo "no" >&6; }
65510        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65511      fi
65512    fi
65513
65514    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65515        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65516
65517    if test "x$SET_CCACHE_DIR" != x; then
65518      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65519      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65520    fi
65521  fi
65522
65523  fi
65524
65525
65526###############################################################################
65527#
65528# And now the finish...
65529#
65530###############################################################################
65531
65532# Check for some common pitfalls
65533
65534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65535    file_to_test="$SRC_ROOT/LICENSE"
65536    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65537      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
65538    fi
65539  fi
65540
65541
65542  # Did user specify any unknown variables?
65543
65544  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65545    # Replace the separating ! with spaces before presenting for end user.
65546    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65547    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65548$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65549  fi
65550
65551
65552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65553$as_echo_n "checking if build directory is on local disk... " >&6; }
65554
65555  # df -l lists only local disks; if the given directory is not found then
65556  # a non-zero exit code is given
65557  if test "x$DF" = x; then
65558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65559      # msys does not have df; use Windows "net use" instead.
65560      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65561      if test "x$IS_NETWORK_DISK" = x; then
65562        OUTPUT_DIR_IS_LOCAL="yes"
65563      else
65564        OUTPUT_DIR_IS_LOCAL="no"
65565      fi
65566    else
65567      # No df here, say it's local
65568      OUTPUT_DIR_IS_LOCAL="yes"
65569    fi
65570  else
65571    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65572      OUTPUT_DIR_IS_LOCAL="yes"
65573    else
65574      OUTPUT_DIR_IS_LOCAL="no"
65575    fi
65576  fi
65577
65578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65579$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65580
65581
65582
65583  # Check if the user has any old-style ALT_ variables set.
65584  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65585
65586  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65587  # Since we can't properly handle the dependencies for this, warn the user about the situation
65588  if test -e $OUTPUT_ROOT/spec.gmk; then
65589    IS_RECONFIGURE=yes
65590  else
65591    IS_RECONFIGURE=no
65592  fi
65593
65594
65595# At the end, call the custom hook. (Dummy macro if no custom sources available)
65596
65597
65598# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65599
65600  # Keep feature lists sorted and free of duplicates
65601  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65602  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65603  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65604  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65605  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65606  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65607  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65608
65609  # Validate features
65610  for variant in $JVM_VARIANTS; do
65611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65612$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65613    features_var_name=JVM_FEATURES_$variant
65614    JVM_FEATURES_TO_TEST=${!features_var_name}
65615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65616$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65617    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65618    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65619    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65620    if test "x$INVALID_FEATURES" != x; then
65621      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65622    fi
65623  done
65624
65625
65626# We're messing a bit with internal autoconf variables to put the config.status
65627# in the output directory instead of the current directory.
65628CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65629
65630# Create the actual output files. Now the main work of configure is done.
65631cat >confcache <<\_ACEOF
65632# This file is a shell script that caches the results of configure
65633# tests run on this system so they can be shared between configure
65634# scripts and configure runs, see configure's option --config-cache.
65635# It is not useful on other systems.  If it contains results you don't
65636# want to keep, you may remove or edit it.
65637#
65638# config.status only pays attention to the cache file if you give it
65639# the --recheck option to rerun configure.
65640#
65641# `ac_cv_env_foo' variables (set or unset) will be overridden when
65642# loading this file, other *unset* `ac_cv_foo' will be assigned the
65643# following values.
65644
65645_ACEOF
65646
65647# The following way of writing the cache mishandles newlines in values,
65648# but we know of no workaround that is simple, portable, and efficient.
65649# So, we kill variables containing newlines.
65650# Ultrix sh set writes to stderr and can't be redirected directly,
65651# and sets the high bit in the cache file unless we assign to the vars.
65652(
65653  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65654    eval ac_val=\$$ac_var
65655    case $ac_val in #(
65656    *${as_nl}*)
65657      case $ac_var in #(
65658      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65659$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65660      esac
65661      case $ac_var in #(
65662      _ | IFS | as_nl) ;; #(
65663      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65664      *) { eval $ac_var=; unset $ac_var;} ;;
65665      esac ;;
65666    esac
65667  done
65668
65669  (set) 2>&1 |
65670    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65671    *${as_nl}ac_space=\ *)
65672      # `set' does not quote correctly, so add quotes: double-quote
65673      # substitution turns \\\\ into \\, and sed turns \\ into \.
65674      sed -n \
65675	"s/'/'\\\\''/g;
65676	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65677      ;; #(
65678    *)
65679      # `set' quotes correctly as required by POSIX, so do not add quotes.
65680      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65681      ;;
65682    esac |
65683    sort
65684) |
65685  sed '
65686     /^ac_cv_env_/b end
65687     t clear
65688     :clear
65689     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65690     t end
65691     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65692     :end' >>confcache
65693if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65694  if test -w "$cache_file"; then
65695    if test "x$cache_file" != "x/dev/null"; then
65696      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65697$as_echo "$as_me: updating cache $cache_file" >&6;}
65698      if test ! -f "$cache_file" || test -h "$cache_file"; then
65699	cat confcache >"$cache_file"
65700      else
65701        case $cache_file in #(
65702        */* | ?:*)
65703	  mv -f confcache "$cache_file"$$ &&
65704	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65705        *)
65706	  mv -f confcache "$cache_file" ;;
65707	esac
65708      fi
65709    fi
65710  else
65711    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65712$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65713  fi
65714fi
65715rm -f confcache
65716
65717test "x$prefix" = xNONE && prefix=$ac_default_prefix
65718# Let make expand exec_prefix.
65719test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65720
65721# Transform confdefs.h into DEFS.
65722# Protect against shell expansion while executing Makefile rules.
65723# Protect against Makefile macro expansion.
65724#
65725# If the first sed substitution is executed (which looks for macros that
65726# take arguments), then branch to the quote section.  Otherwise,
65727# look for a macro that doesn't take arguments.
65728ac_script='
65729:mline
65730/\\$/{
65731 N
65732 s,\\\n,,
65733 b mline
65734}
65735t clear
65736:clear
65737s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65738t quote
65739s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65740t quote
65741b any
65742:quote
65743s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65744s/\[/\\&/g
65745s/\]/\\&/g
65746s/\$/$$/g
65747H
65748:any
65749${
65750	g
65751	s/^\n//
65752	s/\n/ /g
65753	p
65754}
65755'
65756DEFS=`sed -n "$ac_script" confdefs.h`
65757
65758
65759ac_libobjs=
65760ac_ltlibobjs=
65761U=
65762for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65763  # 1. Remove the extension, and $U if already installed.
65764  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65765  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65766  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65767  #    will be set to the directory where LIBOBJS objects are built.
65768  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65769  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65770done
65771LIBOBJS=$ac_libobjs
65772
65773LTLIBOBJS=$ac_ltlibobjs
65774
65775
65776
65777: "${CONFIG_STATUS=./config.status}"
65778ac_write_fail=0
65779ac_clean_files_save=$ac_clean_files
65780ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65781{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65782$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65783as_write_fail=0
65784cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65785#! $SHELL
65786# Generated by $as_me.
65787# Run this file to recreate the current configuration.
65788# Compiler output produced by configure, useful for debugging
65789# configure, is in config.log if it exists.
65790
65791debug=false
65792ac_cs_recheck=false
65793ac_cs_silent=false
65794
65795SHELL=\${CONFIG_SHELL-$SHELL}
65796export SHELL
65797_ASEOF
65798cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65799## -------------------- ##
65800## M4sh Initialization. ##
65801## -------------------- ##
65802
65803# Be more Bourne compatible
65804DUALCASE=1; export DUALCASE # for MKS sh
65805if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65806  emulate sh
65807  NULLCMD=:
65808  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65809  # is contrary to our usage.  Disable this feature.
65810  alias -g '${1+"$@"}'='"$@"'
65811  setopt NO_GLOB_SUBST
65812else
65813  case `(set -o) 2>/dev/null` in #(
65814  *posix*) :
65815    set -o posix ;; #(
65816  *) :
65817     ;;
65818esac
65819fi
65820
65821
65822as_nl='
65823'
65824export as_nl
65825# Printing a long string crashes Solaris 7 /usr/bin/printf.
65826as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65827as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65828as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65829# Prefer a ksh shell builtin over an external printf program on Solaris,
65830# but without wasting forks for bash or zsh.
65831if test -z "$BASH_VERSION$ZSH_VERSION" \
65832    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65833  as_echo='print -r --'
65834  as_echo_n='print -rn --'
65835elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65836  as_echo='printf %s\n'
65837  as_echo_n='printf %s'
65838else
65839  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65840    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65841    as_echo_n='/usr/ucb/echo -n'
65842  else
65843    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65844    as_echo_n_body='eval
65845      arg=$1;
65846      case $arg in #(
65847      *"$as_nl"*)
65848	expr "X$arg" : "X\\(.*\\)$as_nl";
65849	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65850      esac;
65851      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65852    '
65853    export as_echo_n_body
65854    as_echo_n='sh -c $as_echo_n_body as_echo'
65855  fi
65856  export as_echo_body
65857  as_echo='sh -c $as_echo_body as_echo'
65858fi
65859
65860# The user is always right.
65861if test "${PATH_SEPARATOR+set}" != set; then
65862  PATH_SEPARATOR=:
65863  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65864    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65865      PATH_SEPARATOR=';'
65866  }
65867fi
65868
65869
65870# IFS
65871# We need space, tab and new line, in precisely that order.  Quoting is
65872# there to prevent editors from complaining about space-tab.
65873# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65874# splitting by setting IFS to empty value.)
65875IFS=" ""	$as_nl"
65876
65877# Find who we are.  Look in the path if we contain no directory separator.
65878as_myself=
65879case $0 in #((
65880  *[\\/]* ) as_myself=$0 ;;
65881  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65882for as_dir in $PATH
65883do
65884  IFS=$as_save_IFS
65885  test -z "$as_dir" && as_dir=.
65886    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65887  done
65888IFS=$as_save_IFS
65889
65890     ;;
65891esac
65892# We did not find ourselves, most probably we were run as `sh COMMAND'
65893# in which case we are not to be found in the path.
65894if test "x$as_myself" = x; then
65895  as_myself=$0
65896fi
65897if test ! -f "$as_myself"; then
65898  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65899  exit 1
65900fi
65901
65902# Unset variables that we do not need and which cause bugs (e.g. in
65903# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65904# suppresses any "Segmentation fault" message there.  '((' could
65905# trigger a bug in pdksh 5.2.14.
65906for as_var in BASH_ENV ENV MAIL MAILPATH
65907do eval test x\${$as_var+set} = xset \
65908  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65909done
65910PS1='$ '
65911PS2='> '
65912PS4='+ '
65913
65914# NLS nuisances.
65915LC_ALL=C
65916export LC_ALL
65917LANGUAGE=C
65918export LANGUAGE
65919
65920# CDPATH.
65921(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65922
65923
65924# as_fn_error STATUS ERROR [LINENO LOG_FD]
65925# ----------------------------------------
65926# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65927# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65928# script with STATUS, using 1 if that was 0.
65929as_fn_error ()
65930{
65931  as_status=$1; test $as_status -eq 0 && as_status=1
65932  if test "$4"; then
65933    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65934    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65935  fi
65936  $as_echo "$as_me: error: $2" >&2
65937  as_fn_exit $as_status
65938} # as_fn_error
65939
65940
65941# as_fn_set_status STATUS
65942# -----------------------
65943# Set $? to STATUS, without forking.
65944as_fn_set_status ()
65945{
65946  return $1
65947} # as_fn_set_status
65948
65949# as_fn_exit STATUS
65950# -----------------
65951# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65952as_fn_exit ()
65953{
65954  set +e
65955  as_fn_set_status $1
65956  exit $1
65957} # as_fn_exit
65958
65959# as_fn_unset VAR
65960# ---------------
65961# Portably unset VAR.
65962as_fn_unset ()
65963{
65964  { eval $1=; unset $1;}
65965}
65966as_unset=as_fn_unset
65967# as_fn_append VAR VALUE
65968# ----------------------
65969# Append the text in VALUE to the end of the definition contained in VAR. Take
65970# advantage of any shell optimizations that allow amortized linear growth over
65971# repeated appends, instead of the typical quadratic growth present in naive
65972# implementations.
65973if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65974  eval 'as_fn_append ()
65975  {
65976    eval $1+=\$2
65977  }'
65978else
65979  as_fn_append ()
65980  {
65981    eval $1=\$$1\$2
65982  }
65983fi # as_fn_append
65984
65985# as_fn_arith ARG...
65986# ------------------
65987# Perform arithmetic evaluation on the ARGs, and store the result in the
65988# global $as_val. Take advantage of shells that can avoid forks. The arguments
65989# must be portable across $(()) and expr.
65990if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65991  eval 'as_fn_arith ()
65992  {
65993    as_val=$(( $* ))
65994  }'
65995else
65996  as_fn_arith ()
65997  {
65998    as_val=`expr "$@" || test $? -eq 1`
65999  }
66000fi # as_fn_arith
66001
66002
66003if expr a : '\(a\)' >/dev/null 2>&1 &&
66004   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66005  as_expr=expr
66006else
66007  as_expr=false
66008fi
66009
66010if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66011  as_basename=basename
66012else
66013  as_basename=false
66014fi
66015
66016if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66017  as_dirname=dirname
66018else
66019  as_dirname=false
66020fi
66021
66022as_me=`$as_basename -- "$0" ||
66023$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66024	 X"$0" : 'X\(//\)$' \| \
66025	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66026$as_echo X/"$0" |
66027    sed '/^.*\/\([^/][^/]*\)\/*$/{
66028	    s//\1/
66029	    q
66030	  }
66031	  /^X\/\(\/\/\)$/{
66032	    s//\1/
66033	    q
66034	  }
66035	  /^X\/\(\/\).*/{
66036	    s//\1/
66037	    q
66038	  }
66039	  s/.*/./; q'`
66040
66041# Avoid depending upon Character Ranges.
66042as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66043as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66044as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66045as_cr_digits='0123456789'
66046as_cr_alnum=$as_cr_Letters$as_cr_digits
66047
66048ECHO_C= ECHO_N= ECHO_T=
66049case `echo -n x` in #(((((
66050-n*)
66051  case `echo 'xy\c'` in
66052  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66053  xy)  ECHO_C='\c';;
66054  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66055       ECHO_T='	';;
66056  esac;;
66057*)
66058  ECHO_N='-n';;
66059esac
66060
66061rm -f conf$$ conf$$.exe conf$$.file
66062if test -d conf$$.dir; then
66063  rm -f conf$$.dir/conf$$.file
66064else
66065  rm -f conf$$.dir
66066  mkdir conf$$.dir 2>/dev/null
66067fi
66068if (echo >conf$$.file) 2>/dev/null; then
66069  if ln -s conf$$.file conf$$ 2>/dev/null; then
66070    as_ln_s='ln -s'
66071    # ... but there are two gotchas:
66072    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66073    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66074    # In both cases, we have to default to `cp -pR'.
66075    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66076      as_ln_s='cp -pR'
66077  elif ln conf$$.file conf$$ 2>/dev/null; then
66078    as_ln_s=ln
66079  else
66080    as_ln_s='cp -pR'
66081  fi
66082else
66083  as_ln_s='cp -pR'
66084fi
66085rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66086rmdir conf$$.dir 2>/dev/null
66087
66088
66089# as_fn_mkdir_p
66090# -------------
66091# Create "$as_dir" as a directory, including parents if necessary.
66092as_fn_mkdir_p ()
66093{
66094
66095  case $as_dir in #(
66096  -*) as_dir=./$as_dir;;
66097  esac
66098  test -d "$as_dir" || eval $as_mkdir_p || {
66099    as_dirs=
66100    while :; do
66101      case $as_dir in #(
66102      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66103      *) as_qdir=$as_dir;;
66104      esac
66105      as_dirs="'$as_qdir' $as_dirs"
66106      as_dir=`$as_dirname -- "$as_dir" ||
66107$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66108	 X"$as_dir" : 'X\(//\)[^/]' \| \
66109	 X"$as_dir" : 'X\(//\)$' \| \
66110	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66111$as_echo X"$as_dir" |
66112    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66113	    s//\1/
66114	    q
66115	  }
66116	  /^X\(\/\/\)[^/].*/{
66117	    s//\1/
66118	    q
66119	  }
66120	  /^X\(\/\/\)$/{
66121	    s//\1/
66122	    q
66123	  }
66124	  /^X\(\/\).*/{
66125	    s//\1/
66126	    q
66127	  }
66128	  s/.*/./; q'`
66129      test -d "$as_dir" && break
66130    done
66131    test -z "$as_dirs" || eval "mkdir $as_dirs"
66132  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66133
66134
66135} # as_fn_mkdir_p
66136if mkdir -p . 2>/dev/null; then
66137  as_mkdir_p='mkdir -p "$as_dir"'
66138else
66139  test -d ./-p && rmdir ./-p
66140  as_mkdir_p=false
66141fi
66142
66143
66144# as_fn_executable_p FILE
66145# -----------------------
66146# Test if FILE is an executable regular file.
66147as_fn_executable_p ()
66148{
66149  test -f "$1" && test -x "$1"
66150} # as_fn_executable_p
66151as_test_x='test -x'
66152as_executable_p=as_fn_executable_p
66153
66154# Sed expression to map a string onto a valid CPP name.
66155as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66156
66157# Sed expression to map a string onto a valid variable name.
66158as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66159
66160
66161exec 6>&1
66162## ----------------------------------- ##
66163## Main body of $CONFIG_STATUS script. ##
66164## ----------------------------------- ##
66165_ASEOF
66166test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66167
66168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66169# Save the log message, to keep $0 and so on meaningful, and to
66170# report actual input values of CONFIG_FILES etc. instead of their
66171# values after options handling.
66172ac_log="
66173This file was extended by OpenJDK $as_me jdk9, which was
66174generated by GNU Autoconf 2.69.  Invocation command line was
66175
66176  CONFIG_FILES    = $CONFIG_FILES
66177  CONFIG_HEADERS  = $CONFIG_HEADERS
66178  CONFIG_LINKS    = $CONFIG_LINKS
66179  CONFIG_COMMANDS = $CONFIG_COMMANDS
66180  $ $0 $@
66181
66182on `(hostname || uname -n) 2>/dev/null | sed 1q`
66183"
66184
66185_ACEOF
66186
66187case $ac_config_files in *"
66188"*) set x $ac_config_files; shift; ac_config_files=$*;;
66189esac
66190
66191
66192
66193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66194# Files that config.status was made for.
66195config_files="$ac_config_files"
66196
66197_ACEOF
66198
66199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66200ac_cs_usage="\
66201\`$as_me' instantiates files and other configuration actions
66202from templates according to the current configuration.  Unless the files
66203and actions are specified as TAGs, all are instantiated by default.
66204
66205Usage: $0 [OPTION]... [TAG]...
66206
66207  -h, --help       print this help, then exit
66208  -V, --version    print version number and configuration settings, then exit
66209      --config     print configuration, then exit
66210  -q, --quiet, --silent
66211                   do not print progress messages
66212  -d, --debug      don't remove temporary files
66213      --recheck    update $as_me by reconfiguring in the same conditions
66214      --file=FILE[:TEMPLATE]
66215                   instantiate the configuration file FILE
66216
66217Configuration files:
66218$config_files
66219
66220Report bugs to <build-dev@openjdk.java.net>.
66221OpenJDK home page: <http://openjdk.java.net>."
66222
66223_ACEOF
66224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66225ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66226ac_cs_version="\\
66227OpenJDK config.status jdk9
66228configured by $0, generated by GNU Autoconf 2.69,
66229  with options \\"\$ac_cs_config\\"
66230
66231Copyright (C) 2012 Free Software Foundation, Inc.
66232This config.status script is free software; the Free Software Foundation
66233gives unlimited permission to copy, distribute and modify it."
66234
66235ac_pwd='$ac_pwd'
66236srcdir='$srcdir'
66237AWK='$AWK'
66238test -n "\$AWK" || AWK=awk
66239_ACEOF
66240
66241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66242# The default lists apply if the user does not specify any file.
66243ac_need_defaults=:
66244while test $# != 0
66245do
66246  case $1 in
66247  --*=?*)
66248    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66249    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66250    ac_shift=:
66251    ;;
66252  --*=)
66253    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66254    ac_optarg=
66255    ac_shift=:
66256    ;;
66257  *)
66258    ac_option=$1
66259    ac_optarg=$2
66260    ac_shift=shift
66261    ;;
66262  esac
66263
66264  case $ac_option in
66265  # Handling of the options.
66266  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66267    ac_cs_recheck=: ;;
66268  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66269    $as_echo "$ac_cs_version"; exit ;;
66270  --config | --confi | --conf | --con | --co | --c )
66271    $as_echo "$ac_cs_config"; exit ;;
66272  --debug | --debu | --deb | --de | --d | -d )
66273    debug=: ;;
66274  --file | --fil | --fi | --f )
66275    $ac_shift
66276    case $ac_optarg in
66277    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66278    '') as_fn_error $? "missing file argument" ;;
66279    esac
66280    as_fn_append CONFIG_FILES " '$ac_optarg'"
66281    ac_need_defaults=false;;
66282  --he | --h |  --help | --hel | -h )
66283    $as_echo "$ac_cs_usage"; exit ;;
66284  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66285  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66286    ac_cs_silent=: ;;
66287
66288  # This is an error.
66289  -*) as_fn_error $? "unrecognized option: \`$1'
66290Try \`$0 --help' for more information." ;;
66291
66292  *) as_fn_append ac_config_targets " $1"
66293     ac_need_defaults=false ;;
66294
66295  esac
66296  shift
66297done
66298
66299ac_configure_extra_args=
66300
66301if $ac_cs_silent; then
66302  exec 6>/dev/null
66303  ac_configure_extra_args="$ac_configure_extra_args --silent"
66304fi
66305
66306_ACEOF
66307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66308if \$ac_cs_recheck; then
66309  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66310  shift
66311  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66312  CONFIG_SHELL='$SHELL'
66313  export CONFIG_SHELL
66314  exec "\$@"
66315fi
66316
66317_ACEOF
66318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66319exec 5>>config.log
66320{
66321  echo
66322  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66323## Running $as_me. ##
66324_ASBOX
66325  $as_echo "$ac_log"
66326} >&5
66327
66328_ACEOF
66329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66330_ACEOF
66331
66332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66333
66334# Handling of arguments.
66335for ac_config_target in $ac_config_targets
66336do
66337  case $ac_config_target in
66338    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66339    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66340    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66341    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66342    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66343    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66344
66345  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66346  esac
66347done
66348
66349
66350# If the user did not use the arguments to specify the items to instantiate,
66351# then the envvar interface is used.  Set only those that are not.
66352# We use the long form for the default assignment because of an extremely
66353# bizarre bug on SunOS 4.1.3.
66354if $ac_need_defaults; then
66355  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66356fi
66357
66358# Have a temporary directory for convenience.  Make it in the build tree
66359# simply because there is no reason against having it here, and in addition,
66360# creating and moving files from /tmp can sometimes cause problems.
66361# Hook for its removal unless debugging.
66362# Note that there is a small window in which the directory will not be cleaned:
66363# after its creation but before its name has been assigned to `$tmp'.
66364$debug ||
66365{
66366  tmp= ac_tmp=
66367  trap 'exit_status=$?
66368  : "${ac_tmp:=$tmp}"
66369  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66370' 0
66371  trap 'as_fn_exit 1' 1 2 13 15
66372}
66373# Create a (secure) tmp directory for tmp files.
66374
66375{
66376  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66377  test -d "$tmp"
66378}  ||
66379{
66380  tmp=./conf$$-$RANDOM
66381  (umask 077 && mkdir "$tmp")
66382} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66383ac_tmp=$tmp
66384
66385# Set up the scripts for CONFIG_FILES section.
66386# No need to generate them if there are no CONFIG_FILES.
66387# This happens for instance with `./config.status config.h'.
66388if test -n "$CONFIG_FILES"; then
66389
66390
66391ac_cr=`echo X | tr X '\015'`
66392# On cygwin, bash can eat \r inside `` if the user requested igncr.
66393# But we know of no other shell where ac_cr would be empty at this
66394# point, so we can use a bashism as a fallback.
66395if test "x$ac_cr" = x; then
66396  eval ac_cr=\$\'\\r\'
66397fi
66398ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66399if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66400  ac_cs_awk_cr='\\r'
66401else
66402  ac_cs_awk_cr=$ac_cr
66403fi
66404
66405echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66406_ACEOF
66407
66408
66409{
66410  echo "cat >conf$$subs.awk <<_ACEOF" &&
66411  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66412  echo "_ACEOF"
66413} >conf$$subs.sh ||
66414  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66415ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66416ac_delim='%!_!# '
66417for ac_last_try in false false false false false :; do
66418  . ./conf$$subs.sh ||
66419    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66420
66421  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66422  if test $ac_delim_n = $ac_delim_num; then
66423    break
66424  elif $ac_last_try; then
66425    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66426  else
66427    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66428  fi
66429done
66430rm -f conf$$subs.sh
66431
66432cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66433cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66434_ACEOF
66435sed -n '
66436h
66437s/^/S["/; s/!.*/"]=/
66438p
66439g
66440s/^[^!]*!//
66441:repl
66442t repl
66443s/'"$ac_delim"'$//
66444t delim
66445:nl
66446h
66447s/\(.\{148\}\)..*/\1/
66448t more1
66449s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66450p
66451n
66452b repl
66453:more1
66454s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66455p
66456g
66457s/.\{148\}//
66458t nl
66459:delim
66460h
66461s/\(.\{148\}\)..*/\1/
66462t more2
66463s/["\\]/\\&/g; s/^/"/; s/$/"/
66464p
66465b
66466:more2
66467s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66468p
66469g
66470s/.\{148\}//
66471t delim
66472' <conf$$subs.awk | sed '
66473/^[^""]/{
66474  N
66475  s/\n//
66476}
66477' >>$CONFIG_STATUS || ac_write_fail=1
66478rm -f conf$$subs.awk
66479cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66480_ACAWK
66481cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66482  for (key in S) S_is_set[key] = 1
66483  FS = ""
66484
66485}
66486{
66487  line = $ 0
66488  nfields = split(line, field, "@")
66489  substed = 0
66490  len = length(field[1])
66491  for (i = 2; i < nfields; i++) {
66492    key = field[i]
66493    keylen = length(key)
66494    if (S_is_set[key]) {
66495      value = S[key]
66496      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66497      len += length(value) + length(field[++i])
66498      substed = 1
66499    } else
66500      len += 1 + keylen
66501  }
66502
66503  print line
66504}
66505
66506_ACAWK
66507_ACEOF
66508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66509if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66510  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66511else
66512  cat
66513fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66514  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66515_ACEOF
66516
66517# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66518# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66519# trailing colons and then remove the whole line if VPATH becomes empty
66520# (actually we leave an empty line to preserve line numbers).
66521if test "x$srcdir" = x.; then
66522  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66523h
66524s///
66525s/^/:/
66526s/[	 ]*$/:/
66527s/:\$(srcdir):/:/g
66528s/:\${srcdir}:/:/g
66529s/:@srcdir@:/:/g
66530s/^:*//
66531s/:*$//
66532x
66533s/\(=[	 ]*\).*/\1/
66534G
66535s/\n//
66536s/^[^=]*=[	 ]*$//
66537}'
66538fi
66539
66540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66541fi # test -n "$CONFIG_FILES"
66542
66543
66544eval set X "  :F $CONFIG_FILES      "
66545shift
66546for ac_tag
66547do
66548  case $ac_tag in
66549  :[FHLC]) ac_mode=$ac_tag; continue;;
66550  esac
66551  case $ac_mode$ac_tag in
66552  :[FHL]*:*);;
66553  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66554  :[FH]-) ac_tag=-:-;;
66555  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66556  esac
66557  ac_save_IFS=$IFS
66558  IFS=:
66559  set x $ac_tag
66560  IFS=$ac_save_IFS
66561  shift
66562  ac_file=$1
66563  shift
66564
66565  case $ac_mode in
66566  :L) ac_source=$1;;
66567  :[FH])
66568    ac_file_inputs=
66569    for ac_f
66570    do
66571      case $ac_f in
66572      -) ac_f="$ac_tmp/stdin";;
66573      *) # Look for the file first in the build tree, then in the source tree
66574	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66575	 # because $ac_f cannot contain `:'.
66576	 test -f "$ac_f" ||
66577	   case $ac_f in
66578	   [\\/$]*) false;;
66579	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66580	   esac ||
66581	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66582      esac
66583      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66584      as_fn_append ac_file_inputs " '$ac_f'"
66585    done
66586
66587    # Let's still pretend it is `configure' which instantiates (i.e., don't
66588    # use $as_me), people would be surprised to read:
66589    #    /* config.h.  Generated by config.status.  */
66590    configure_input='Generated from '`
66591	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66592	`' by configure.'
66593    if test x"$ac_file" != x-; then
66594      configure_input="$ac_file.  $configure_input"
66595      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66596$as_echo "$as_me: creating $ac_file" >&6;}
66597    fi
66598    # Neutralize special characters interpreted by sed in replacement strings.
66599    case $configure_input in #(
66600    *\&* | *\|* | *\\* )
66601       ac_sed_conf_input=`$as_echo "$configure_input" |
66602       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66603    *) ac_sed_conf_input=$configure_input;;
66604    esac
66605
66606    case $ac_tag in
66607    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66608      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66609    esac
66610    ;;
66611  esac
66612
66613  ac_dir=`$as_dirname -- "$ac_file" ||
66614$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66615	 X"$ac_file" : 'X\(//\)[^/]' \| \
66616	 X"$ac_file" : 'X\(//\)$' \| \
66617	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66618$as_echo X"$ac_file" |
66619    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66620	    s//\1/
66621	    q
66622	  }
66623	  /^X\(\/\/\)[^/].*/{
66624	    s//\1/
66625	    q
66626	  }
66627	  /^X\(\/\/\)$/{
66628	    s//\1/
66629	    q
66630	  }
66631	  /^X\(\/\).*/{
66632	    s//\1/
66633	    q
66634	  }
66635	  s/.*/./; q'`
66636  as_dir="$ac_dir"; as_fn_mkdir_p
66637  ac_builddir=.
66638
66639case "$ac_dir" in
66640.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66641*)
66642  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66643  # A ".." for each directory in $ac_dir_suffix.
66644  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66645  case $ac_top_builddir_sub in
66646  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66647  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66648  esac ;;
66649esac
66650ac_abs_top_builddir=$ac_pwd
66651ac_abs_builddir=$ac_pwd$ac_dir_suffix
66652# for backward compatibility:
66653ac_top_builddir=$ac_top_build_prefix
66654
66655case $srcdir in
66656  .)  # We are building in place.
66657    ac_srcdir=.
66658    ac_top_srcdir=$ac_top_builddir_sub
66659    ac_abs_top_srcdir=$ac_pwd ;;
66660  [\\/]* | ?:[\\/]* )  # Absolute name.
66661    ac_srcdir=$srcdir$ac_dir_suffix;
66662    ac_top_srcdir=$srcdir
66663    ac_abs_top_srcdir=$srcdir ;;
66664  *) # Relative name.
66665    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66666    ac_top_srcdir=$ac_top_build_prefix$srcdir
66667    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66668esac
66669ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66670
66671
66672  case $ac_mode in
66673  :F)
66674  #
66675  # CONFIG_FILE
66676  #
66677
66678_ACEOF
66679
66680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66681# If the template does not know about datarootdir, expand it.
66682# FIXME: This hack should be removed a few years after 2.60.
66683ac_datarootdir_hack=; ac_datarootdir_seen=
66684ac_sed_dataroot='
66685/datarootdir/ {
66686  p
66687  q
66688}
66689/@datadir@/p
66690/@docdir@/p
66691/@infodir@/p
66692/@localedir@/p
66693/@mandir@/p'
66694case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66695*datarootdir*) ac_datarootdir_seen=yes;;
66696*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66697  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66698$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66699_ACEOF
66700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66701  ac_datarootdir_hack='
66702  s&@datadir@&$datadir&g
66703  s&@docdir@&$docdir&g
66704  s&@infodir@&$infodir&g
66705  s&@localedir@&$localedir&g
66706  s&@mandir@&$mandir&g
66707  s&\\\${datarootdir}&$datarootdir&g' ;;
66708esac
66709_ACEOF
66710
66711# Neutralize VPATH when `$srcdir' = `.'.
66712# Shell code in configure.ac might set extrasub.
66713# FIXME: do we really want to maintain this feature?
66714cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66715ac_sed_extra="$ac_vpsub
66716$extrasub
66717_ACEOF
66718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66719:t
66720/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66721s|@configure_input@|$ac_sed_conf_input|;t t
66722s&@top_builddir@&$ac_top_builddir_sub&;t t
66723s&@top_build_prefix@&$ac_top_build_prefix&;t t
66724s&@srcdir@&$ac_srcdir&;t t
66725s&@abs_srcdir@&$ac_abs_srcdir&;t t
66726s&@top_srcdir@&$ac_top_srcdir&;t t
66727s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66728s&@builddir@&$ac_builddir&;t t
66729s&@abs_builddir@&$ac_abs_builddir&;t t
66730s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66731$ac_datarootdir_hack
66732"
66733eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66734  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66735
66736test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66737  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66738  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66739      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66740  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66741which seems to be undefined.  Please make sure it is defined" >&5
66742$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66743which seems to be undefined.  Please make sure it is defined" >&2;}
66744
66745  rm -f "$ac_tmp/stdin"
66746  case $ac_file in
66747  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66748  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66749  esac \
66750  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66751 ;;
66752
66753
66754
66755  esac
66756
66757done # for ac_tag
66758
66759
66760as_fn_exit 0
66761_ACEOF
66762ac_clean_files=$ac_clean_files_save
66763
66764test $ac_write_fail = 0 ||
66765  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66766
66767
66768# configure is writing to config.log, and then calls config.status.
66769# config.status does its own redirection, appending to config.log.
66770# Unfortunately, on DOS this fails, as config.log is still kept open
66771# by configure, so config.status won't be able to write to it; its
66772# output is simply discarded.  So we exec the FD to /dev/null,
66773# effectively closing config.log, so it can be properly (re)opened and
66774# appended to by config.status.  When coming back to configure, we
66775# need to make the FD available again.
66776if test "$no_create" != yes; then
66777  ac_cs_success=:
66778  ac_config_status_args=
66779  test "$silent" = yes &&
66780    ac_config_status_args="$ac_config_status_args --quiet"
66781  exec 5>/dev/null
66782  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66783  exec 5>>config.log
66784  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66785  # would make configure fail if this is the last instruction.
66786  $ac_cs_success || as_fn_exit 1
66787fi
66788if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66789  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66790$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66791fi
66792
66793
66794# After AC_OUTPUT, we need to do final work
66795
66796
66797  # Try to move config.log (generated by autoconf) to the configure-support directory.
66798  if test -e ./config.log; then
66799    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66800  fi
66801
66802  # Rotate our log file (configure.log)
66803  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66804    $RM -f "$OUTPUT_ROOT/configure.log.old"
66805  fi
66806  if test -e "$OUTPUT_ROOT/configure.log"; then
66807    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66808  fi
66809
66810  # Move configure.log from current directory to the build output root
66811  if test -e ./configure.log; then
66812    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66813  fi
66814
66815  # Make the compare script executable
66816  $CHMOD +x $OUTPUT_ROOT/compare.sh
66817
66818
66819# Finally output some useful information to the user
66820
66821  # Finally output some useful information to the user
66822
66823  printf "\n"
66824  printf "====================================================\n"
66825  if test "x$no_create" != "xyes"; then
66826    if test "x$IS_RECONFIGURE" != "xyes"; then
66827      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66828    else
66829      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66830    fi
66831  else
66832    if test "x$IS_RECONFIGURE" != "xyes"; then
66833      printf "A configuration has been successfully checked but not created\n"
66834    else
66835      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66836    fi
66837  fi
66838  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66839    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66840  else
66841    printf "using default settings.\n"
66842  fi
66843
66844  printf "\n"
66845  printf "Configuration summary:\n"
66846  printf "* Debug level:    $DEBUG_LEVEL\n"
66847  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66848  printf "* JDK variant:    $JDK_VARIANT\n"
66849  printf "* JVM variants:   $JVM_VARIANTS\n"
66850  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66851  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66852
66853  printf "\n"
66854  printf "Tools summary:\n"
66855  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66856    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66857  fi
66858  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66859  if test "x$TOOLCHAIN_VERSION" != "x"; then
66860    print_version=" $TOOLCHAIN_VERSION"
66861  fi
66862  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66863  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66864  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66865
66866  printf "\n"
66867  printf "Build performance summary:\n"
66868  printf "* Cores to use:   $JOBS\n"
66869  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66870  if test "x$CCACHE_STATUS" != "x"; then
66871    printf "* ccache status:  $CCACHE_STATUS\n"
66872  fi
66873  printf "\n"
66874
66875  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66876    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66877    printf "will result in longer build times.\n"
66878    printf "\n"
66879  fi
66880
66881  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66882    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66883    printf "These are not respected, and will be ignored. It is recommended\n"
66884    printf "that you clean your environment. The following variables are set:\n"
66885    printf "$FOUND_ALT_VARIABLES\n"
66886    printf "\n"
66887  fi
66888
66889  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66890    printf "WARNING: Your build output directory is not on a local disk.\n"
66891    printf "This will severely degrade build performance!\n"
66892    printf "It is recommended that you create an output directory on a local disk,\n"
66893    printf "and run the configure script again from that directory.\n"
66894    printf "\n"
66895  fi
66896
66897  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66898    printf "WARNING: The result of this configuration has overridden an older\n"
66899    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66900    printf "proper build. Failure to do so might result in strange build problems.\n"
66901    printf "\n"
66902  fi
66903
66904  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66905    printf "WARNING: The result of this configuration was not saved.\n"
66906    printf "You should run without '--no-create | -n' to create the configuration.\n"
66907    printf "\n"
66908  fi
66909
66910
66911
66912  # Locate config.log.
66913  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66914    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66915  elif test -e "./config.log"; then
66916    CONFIG_LOG_PATH="."
66917  fi
66918
66919  if test -e "$CONFIG_LOG_PATH/config.log"; then
66920    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66921    if test $? -eq 0; then
66922      printf "The following warnings were produced. Repeated here for convenience:\n"
66923      # We must quote sed expression (using []) to stop m4 from eating the [].
66924      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66925      printf "\n"
66926    fi
66927  fi
66928
66929